| 王一生 的个人资料王一生日志列表留言簿 | 帮助 |
|
2007/2/27 领域驱动设计入门(Domain-Driven Design Quickly) 领域驱动设计入门(Domain-Driven Design Quickly) I got the “Domain-Driven Design Quickly” document from infoq.com, after browsing the document, I regard it deserves our attention. Step 1: As the document has said, we need a common language between domain experts and software specialist (designer, analyst, developer, etc.), here we say it Ubiquitous Language. Ubiquitous Language should base on conception acknowledgement accepted by both sides, UML and document can provide auxiliary support to this. Step 2: Then next is to apply Model-driven Design to the DDD. Model-driven Design contains below conception: 1. Entity Object 2. Value Object 3. Service 3.1 The operation performed by the Service refers to a domain concept which does not naturally belong to an Entity or Value Object. 3.2 The operation performed refers to other objects in the domain. 3.3 The operation is stateless. 4. Aggregate 5. Factory 6. Repository Here, I need to point out; maybe we are short of the Repository when reviewing the last project (Spring+Hibernate). See document on what’s the aim of repository: “Therefore, use a repository, the purpose of which is to encapsulate all the logic needed to obtain object references.” Step 4: Then ,the document talks about the refactoring functionality applied to the DDD development, some items such as Specification Object should be noticed. Step 5: Preserving Model Integrity, as the document saying,”everybody knows his own backyard, but other areas are not known in enough detail”. Some guideline principles are listed as below: 1. Bounded Context 2. Continuous Integration Applies to bounded context ,not neighboring.. 3. Context Map 4. Shared Kernel 5. Customer-Supplier 6. Conformist 7. Anticorruption Layer Anticorruption Layer talks to the external model using the external language not the client one. 8. Open Host Service 9. Distillation Here, need a dividing between Core Domain and Generic Subdomain. And ,on how to implement Generic Subdomain ,we can use off-the-shelf solution, outsourcing ,in-house solution ,etc. Future, maybe we can pay some attention to DSL(Domain Specific Language). Some web addresses can be used as the references on DDD learning and implementation. http://domaindrivendesign.org/ http://www.domainlanguage.com/ 引用通告此日志的引用通告 URL 是: http://newepoch.spaces.live.com/blog/cns!258824C38D4DAD17!207.trak 引用此项的网络日志
|
|
|