Domain-Driven Design Quickly 这书很好,
下载地址:http://www.infoq.com/minibooks/domain-driven-design-quickly
判断是否是领域逻辑的原则:就是这个逻辑动作是否有明确的业务上的含义,或者说是否是业务相关的,而不仅仅是技术相关的。
只有将技术实现手段从领域问题中剥离才能保证领域本身的精炼,保证程序员可以把精力集中到领域问题本身上来,而不会满脑子都是技术实现手段。
按照Eric的表述,通常将领域中的组成角色分为以下五种:
实体(Entity):拥有唯一标识的对象。
值对象(Value Object):没有唯一标识的对象。
工厂(Factory):定义创建实体的方法。
仓储(Repository):管理实体的集合并封装其持久化过程。
服务(Service):实现不能指派或封装在一个单一对象上的操作。
a domain model is not a particular diagram; it is the idea that the diagram is intended to
convey.
The previous chapters underscored the importance of an approach to software development that is centered on the business domain.(上一章节强调软件开发方法的重点是以业务领域为中心。)
It is important to choose a model which can be easily and accurately put into code. 选择一种容易且能精确地转化成代码的模型是非常重要的。
A common architectural solution for domain-driven designs contain four conceptual layers:
1.User Interface(Presentation Layer);
2.Application Layer:This is a thin layer which coordinates (调整) the application activity. It does not contain business logic. It does not hold the state of the business objects, but it can hold the state of an application task progress.
3.Domain Layer:This layer contains information about the domain. This is the heart of the business software. The state of business objects is held here. Persistence of the business objects and possibly their state is delegated to the infrastructure layer.
4.Infrastructure Layer :This layer acts as a supporting library for all the other layers. It provides communication between layers, implements persistence for business objects, contains
supporting libraries for the user interface layer, etc.
There are cases when we need to contain some attributes of a domain element. We are not interested in which object it is, but what attributes it has. An object that is used to describe certain aspects of a domain, and which does not have identity, is named Value Object.(有些情况下,领域元素需要包含一些属性。然后我们关注的不是它是哪个对象,而是这个象所拥有的属性。被用来描述一个领域某一方面,而且没有标识的对象叫值对象。)
Value Objects can contain other Value Objects, and they can even contain references to Entities.(值对象中也可包含其他值对象,甚至还可包括对实体的引用。)
分享到:
相关推荐
关于DDD可参考InfoQ的Mini Book Domain Driven Design Quickly , 还有 Banq 的文章 实战DDD(Domain-Driven Design领域驱动设计), 和 领域模型驱动设计(DDD)之模型提炼 。 本书分为四部分,第一部分讲述了领域模型...
领域驱动设计(Domain-Driven Design,简称DDD)是一种软件开发的方法论,它由Eric Evans在其2004年的同名书籍《领域驱动设计:软件核心复杂性应对之道》中提出。DDD的核心思想是,软件系统的复杂性不仅仅是由技术...
The software development community widely acknowledges that domain modeling is central to software design. Through domain modeling, software developers are able to express rich functionality and ...
Implementing Domain-Driven Design 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书
.NET框架与C#语言结合应用领域驱动设计(Domain-driven Design, DDD)是现代软件开发中的一个重要实践。DDD旨在通过将复杂的业务逻辑集中在核心领域模型上,提高软件系统的可读性、可维护性和可扩展性。本章节我们将...
Implementing Domain-Driven Design
Domain-Driven Design Distilled DDD(Domain-Driven Design 领域驱动设计)是由Eric Evans最先提出,目的是对软件所涉及到的领域进行建模,以应对系统规模过大时引起的软件复杂性的问题。整个过程大概是这样的,...
Domain-Driven Design in PHP 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者...
### 域驱动设计(Domain-Driven Design, DDD):应对软件核心复杂性 #### 概述 《域驱动设计:应对软件核心复杂性》一书由埃里克·埃文斯(Eric Evans)撰写,Addison Wesley出版社于2003年8月20日出版。该书共560...
《领域驱动设计精粹》(Domain-Driven Design Distilled)是Vaughn Vernon所著的一本关于领域驱动设计(Domain-Driven Design,简称DDD)的入门指南。DDD是一种软件开发的方法论,它强调在软件开发过程中,开发者...
3. 模型驱动设计(Model-Driven Design):这是一种以领域模型为核心的开发方法,它要求软件系统的设计和实现应该反映出模型的结构和意图。 4. 模型与实现的绑定:本书探讨了如何在设计和实现之间建立清晰的映射...
Patterns, Principles and Practices of Domain-Driven Design 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载...
Domain-driven Design
JavaScript Domain-Driven Design allows you to leverage your JavaScript skills to create advanced applications. You'll start with learning domain-driven concepts and working with UML diagrams. You'll ...
Domain-Driven Design - Tackling Complexity in the Heart of Software
With Implementing Domain-Driven Design, Vaughn has made an important contribution not only to the literature of the Domain-Driven Design community, but also to the literature of the broader enterprise...