- 博客(2)
- 收藏
- 关注
原创 Strategy模式与State模式的区别
Strategy模式的实现有以下这些需要注意的地方。 经常见到的是,所有的具体策略类都有一些公有的行为。这时候,就应当把这些公有的行为放到共有的抽象策略角色Strategy类中。当然这时候抽象策略角色必须要用java抽象类实现,而不能使用java接口。 Strategy模式在每一个时刻都只能使用一个策略对象,但是有的时候一个应用程序同时与几个策略对象相联系。换言之,在应用程序启动时,所...
2010-09-14 14:42:39
175
Learn Form Spring (1)-Command Pattern
I am reading a blog from http://www.iteye.com/problems/27338. And this paper enlightens me on the code refactoring subject and so on. [code="java"]public static void main(String[] args) { CreateBe...
2010-08-29 10:38:05
102
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人