banq / order Goto Github PK
View Code? Open in Web Editor NEWDDD书籍中订单Order聚合的Spring Boot + Spring DATA JDBC实现
DDD书籍中订单Order聚合的Spring Boot + Spring DATA JDBC实现
为何要把OrderStatus加上Id变成实体呢?
看了博主的代码,对于DDD程序结构有以下两个疑问
你好, 在复杂软件设计之道这本书的第123页说到:
这又验证了一句话, 服务被开发人员用作真正的银弹, 但最终成为得到贫血模型的最大原因......
这一句话要如何理解了?
我理解, 其实是贫血模型还是充血模型, 和用不用服务没有关系.
面向对象的设计其实说的是将数据和维护数据一致性的方法绑定起来, 从而能够为何内部数据的一致性,
比如linux的文件这个抽象概念, 虽然是过程式接口, 但是其实是面向对象的设计理念.
放到书中的例子, 服务如果提供了检查钱余额够不够, 那么和用类封装在一起, 还是提供服务对应的接口效果是一样的.
因此我认为, 不能简单的认为服务形式的方案就是贫血模型.
您看这里应该如何理解.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.