Domain-Driven Design
来源:互联网 发布:淘宝零食加盟 编辑:程序博客网 时间:2024/05/22 10:39
下载地址 http://www.infoq.com/cn/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.(值对象中也可包含其他值对象,甚至还可包括对实体的引用。)
- domain-driven-design学习
- Domain Driven Design
- DDD(Domain-Driven Design)
- Domain-Driven Design
- Services in Domain-Driven Design
- 读《Domain-Driven Design Quickly》笔记
- DDD(Domain-Driven Design)的推理过程
- An Introduction To Domain-Driven Design
- Domain Driven Design and Development In Practice
- 什么是领域驱动设计(Domain Driven Design)?
- 什么是领域驱动设计(Domain Driven Design)?
- 什么是领域驱动设计(Domain Driven Design)?
- domain-driven design 领域驱动设计
- 领域驱动设计(DDD:Domain-Driven Design)
- 领域驱动设计(DDD:Domain-Driven Design)
- 领域驱动设计(DDD:Domain-Driven Design)
- 什么是领域驱动设计(Domain Driven Design)?
- .NET Domain-Driven Design with C#: Problem - Design - Solution
- 天津麒麟签约“京津冀大数据协同处理中心”
- The Street:BAT增速超美国科技巨头将成常态 为什么BAT仍有巨大发展潜力?
- Uber 宣布将香港最低打车费用上涨 80%, 最低 45 港币
- 考拉阅读CEO赵梓淳:如何利用AI、语言学做出国内首个中文分级阅读系统?
- 每天一个linux命令(19):find 命令概览
- Domain-Driven Design
- 登录拦截器
- 专访爱耳目刘图南:家庭关爱新“看”法
- 拉勾网打造中国最大的互联网职业成长平台
- 狂欢3天,神画智能影院低至3999元速来抢
- windows7环境下使用pip安装MySQLd
- 大朋头盔首批量产机抢购一空,新一轮预售开启
- 平衡车价格战升温 坚守品质才能走得更远
- 读赚天下,噱头还是实惠?——并读新闻,前景仍可期