Domain Model

按老马的话说:
An object model of the domain that incorporates both behavior and data.
按我的话说:
是系统中数据和行为的一种组合方式,当然是包装到类中。这个类可以命名为我们做的项目中的名词。如:项目,包,供应商等。当然我的理解是不对的,我缺少了对业务之间关系的一种联系。
最惨的情况是业务逻辑相当的复杂。商业规则和逻辑描述了不同的场景和不同侧面的行为,这些复杂度业务对象可以解决吗。一个业务对象创建了许多连成网状的对象,这些对象表现出一些有意义的个体,或者在到一个团休,或者小到一行代码。(哈哈,英文太烂!)
At its worst business logic can be very complex. Rules and logic describe many different cases and slants of behavior, and it's this complexity that objects were designed to work with. A Domain Model creates a web of interconnected objects, where each object represents some meaningful individual, whether as large as a corporation or as small as a single line on an order form.
代码:
接口定义
策略一
策略二
供应商
客户代码


posted @ 2006-11-30 17:30  南守拥  阅读(367)  评论(0编辑  收藏  举报