领域驱动设计|领域驱动建模的摘录
领域驱动设计方法成功的实践:
1. Binding model and implementation as soon as possible. That crude prototype forged the essentiallink.
2. Cultivating a language based on the model. At first, they had to explain elementary PCB issues tome while I had to explain what a class diagram meant. But as the project proceeded, terms taken straight out of the model, organized into sentences consistent with the structure of the model tested the viability of the model immediately upon reaching their ears or mine.
3. Knowledge rich model. The objects had behavior and enforced rules. The model wasn’t just a data schema, it was integral to solving a complex problem. It captured knowledge of various kinds.
4. The model was distilled. Important concepts were added to the model as it became more complete,but equally important, concepts were dropped when they didn’t prove useful or central. When an unneeded concept was tied to one that was needed, a new model was found that distinguished theessential concept so that the other could be dropped.
5. Knowledge crunching. The language combined with sketches and a brainstorming attitude turnedour discussions into laboratories of the model, in which hundreds of experimental variations could be exercised, tried and judged.
【领域驱动设计|领域驱动建模的摘录】瀑布模型失败分析:
In the old waterfall method, the business experts talked to the analysts, analysts digested and abstracted and passed the result along to the programmers who coded the software. This failed because it completely lacks feedback. The analysts have full responsibility for creating the model based only on input from the business experts. They have no opportunity to learn from the programmers or gain experience with early versions. Knowledge trickles in one direction, but does not accumulate.
具体做法:
Use the model as the backbone of a language. Commit the team to using that language relentlessly in all communication within the team and in the code. Use the same language in diagrams, writing, and,especially speech.
Iron out difficulties by experimenting with alternative expressions, which reflect alternative models. Then refactor the code, renaming classes, methods and modules to conform to the new model. Resolve confusion over terms in conversation, in just the way we converge on agreed meaning of ordinary words. Domain experts object to terms or structures that are awkward or inadequate to convey domain understanding, while developers watch for ambiguity or inconsistency that will trip up design.
分层的方法:
Partition a complex program into LAYERS. Develop a design within each LAYER that is cohesive and is dependent only on the layers below. Follow standard architectural patterns to provide loose coupling to the layers above. Concentrate all the code related to the domain model in one layer and isolate it from the user interface, application, and infrastructure code. The domain objects, free of the responsibility of displaying themselves, storing themselves, managing application tasks, and so forth, can be focused on expressing the domain model. This allows a model to evolve rich enough and clear enough to effectively capture essential business knowledge and put it to work.
建模ENTITIES方法:
ENTITIES are defined by their identities. Attributes are attached and change. Therefore, strip the ENTITY object’s definition down to the most intrinsic characteristics, particularly those that identify it, or are commonly used to find or match it. Separate other characteristics into other objects associated with the core ENTITY.
推荐阅读
- PMSJ寻平面设计师之现代(Hyundai)
- 基于微信小程序带后端ssm接口小区物业管理平台设计
- 爱琐搭配(喜欢复古、冷淡,像这种双环设计的气质耳环)
- 别墅庭院设计,不同的别墅庭院设计也给人视觉上完全不一样的!
- 两感一练
- 数据库设计与优化
- GIS跨界融合赋能多领域技术升级,江淮大地新应用成果喜人
- 21天|21天|羊多多组合《书都不会读,你还想成功》
- 设计模式-代理模式-Proxy
- [译文]Domain|[译文]Domain Driven Design Reference(四)—— 柔性设计