1、Transaction Script(事务脚本)

领域逻辑模式( 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页
    多数的商业应用程序可以看作是一系列的事务,一些事务可能是查看一些以特定方式组织的信息,另一些事务可能是用来改变这些信息。一个客户系统和一个服务系统之间的每次交互包含了一定数量的业务逻辑.在某些情况下,这些交互可能是像显示数据库中的信息一样简单。其他情况交互可能包括了多个步骤的验证和计算。事务脚本主要通过单独的过程组织了所有的业务逻辑。包括直接和数据库交互,或者通过简单的数据库包装器。每个事务将拥有自己的事务脚本,尽管公共的子任务可以被分解成子过程!

转载于:https://www.cnblogs.com/xhan/archive/2008/01/15/1039482.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值