原书出处
Domain-Driven Design Tackling Complexity in the Heart of Software
45 原书第06章|Factories
akes it the best choice. FACTORIES can actually obscure simple objects that don't use polymorphism.
The trade-offs favor a bare, public constructor in the following circumstances. The class is the type. It is not part of any interesting hierarchy, and it isn't used polymorphically by implementing an interface.
The client cares about the implementation, perhaps as a way of choosing a STRATEGY. All of the attr
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Domain-Driven Design Tackling Complexity in the Heart of Software/_epub-src/0321125215_ch06lev1sec2.html
EPUB SHA-256:3e81897e8809ae8135b32e0563f9858b3020c5f5128531655f6d8e3a21c679ce