11 2011 档案

[review]Design Pattern:Facade
摘要: FacadeFacade provides a new mechanism to combine the sub-systems and eventually provides an uniform interface to the client, which is a higher encapsulation and makes the sub-systems be used more easily, what's more? the sub-systems can run by themself and can be used independently.This pattern 阅读全文

posted @ 2011-11-29 23:21 小AI| 编辑

[review]Design Pattern:Prototype
摘要: PrototypeUse the current instance of a type to create a same instance with the Clone but not new.When we use this patternI have no idea now, need to dig more in the future.Roles in this patternPrototype: define an interface used to clone itselfConcretePrototype: implement the interface of the Protot阅读全文

posted @ 2011-11-28 22:42 小AI| 编辑

[review]Design Pattern:Singleton
摘要: SingletonSingleton is simple, i think most of coders have used it in our system. Which guarantees that a class only has one instance, and provides a global entry to the client to access it.How do we make this happen, a global entry. and we should prohibit any possibilities to initialize it. Singleto阅读全文

posted @ 2011-11-23 22:24 小AI| 编辑

[review]Design Pattern:Decorator
摘要: DecoratorAdd some new features to the objectdynamically, it is more flexible than theinheritance, the original component doesn't need to have plenty of functions at the first time, but has only very frequent operations. The decorator is designed to add any other additional operations to the orig阅读全文

posted @ 2011-11-21 23:08 小AI| 编辑

[review]Design Pattern:Observer
摘要: ObserverThe different objects got some dependency with each others. when the state of one of them is changed. all other dependent object will be notified and updated by some predefined rules.It is like the Publish-Subscribe mode, when the publisher is changed, all the subsciber will be changed autom阅读全文

posted @ 2011-11-10 23:35 小AI| 编辑

[review]Design Pattern:Composite
摘要: CompositeComposite pattern is dedicated to resolve the whole and part issue in application. The whole can be parted into different parts and the parts can be composited into a very whole, to resolve the whole-part issue.When we use this patternif you want to express the whole-part hierarchycircumsta阅读全文

posted @ 2011-11-08 22:42 小AI| 编辑

[review]Design Pattern:Adapter
摘要: Adapter patternAdapter is designed to change an interface to another interface expected by client. which makes the uncompatible types work together.When we use this patternWe want to reuse the code designed before, which has the similar functionality to our current situation. but they are not compat阅读全文

posted @ 2011-11-06 17:29 小AI| 编辑

导航