摘要: The world is full of complaint, actually we don't like this situation, we don't like the people who often complain. When you change yourself, you have changed the world. Let us make ourselves be a complaint free person first.If you don't like something, change it. If you can't change
阅读全文
摘要: 'exclam'='!''at'='@''numbersign'='#''dollar'='$''percent'='%''caret'='^''ampersand'='&''asterisk'='*''parenleft'='(''parenright'=')''
阅读全文
摘要: mark here, finish soon.
阅读全文
摘要: http://news.cnblogs.com/n/125826/
阅读全文
摘要: StateAlter the object's behavior by the changes of its state. And the states are all encapsulated into single object state by state. decouple the state(especially the object's behavior under different states) from the the object itselfWhen we use this patternThey are all about the state of t
阅读全文
摘要: BridgeThe book told me that this pattern is dedicated to decouple the abstraction from its implemetation so they can vary by themself without affecting each others.To be honest, I don't know which one I should call as abstraction and which one as implemetation. I call them two structures designe
阅读全文
摘要: IteratorA way provided by this pattern lets the client access the aggregate object in turns(one by one) but without exposing the details of the aggregate object.An iterator are designed in this pattern toenumerate the object.Auctually. ASP.NET has implemented this pattern with providing two interfac
阅读全文
摘要: CommandEncapsulate an request into the object. The command holds the receiver, the invoker holds the command.encapsulate the details, show the interface to the client. the client does not know the exact implemetation .The client only cares about his request and tells the invoker what his request is,
阅读全文
摘要: BuilderDecouple theappearance from the construct process(algorithm) for a complicated object, the algorithm can be used for so much appearance. for reusing the algorithm, for hiding the details from the client. The appearance can be showed without leaving any parts needed with the help of the unifie
阅读全文
摘要: MementoMemento as its name describes, which is for storing something. for recorving something from it.We want to capture the type's inner state at a given time and also want to recove it to where it was captured but without jeopardizing the encapsulation withoutexposing the type's details to
阅读全文
摘要: 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
阅读全文
摘要: 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
阅读全文
摘要: 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
阅读全文
摘要: 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
阅读全文
摘要: 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
阅读全文
摘要: 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
阅读全文
摘要: 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
阅读全文