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

  • 相关阅读:
    javascript获取时间差
    鼠标上下滚动支持combobox选中
    用 CSS 实现元素垂直居中,有哪些好的方案?
    easyui form load 数据表单有下拉框
    Javascript 严格模式详解
    artTemplate 原生 js 模板语法版
    artTemplate 简洁语法版
    mysql 选择性高
    mysql 事件调度器
    Windows 抓取本地环路包
  • 原文地址:https://www.cnblogs.com/xhan/p/1039482.html
Copyright © 2020-2023  润新知