﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-&amp;豪-随笔分类-DesignPattern</title><link>http://www.cppblog.com/qywyh/category/5609.html</link><description>豪-&gt;blog</description><language>zh-cn</language><lastBuildDate>Wed, 21 May 2008 06:44:29 GMT</lastBuildDate><pubDate>Wed, 21 May 2008 06:44:29 GMT</pubDate><ttl>60</ttl><item><title>Design Patterns (notes)</title><link>http://www.cppblog.com/qywyh/archive/2007/11/22/37124.html</link><dc:creator>豪</dc:creator><author>豪</author><pubDate>Thu, 22 Nov 2007 04:26:00 GMT</pubDate><guid>http://www.cppblog.com/qywyh/archive/2007/11/22/37124.html</guid><wfw:comment>http://www.cppblog.com/qywyh/comments/37124.html</wfw:comment><comments>http://www.cppblog.com/qywyh/archive/2007/11/22/37124.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/qywyh/comments/commentRss/37124.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/qywyh/services/trackbacks/37124.html</trackback:ping><description><![CDATA[<p><span style="COLOR: red" twffan="done">The Strategy Pattern<br></span>Defines a family of algorithms, encapsulates each one, and makes them interchangeable.<br>Strategy lets the algorithm vary independently from clients that use it.<br><br><span style="COLOR: red" twffan="done">Observer Pattern</span><br>Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.<br><br><span style="COLOR: red" twffan="done">Decorator Pattern<br></span>Attach additional responsibilities to an object dynamically.<br>Decorators provide a flexible alternative to subclassing for extending functionality.</p>
<span style="COLOR: red" twffan="done">
<p><br>Factory Pattern<br><span style="COLOR: #000000" twffan="done">Abstract Factory<br>Provide an interface for creating families of related or dependent objects without specifying their concrete classes.<br>Factory Method<br>Define an interface for creating an object, but let subclasses decide which class to instantiate.<br>Factory Pattern lets a class defer instantiation to the subclasses.</span></p>
<p>Singleton<br><span style="COLOR: #000000" twffan="done">Ensure a class only has one instance and provide a global point of access to it.</span></span></p>
<p><br><span style="COLOR: red">The Command Pattern</span><br>encapsulates a request as an object, thereby letting you parameterize other objects with different requests, queue or log requests, and support undoable operations.<br></p>
<p><span style="COLOR: red">The adapter pattern</span><br>Adapter Converts the interface of a class into aniother interface clients expect. Lets classes work together that couldnt otherwise because of incompatible interfaces.<br>Facade Provides a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.</p>
<img src ="http://www.cppblog.com/qywyh/aggbug/37124.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/qywyh/" target="_blank">豪</a> 2007-11-22 12:26 <a href="http://www.cppblog.com/qywyh/archive/2007/11/22/37124.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>