![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
金玉良言【编程版】
grayliu
性格:简单,
爱好:足球,上网,编程。
生活态度:积极,快乐!
展开
-
设计模式金玉良言<二>
DECORATOR PATTERN DEFINITION: it attaches additional responsibilities to an object dynamically and provide a flexible alternative to subclassing for extending functionality.(装饰模式可以动态地添加一些功能而无需改动已有的代码...2009-04-10 16:49:25 · 96 阅读 · 0 评论 -
JAVA编程金玉良言...
不要试图通过继承在父类中提供行为,而应该将行为定义成不同的接口。同时,由于接口无法达到代码复用,所以应把可变的行为和不可变的行为区分开来。 ...2009-02-19 10:32:13 · 78 阅读 · 0 评论 -
设计模式金玉良言<一>
策略模式的本质:少用继承,多用组合。STRATEGY PATTERN DEFINITION: it defines a family of algorithms(算法?),encapsulate each one, and makes then interchangeable. strategy lets the algorithm vary independently from clie...2009-02-19 11:00:10 · 115 阅读 · 0 评论