<table cellspacing="0" cellpadding="0" id="blogContentTable" style="line-height:28px; color:rgb(97,99,97); font-family:Calibri; font-size:16px; margin:0px; padding:0px; border-collapse:collapse; border-spacing:0px; table-layout:fixed; width:880px; position:inherit"><tbody style="margin:0px; padding:0px"><tr style="margin:0px; padding:0px"><td valign="top" style="margin:0px; padding:0px; word-wrap:break-word"><div id="blogContainer" style="margin:0px; padding:0px; position:inherit; overflow:hidden; height:6815px"><div id="paperTitleArea" align="center" style="line-height:25px; margin:0px; padding:0px"><span id="paperTitle" style="line-height:28px; margin:0px; padding:0px; display:block; word-break:break-all"/></div><div id="blogDetailDiv" style="margin:0px; padding:0px; min-height:380px"><div style="margin:0px; padding:0px"><div style="font-size:14px; line-height:25px; margin:0px; padding:0px"><br style="line-height:24px"/></div><span style="font-size:12pt; line-height:28px; margin:0px; padding:0px; font-family:SimSun"><strong>OOP基础。</strong></span><br style="line-height:24px"/><ol type="1" style="font-size:14px; line-height:24px; margin:0in 0px 0in 0.375in; padding:0px; direction:ltr; unicode-bidi:embed"><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt">OOP</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">有三大目标,重用性、灵活性和扩展性。</span><br/><ol type="a" style="margin:0in 0px 0in 0.375in; padding:0px; font-size:10.5pt; direction:ltr; unicode-bidi:embed"><ol type="1" style="line-height:28px; margin:0in 0px 0in 0.375in; padding:0px; direction:ltr; unicode-bidi:embed; font-size:12pt"><ol type="a" style="line-height:24px; margin:0in 0px 0in 0.375in; padding:0px; direction:ltr; unicode-bidi:embed; font-size:10.5pt"/></ol></ol></li><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt">OOP</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">有三大特性,封装、继承和多态。抽象虽然不是</span><span style="margin:0px; padding:0px; font-size:10.5pt">OOP</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">的编程特性,但它却是所有编程语言的最大特性。</span><br/><ol type="a" style="margin:0in 0px 0in 0.375in; padding:0px; font-size:10.5pt; direction:ltr; unicode-bidi:embed"><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-family:SimSun; font-size:10.5pt">封装,隐藏程序的属性和的实现细节,并控制属性的访问权限,对外仅提供接口。</span><br/><ol type="1" style="line-height:28px; margin:0in 0px 0in 0.375in; padding:0px; direction:ltr; unicode-bidi:embed; font-size:12pt"><ol type="a" style="line-height:24px; margin:0in 0px 0in 0.375in; padding:0px; direction:ltr; unicode-bidi:embed; font-size:10.5pt"><ol type="i" style="margin:0in 0px 0in 0.375in; padding:0px; direction:ltr; unicode-bidi:embed; font-size:10.5pt"/></ol></ol></li><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-family:SimSun; font-size:10.5pt">继承,是对基类的代码进行利用并扩展基类,是一个从一般到特殊的过程。</span><br/></li><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-family:SimSun; font-size:10.5pt">多态,运行时,根据对象的不同,同一接口,但是调用不同的实现方式来达到多态的特性。</span><br/></li><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-family:SimSun; font-size:10.5pt">抽象,将需要变化之处与不需要变化之处区分开来。抽象出来的类,不仅仅可能是一个事物,也可以是一组行为,凡是关联性比较强的都可以抽象为一个基类。</span><br/><ol type="1" style="line-height:28px; margin:0in 0px 0in 0.375in; padding:0px; direction:ltr; unicode-bidi:embed; font-size:12pt"><ol type="a" style="line-height:24px; margin:0in 0px 0in 0.375in; padding:0px; direction:ltr; unicode-bidi:embed; font-size:10.5pt"><ol type="i" style="margin:0in 0px 0in 0.375in; padding:0px; direction:ltr; unicode-bidi:embed; font-size:10.5pt"/></ol></ol><ol type="i" style="margin:0in 0px 0in 0.375in; padding:0px; direction:ltr; unicode-bidi:embed; font-size:10.5pt"/></li></ol></li></ol><span style="font-size:12pt; line-height:28px; margin:0px; padding:0px; font-family:SimSun"><strong>OOP</strong></span><span style="font-size:12pt; line-height:28px; margin:0px; padding:0px; font-family:SimSun"><strong>六大原则。</strong></span><br style="line-height:24px"/><ol type="1" style="font-size:12pt; line-height:28px; margin:0in 0px 0in 0.375in; padding:0px; direction:ltr; unicode-bidi:embed"><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="line-height:24px; margin:0px; padding:0px; font-family:SimSun; font-size:10.5pt">开闭原则,开放扩展,关闭修改。</span><br/></li><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="line-height:24px; margin:0px; padding:0px; font-family:SimSun; font-size:10.5pt">依赖倒置原则,高层和底层模块都依赖于抽象,也即面向接口编程。</span><br/></li><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="line-height:24px; margin:0px; padding:0px; font-family:SimSun; font-size:10.5pt">接口隔离原则,接口功能要单一,多个任务提供多个接口。</span><br/></li><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="line-height:24px; margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">合成</span><span style="line-height:24px; margin:0px; padding:0px; font-size:10.5pt">/</span><span style="line-height:24px; margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">聚合利用原则,能够用合成</span><span style="line-height:24px; margin:0px; padding:0px; font-size:10.5pt">/</span><span style="line-height:24px; margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">聚合的,就不要用继承。</span><br/></li><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="line-height:24px; margin:0px; padding:0px; font-family:SimSun; font-size:10.5pt">迪米特法则,也称最小知道原则,尽可能少的与其他类有耦合关系,有的时候可以用前向声明。</span><br/></li><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="line-height:24px; margin:0px; padding:0px; font-family:SimSun; font-size:10.5pt">单一职责原则,一个类只有一个引起它变化的原因,如一个“清洁”类,别吃饭时也引起“清洁”类响应。</span><br/></li><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="line-height:24px; margin:0px; padding:0px; font-family:SimSun; font-size:10.5pt">里氏替换原则,子类不覆盖父类方法,做到子类对象完全可以替换父类对象。</span><br/><ol type="a" style="line-height:24px; margin:0in 0px 0in 0.375in; padding:0px; direction:ltr; unicode-bidi:embed; font-size:10.5pt"/></li></ol><p style="font-size:10.5pt; line-height:24px; margin:0in 0in 0in 0.75in; padding-top:0px; padding-bottom:0px"/><ul style="font-size:14px; line-height:24px; margin:1em 0px; padding:0px"><li style="margin:0px 0px 0px 40px; padding:0px; list-style:disc"><span style="margin:0px; padding:0px; font-style:italic"> (</span><span style="margin:0px; padding:0px; font-family:SimSun"><em>个人觉得里氏替换原则可以不太用考虑,实际设计中,子类想完全替换父类还是有一定的困难的。</em></span><span style="margin:0px; padding:0px; font-style:italic">)</span></li></ul><span style="font-size:14px; line-height:24px; margin:0px; padding:0px; font-style:italic"><span style="margin:0px; padding:0px; font-weight:bold"> </span></span><span style="font-size:12pt; line-height:28px; margin:0px; padding:0px; font-family:SimSun"><strong>常用设计模式。</strong></span><blockquote style="margin:0px 0px 0px 40px; padding:0px; border:none"><blockquote style="margin:0px 0px 0px 40px; padding:0px; border:none"><blockquote style="font-size:1em; line-height:24px; margin:0px 0px 0px 40px; padding:0px; border:none"/><ol style="margin:1em 0px; padding:0px"><li style="font-size:1em; line-height:24px; margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun"><strong>简单工厂模式</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">,有一个提供接口的抽象类,然后实现不同功能的子类去实现抽象类,最后一个简单工厂类来完成对不同子类的创建。</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun; color:rgb(55,86,35)"><strong>创建型模式。</strong></span><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/3892f1cffbfc015a0ff878fb966e5e4e.jpg" style="border:0px; max-width:100%"/></li><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px"><strong>工厂方法模式</strong></span><span style="font-size:10.5pt; line-height:24px; margin:0px; padding:0px; color:rgb(55,86,35); font-family:SimSun">,</span><span style="margin:0px; padding:0px">定义一个用于创建对象的接口,让子类决定实例化哪一个类。定义一个抽象工厂类,每一个产品,按照抽象工厂的基本要求新建一个工厂来生产新的产品</span><span style="font-size:10.5pt; line-height:24px; margin:0px; padding:0px; color:rgb(55,86,35); font-family:SimSun">。</span><span style="font-size:10.5pt; line-height:24px; margin:0px; padding:0px; color:rgb(55,86,35); font-family:SimSun"><strong>创建型模式。</strong></span><span style="font-size:1em; line-height:24px"><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/df7ae2061479afb009bcbaba9678d0e0.jpg" style="border:0px; max-width:100%"/></span></li><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="font-size:10.5pt; line-height:24px; margin:0px; padding:0px; font-family:SimSun; color:rgb(55,86,35)"><strong><span style="margin:0px; padding:0px; font-size:10.5pt"><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:Calibri"> </span></span></strong></span><span style="margin:0px; padding:0px"><strong>单例模式</strong></span><span style="margin:0px; padding:0px"><span style="font-family:SimSun; color:#375623"><span style="font-size:10.5pt; line-height:24px">,</span></span>保证一个类只有一个实例,并提供一个全局访问点<span style="font-family:SimSun; color:#375623"><span style="font-size:10.5pt; line-height:24px">。</span></span></span><span style="font-size:10.5pt; line-height:24px; margin:0px; padding:0px; color:rgb(55,86,35); font-family:SimSun"><strong>创建型模式。</strong></span><span style="font-size:10.5pt; line-height:24px; margin:0px; padding:0px"><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/0b0a15a0b7db7b4838a4a1fcf93ba2e1.jpg" style="border:0px; max-width:100%"/> </span><span style="font-size:10.5pt; line-height:24px; margin:0px; padding:0px"> </span></li><li style="font-size:1em; line-height:24px; margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun"><strong>装饰者模式</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">,动态地给一个对象添加一些职责。就扩展功能而言,装饰者模式比继承更加灵活。</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun; color:rgb(0,112,192)"><strong>结构型模式。</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt"><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/b720c8e819a11856f05b67897d16c2c5.jpg" style="border:0px; max-width:100%"/> </span><span style="margin:0px; padding:0px"> </span></li><li style="font-size:1em; line-height:24px; margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt"/><span style="margin:0px; padding:0px; font-size:10.5pt"><strong>代理模式</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt">,为其他对象提供一种代理以控制对这个对象的访问。</span><span style="margin:0px; padding:0px; font-size:10.5pt; color:rgb(0,112,192)"><strong>结构型模式。</strong></span><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/27fe3179839365cfa3d1dee2beccbe22.jpg" style="border:0px; max-width:100%"/></li><li style="font-size:1em; line-height:24px; margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun"><strong>适配器模式</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">,将一个类的接口,转换成客户期望的另一个接口。适配器模式让原本由于接口不兼容而不能一起工作的类可以一起工作。</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun; color:rgb(0,112,192)"><strong>结构型模式。</strong></span><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/98d82e7920b97c670b09b9e4733c9aad.jpg" style="border:0px; max-width:100%"/></li><li style="font-size:1em; line-height:24px; margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun; color:rgb(0,112,192)"><strong><span style="margin:0px; padding:0px; font-size:10.5pt"><em/></span></strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun; color:rgb(0,112,192)"><strong><span style="margin:0px; padding:0px; font-size:10.5pt"><em/></span></strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun"><strong>组合模式</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">,将对象组合成树形结构以表示“部分—整体”的层次结构。组合模式能够让客户以一致的方式处理个别对象以及对象组合。</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun; color:rgb(0,112,192)"><strong>结构型模式。</strong></span><span style="margin:0px; padding:0px"><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/78715e72e70c9bb56576ccde3f0cf81d.jpg" style="border:0px; max-width:100%"/> </span></li><li style="font-size:1em; line-height:24px; margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun"><strong>命令模式</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">,将一个请求封装成一个对象,从而可以用不同的请求、队列或者日志对客户进行参数化。命令模式也支持可撤销的操作。</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun; color:rgb(232,76,34)"><strong>对象行为型模式。</strong></span><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/abbbc599ee3adfe5c242a8c1ed2cf391.jpg" style="border:0px; max-width:100%"/></li><li style="font-size:1em; line-height:24px; margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun; color:rgb(232,76,34)"><strong> </strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun"><strong>模板方法模式</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">,定义一个操作中的算法骨架,而将一些步骤延迟到子类中。模板方法可以不改变改变一个算法的结构即可以重定义该算法的某些特定步骤。</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun; color:rgb(232,76,34)"><strong>类行为型模式。</strong></span><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/021164fe65dc2b072a3c68b25d2d80d5.jpg" style="border:0px; max-width:100%"/></li><li style="font-size:1em; line-height:24px; margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun"><strong>迭代器模式</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">,提供一种方法顺序访问一个聚合对象中的各个元素,而又不暴露其内部的表示。</span><span style="margin:0px; padding:0px; color:rgb(232,76,34); font-family:SimSun"><strong>对象行为型</strong></span><span style="margin:0px; padding:0px; color:rgb(232,76,34); font-family:SimSun"><strong>模式。</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun"><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/3a14f68528ab1287077c7de5202ec3f5.jpg" style="border:0px; max-width:100%"/><br/> </span></li><li style="font-size:1em; line-height:24px; margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun"><span style="margin:0px; padding:0px"/></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun"><strong>状态模式</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">,允许对象在内部状态改变时改变它的行为,对象看起来似乎修改了它的类。</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun; color:rgb(232,76,34)"><strong>对象行为型模式。</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun; color:rgb(232,76,34)"><strong/></span><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/78c7748b2b3ad264f0bce3936f1f512c.jpg" style="border:0px; max-width:100%"/></li><li style="font-size:1em; line-height:24px; margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun"><strong>策略模式</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">,定义一系列算法,分别封装起来,让它们可以互相替换。此模式让算法的变化可以独立于使用算法的客户。</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun; color:rgb(232,76,34)"><strong>对象行为型模式。</strong></span><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/d5d819ecdde6a4d5d3c330efee5eb7ec.jpg" style="border:0px; max-width:100%"/></li><li style="font-size:1em; line-height:24px; margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun"><strong>观察者模式</strong></span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">,定义了对象之间一对多的依赖关系,当一个对象发生改变时,它的所有依赖者都会收到通知并自动更新。</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun; color:rgb(232,76,34)"><strong>对象行为型模式。</strong></span><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/6f8b1bd80c6064bfb7d213ffe87a6e75.jpg" style="border:0px; max-width:100%"/></li></ol><span style="font-size:10.5pt; line-height:24px; margin:0px; padding:0px; color:rgb(232,76,34)"><strong>P.S.</strong></span><br/><blockquote style="font-size:1em; line-height:24px; margin:0px 0px 0px 40px; padding:0px; border:none"/><ol style="font-size:1em; line-height:24px; margin:1em 0px; padding:0px"><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">模块化,主要指以功能来划分的。模块化主要遵循高内聚低耦合,也即职责单一。</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">卡内基.梅隆大学的RobertHarper教授,“面向对象编程应该完全的从基础课程中删除掉,因为它既是反模块化,又是反并行的,这是它的非常固有的特征,所以它不适合作为一种现代的计算机科学课程。”可以模块化和并行在现代程序设计中的重要性是高于</span><span style="margin:0px; padding:0px; font-size:10.5pt">OOD</span><span style="margin:0px; padding:0px; font-size:10.5pt; font-family:SimSun">的一些原则的。</span></li><li style="margin:0px 0px 0px 40px; padding:0px; list-style:decimal"><span style="line-height:22px; margin:0px; padding:0px; color:rgb(84,84,84); font-family:微软雅黑,Tohoma; font-size:10.5pt">MVC(</span><span style="line-height:22px; margin:0px; padding:0px; color:rgb(84,84,84); font-size:10.5pt; font-family:SimSun">Model View Controller</span><span style="line-height:22px; margin:0px; padding:0px; color:rgb(84,84,84); font-family:微软雅黑,Tohoma; font-size:10.5pt">)</span><span style="line-height:22px; margin:0px; padding:0px; color:rgb(84,84,84); font-size:10.5pt; font-family:SimSun">,能够将</span><span style="line-height:22px; margin:0px; padding:0px; color:rgb(84,84,84); font-family:微软雅黑,Tohoma; font-size:10.5pt">UI</span><span style="line-height:22px; margin:0px; padding:0px; color:rgb(84,84,84); font-size:10.5pt; font-family:SimSun">和数据以及对数据处理的逻辑分开,降低耦合。在《</span><span style="line-height:22px; margin:0px; padding:0px; color:rgb(84,84,84); font-family:微软雅黑,Tohoma; font-size:10.5pt">Head</span><span style="line-height:22px; margin:0px; padding:0px; color:rgb(84,84,84); font-size:10.5pt; font-family:SimSun"> First</span><span style="line-height:22px; margin:0px; padding:0px; color:rgb(84,84,84); font-size:10.5pt; font-family:SimSun">设计模式》中,将</span><span style="line-height:22px; margin:0px; padding:0px; color:rgb(84,84,84); font-size:10.5pt; font-family:SimSun">MVC</span><span style="line-height:22px; margin:0px; padding:0px; color:rgb(84,84,84); font-size:10.5pt; font-family:SimSun">列为复合模式,是模式的模式,是因为</span><span style="line-height:22px; margin:0px; padding:0px; color:rgb(84,84,84); font-size:10.5pt; font-family:SimSun">MVC</span><span style="line-height:22px; margin:0px; padding:0px; color:rgb(84,84,84); font-size:10.5pt; font-family:SimSun">会使用到多个模式。</span><img alt="设计模式总结 - 飞鹤 - 飞鹤的成长历程" src="image/fd87efc05a6e6952ccb464c782e5813a.jpg" style="border:0px; max-width:100%"/></li></ol></blockquote></blockquote></div></div></div></td></tr></tbody></table>
- 前言
- 设计模式六大原则
- 1——创建型模式之简单工厂模式
- 2——创建型模式之工厂方法模式
- 3——创建型模式之抽象工厂模式
- 4——创建型模式之单例模式
- 5——创建型模式之建造者模式
- 6——创建型模式之原型模式
- 7——结构型模式之适配器模式
- 8——结构型模式之桥接模式
- 9——结构型模式之组合模式
- 10——结构型模式之装饰者模式
- 11——结构型模式之外观模式
- 12——结构型模式之享元模式
- 13——结构型模式之代理模式
- 14——行为型模式之职责链模式
- 15——行为型模式之命令模式
- 16——行为型模式之解释器模式
- 17——行为型模式之迭代器模式
- 18——行为型模式之中介者模式
- 19——行为型模式之备忘录模式
- 20——行为型模式之观察者模式
- 21——行为型模式之状态模式
- 22——行为型模式之策略模式
- 23——行为型模式之模板方法模型
- 24——行为型模式之访问者模式
- 设计模式总结