君子博学而日参省乎己 则知明而行无过矣

博客园 首页 新随笔 联系 订阅 管理

2014年3月14日 #

摘要: Template Methodis abehavioral design patternand it’s used to create a method stub and deferring some of the steps of implementation to the subclasses.Template methoddefines the steps to execute an algorithm and it can provide default implementation that might be common for all or some of the subclas 阅读全文
posted @ 2014-03-14 17:11 刺猬的温驯 阅读(529) 评论(0) 推荐(0) 编辑

摘要: Avoid coupling the sender of a request to the receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.The main intention in Chain Of Responsibility is to decouple the origin of the request and 阅读全文
posted @ 2014-03-14 16:58 刺猬的温驯 阅读(679) 评论(0) 推荐(0) 编辑