hnlxl / ddddemo-im-server Goto Github PK
View Code? Open in Web Editor NEWAn instant messaging system's server side that demonstrates Java domain-driven development. 一个演示Java 领域驱动开发的即时通信系统的服务器端。
License: Apache License 2.0
An instant messaging system's server side that demonstrates Java domain-driven development. 一个演示Java 领域驱动开发的即时通信系统的服务器端。
License: Apache License 2.0
提供核心的即时通信功能,以便于:
无需提前建设用户模型,因为即时通信聚合中涉及到的用户,是值对象,并不是对用户聚合的引用。
单独的链表结构可以做,但跟JPA/Hibernate结合起来的链表结构还没有经验,将聚合与链表结构结合起来也没有经验。由于该项目的重点是DDD演示而不是IM服务器,故当前不再考虑这种设计。以后如果有机会,在进行重构优化。
如果断言NULL,会增加很大的单元测试工作量,所以不做此项工作。
It will increased big unit testing workload to assert NULL, so I will not do this.
注: 广义自然键包含,像UUID和序列号这些,额外添加但对用户可见的特殊属性。
纯粹为性能服务的代理主键,若要实现,需要引入层超模型和Hibernat自然键,还是挺麻烦的,超出该项目的开发目的,故当前对此不予考虑。
另一方面,所有主键,使用最简单的生成策略,不在资源库中为其设计生成方法。 例如:UUID类型主键通过直接调用 java.util.UUID.randomUUID()
来获取(但是应当在模型层生成,不应该由应用服务来生成),整数型主键则使用数据库的自动增长方式来生成。此外,由于聚合ID必须手动生成(详见下文 ),故它的内部值,全部使用UUID而不是整数。
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.