<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_记忆潜处</title><subtitle type="text">With great power comes great responsibility</subtitle><id>http://feed.cnblogs.com/blog/u/21236/rss</id><updated>2009-08-06T01:25:14Z</updated><author><name>Tristan(GuoZhijian)</name><uri>http://www.cnblogs.com/guozhijian/</uri></author><generator>feed.cnblogs.com</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/guozhijian/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/21236/rss"/><entry><id>http://www.cnblogs.com/guozhijian/archive/2008/04/01/1133502.html</id><title type="text">Core Design Patterns(16) Chain of Responsibility 职责链模式</title><summary type="text">多个对象构成一个链式结构，客户端向链中的某个对象发出请求，被请求的对象可以处理客户代码的请求，也可以根据业务将请求向下传递，依此类推，直到请求最终被某对象处理，或抛出异常。这就是职责链模式的应用场景。</summary><published>2008-04-01T13:34:00Z</published><updated>2008-04-01T13:34:00Z</updated><author><name>Tristan(GuoZhijian)</name><uri>http://www.cnblogs.com/guozhijian/</uri></author><link rel="alternate" href="http://www.cnblogs.com/guozhijian/archive/2008/04/01/1133502.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/guozhijian/archive/2008/04/01/1133502.html"/><content type="text">多个对象构成一个链式结构，客户端向链中的某个对象发出请求，被请求的对象可以处理客户代码的请求，也可以根据业务将请求向下传递，依此类推，直到请求最终被某对象处理，或抛出异常。这就是职责链模式的应用场景。</content></entry><entry><id>http://www.cnblogs.com/guozhijian/archive/2008/03/23/1117901.html</id><title type="text">Core Design Patterns(15) Template Method 模版方法模式</title><summary type="text">父类定义了一个模版方法，这个模版方法规定了一个算法几个步骤的执行顺序，它的子类可以更改这个算法某几个步骤的具体实现。</summary><published>2008-03-23T14:44:00Z</published><updated>2008-03-23T14:44:00Z</updated><author><name>Tristan(GuoZhijian)</name><uri>http://www.cnblogs.com/guozhijian/</uri></author><link rel="alternate" href="http://www.cnblogs.com/guozhijian/archive/2008/03/23/1117901.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/guozhijian/archive/2008/03/23/1117901.html"/><content type="text">父类定义了一个模版方法，这个模版方法规定了一个算法几个步骤的执行顺序，它的子类可以更改这个算法某几个步骤的具体实现。</content></entry><entry><id>http://www.cnblogs.com/guozhijian/archive/2008/03/20/1115286.html</id><title type="text">Core Design Patterns(14) State 状态模式</title><summary type="text"> 应用程序中，常常会有这样一些有状态的对象，它们可能有很多种状态，在不同状态下，对象表现出的行为截然不同。在一般情况下，我们可能会写一些状态切换的if .. else ..语句块，往往造成代码丑陋，维护困难。  这时候，可以考虑使用状态模式。</summary><published>2008-03-20T12:05:00Z</published><updated>2008-03-20T12:05:00Z</updated><author><name>Tristan(GuoZhijian)</name><uri>http://www.cnblogs.com/guozhijian/</uri></author><link rel="alternate" href="http://www.cnblogs.com/guozhijian/archive/2008/03/20/1115286.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/guozhijian/archive/2008/03/20/1115286.html"/><content type="text"> 应用程序中，常常会有这样一些有状态的对象，它们可能有很多种状态，在不同状态下，对象表现出的行为截然不同。在一般情况下，我们可能会写一些状态切换的if .. else ..语句块，往往造成代码丑陋，维护困难。  这时候，可以考虑使用状态模式。</content></entry><entry><id>http://www.cnblogs.com/guozhijian/archive/2008/03/16/1108540.html</id><title type="text">Core Design Patterns(13) Strategy 策略模式</title><summary type="text">一个类的某个行为可能有多种实现策略，可以将这个行为提取出来定义为接口，那么就可以提供这个接口的多个实现。这些类（策略）可以相互替换而不影响客户端代码</summary><published>2008-03-16T08:58:00Z</published><updated>2008-03-16T08:58:00Z</updated><author><name>Tristan(GuoZhijian)</name><uri>http://www.cnblogs.com/guozhijian/</uri></author><link rel="alternate" href="http://www.cnblogs.com/guozhijian/archive/2008/03/16/1108540.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/guozhijian/archive/2008/03/16/1108540.html"/><content type="text">一个类的某个行为可能有多种实现策略，可以将这个行为提取出来定义为接口，那么就可以提供这个接口的多个实现。这些类（策略）可以相互替换而不影响客户端代码</content></entry><entry><id>http://www.cnblogs.com/guozhijian/archive/2008/03/16/1108454.html</id><title type="text">Core Design Patterns(12) Builder 建造者模式</title><summary type="text">建造者模式将复杂对象的创建过程和对象的变现分离。使得一个建造过程可以创建出具有不同变现的产品对象。</summary><published>2008-03-16T07:14:00Z</published><updated>2008-03-16T07:14:00Z</updated><author><name>Tristan(GuoZhijian)</name><uri>http://www.cnblogs.com/guozhijian/</uri></author><link rel="alternate" href="http://www.cnblogs.com/guozhijian/archive/2008/03/16/1108454.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/guozhijian/archive/2008/03/16/1108454.html"/><content type="text">建造者模式将复杂对象的创建过程和对象的变现分离。使得一个建造过程可以创建出具有不同变现的产品对象。</content></entry><entry><id>http://www.cnblogs.com/guozhijian/archive/2008/03/16/1108041.html</id><title type="text">Core Design Patterns(11) Abstract Factory 抽象工厂模式</title><summary type="text">针对多个平行产品体系的产品创建问题，使用抽象工厂模式</summary><published>2008-03-15T16:25:00Z</published><updated>2008-03-15T16:25:00Z</updated><author><name>Tristan(GuoZhijian)</name><uri>http://www.cnblogs.com/guozhijian/</uri></author><link rel="alternate" href="http://www.cnblogs.com/guozhijian/archive/2008/03/16/1108041.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/guozhijian/archive/2008/03/16/1108041.html"/><content type="text">针对多个平行产品体系的产品创建问题，使用抽象工厂模式</content></entry><entry><id>http://www.cnblogs.com/guozhijian/archive/2008/03/15/1107851.html</id><title type="text">Core Design Patterns(10) Singleton 单例模式</title><summary type="text">使用单例模式，可以控制一个类在一个应用程序中只有一个实例。</summary><published>2008-03-15T12:37:00Z</published><updated>2008-03-15T12:37:00Z</updated><author><name>Tristan(GuoZhijian)</name><uri>http://www.cnblogs.com/guozhijian/</uri></author><link rel="alternate" href="http://www.cnblogs.com/guozhijian/archive/2008/03/15/1107851.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/guozhijian/archive/2008/03/15/1107851.html"/><content type="text">使用单例模式，可以控制一个类在一个应用程序中只有一个实例。</content></entry><entry><id>http://www.cnblogs.com/guozhijian/archive/2008/03/14/1106571.html</id><title type="text">Core Design Patterns(9) Factory Method 工厂方法模式</title><summary type="text">工厂方法模式提供创建一系列属于同一产品体系的类的创建方法。并且，有别于一般的简单工厂，工厂方法模式创建产品由子类来完成。这样增加新的产品不需要修改原来的代码，只需要相应增加一个新的工厂子类。</summary><published>2008-03-14T14:48:00Z</published><updated>2008-03-14T14:48:00Z</updated><author><name>Tristan(GuoZhijian)</name><uri>http://www.cnblogs.com/guozhijian/</uri></author><link rel="alternate" href="http://www.cnblogs.com/guozhijian/archive/2008/03/14/1106571.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/guozhijian/archive/2008/03/14/1106571.html"/><content type="text">工厂方法模式提供创建一系列属于同一产品体系的类的创建方法。并且，有别于一般的简单工厂，工厂方法模式创建产品由子类来完成。这样增加新的产品不需要修改原来的代码，只需要相应增加一个新的工厂子类。</content></entry><entry><id>http://www.cnblogs.com/guozhijian/archive/2008/03/14/1106512.html</id><title type="text">Core Design Patterns(8) Prototype 原型模式</title><summary type="text">当我们需要实例化一个类的多个实例，并且实例化的代价比较昂贵的时候，可以使用原型模式。</summary><published>2008-03-14T13:48:00Z</published><updated>2008-03-14T13:48:00Z</updated><author><name>Tristan(GuoZhijian)</name><uri>http://www.cnblogs.com/guozhijian/</uri></author><link rel="alternate" href="http://www.cnblogs.com/guozhijian/archive/2008/03/14/1106512.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/guozhijian/archive/2008/03/14/1106512.html"/><content type="text">当我们需要实例化一个类的多个实例，并且实例化的代价比较昂贵的时候，可以使用原型模式。</content></entry><entry><id>http://www.cnblogs.com/guozhijian/archive/2008/03/09/1097752.html</id><title type="text">Core Design Patterns(7) Facade 外观模式</title><summary type="text">客户端代码需要与多个子系统进行交互，通常完成一个功能需要一系列复杂的请求。此时，可以提供一个外观类简化客户端代码的请求。外观模式为子系统提供不能的访问接口，并隐藏子系统的内部实现。</summary><published>2008-03-09T12:51:00Z</published><updated>2008-03-09T12:51:00Z</updated><author><name>Tristan(GuoZhijian)</name><uri>http://www.cnblogs.com/guozhijian/</uri></author><link rel="alternate" href="http://www.cnblogs.com/guozhijian/archive/2008/03/09/1097752.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/guozhijian/archive/2008/03/09/1097752.html"/><content type="text">客户端代码需要与多个子系统进行交互，通常完成一个功能需要一系列复杂的请求。此时，可以提供一个外观类简化客户端代码的请求。外观模式为子系统提供不能的访问接口，并隐藏子系统的内部实现。</content></entry></feed>
