What Is Seedwork

最近研究DDD,发现很多DDD的例子都有一个Seedwork的项目。从名字我没办法推断是什么作用,看代码里面是一些公共的接口跟基类。google了一会基本都是英文资料。发现两篇大作。下面是摘要:

1.

A seedwork is some minimal functionality that you modify however you like to get what you need. Of course this means that there's no way for you to get common updates to the seedwork, once you grow it you own it.

2.

The idea of a seedwork is a contrasting side to this story which is less commonly talked about. The difference between a seedwork and a framework is in the way that reuse is controlled. Frameworks have strict patterns and common pathways for extension and implementation, wheras seedworks are oriented towards being hacked and 'grown' towards the final goal. Commonly, a seedwork would be a collection of lightweight skeleton classes which are ready to be imported, modified, and expanded to fit the demands of a particular situation.

根据上面文章所说,Seedwork是一些可重用的代码,它比framework小,迷你。Framework提供基础的功能让你去实现模式跟设计。Seedwork则更加趋近于对特点细节(业务)的抽象跟封装,以达到复用的目的。Seedwork的代码通常只能在一个或一类项目中重用。

你可能感兴趣的:(HA)