置顶随笔

摘要: 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阅读全文
posted @ 2011-10-16 14:23 小AI 阅读(122) 评论(1) 编辑
摘要: 'exclam'='!''at'='@''numbersign'='#''dollar'='$''percent'='%''caret'='^''ampersand'='&''asterisk'='*''parenleft'='(''parenright'=')''阅读全文
posted @ 2011-08-05 20:25 小AI 阅读(34) 评论(0) 编辑

2012年2月10日

摘要: mark here, finish soon.阅读全文
posted @ 2012-02-10 15:45 小AI 阅读(4) 评论(0) 编辑

2011年12月20日

摘要: http://news.cnblogs.com/n/125826/阅读全文
posted @ 2011-12-20 21:25 小AI 阅读(15) 评论(1) 编辑

2011年12月12日

摘要: 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阅读全文
posted @ 2011-12-12 22:48 小AI 阅读(32) 评论(0) 编辑

2011年12月8日

摘要: 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阅读全文
posted @ 2011-12-08 22:29 小AI 阅读(12) 评论(0) 编辑

2011年12月7日

摘要: 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阅读全文
posted @ 2011-12-07 23:04 小AI 阅读(18) 评论(0) 编辑

2011年12月6日

摘要: 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,阅读全文
posted @ 2011-12-06 23:11 小AI 阅读(13) 评论(0) 编辑

2011年12月5日

摘要: 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阅读全文
posted @ 2011-12-05 22:49 小AI 阅读(21) 评论(0) 编辑

2011年12月1日

摘要: 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阅读全文
posted @ 2011-12-01 23:01 小AI 阅读(11) 评论(0) 编辑

2011年11月29日

摘要: 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 阅读(13) 评论(0) 编辑

2011年11月28日

摘要: 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 阅读(8) 评论(0) 编辑

2011年11月23日

摘要: 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 阅读(13) 评论(0) 编辑

2011年11月21日

摘要: 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 阅读(12) 评论(0) 编辑

2011年11月10日

摘要: 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 阅读(28) 评论(0) 编辑

2011年11月8日

摘要: 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 阅读(14) 评论(0) 编辑

2011年11月6日

摘要: 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 阅读(98) 评论(0) 编辑

导航

公告

昵称:小AI
园龄:2年10个月
粉丝:156
关注:37

搜索

 
 

最新随笔

我的标签

随笔档案

相册

积分与排名