一个基本的设计规则就是,一个类只要存在并去完成一个域包的目标,那么它就应该是该域包的一部分。
A fundamental design precept is that a class should be part of a domain package only if it exists to fulfill the goals of that domain package.
如果您有一个域包,这个域包是唯一的一个其它类或者域包的服务器,您可以决定合并这两个域包。
If you have a domain package that is a server to only one other class or domain package, you may decide to combine the two packages.
有这样一条经验可以遵循,服务器类属于一个域包并且常常会形成它们自己的域包,因为它们是应用程序里消息流的最后一站。
One rule of thumb is that server classes belong in a domain package and will often form their own domain packages because they are the last stop for message flow within an application.
应用推荐