1、Transaction Script(事務指令碼)

來源:互聯網
上載者:User
領域邏輯模式( Domain Logic Patterns
1、Transaction Script(事務指令碼)

Organizes business logic by procedures where each procedure handles
a single request from the presentation.

For a full description see P of EAA page 110

Most business applications can be thought of as a series of
transactions. A transaction may view some information as organized in
a particular way, another will make changes to it. Each interaction
between a client system and a server system contains a certain amount
of logic. In some cases this can be as simple as displaying
information in the database. In others it may involve many steps of
validations and calculations.

A Transaction Script organizes all this logic primarily as a single
procedure, making calls directly to the database or through a thin
database wrapper. Each transaction will have its own Transaction
Script, although common subtasks can be broken into subprocedures.

    通過過程來組織商務邏輯,其中每一個過程用來處理來自展示層的一個單獨的請求!
本模式詳細描述參考 PEAA 110頁
    多數的商務應用程式可以看作是一系列的事務,一些事務可能是查看一些以特定方式組織的資訊,另一些事務可能是用來改變這些資訊。一個客戶系統和一個服務系統之間的每次互動包含了一定數量的商務邏輯.在某些情況下,這些互動可能是像顯示資料庫中的資訊一樣簡單。其他情況互動可能包括了多個步驟的驗證和計算。事務指令碼主要通過單獨的過程組織了所有的商務邏輯。包括直接和資料庫互動,或者通過簡單的資料庫封裝器。每個事務將擁有自己的事務指令碼,儘管公用的子任務可以被分解成子過程!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.