• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            春暖花開
            雪化了,花開了,春天來了
            posts - 149,comments - 125,trackbacks - 0

            設計模式學習筆記

            最近利用早晨的大好時光,學習了一下設計模式,同時學習了英語。目前一共學習了八種模式:

            一、             The Observer Pattern

            It defines a one to many relationship between a set of objects. When the state of one object changes, all of its dependents are notified.

            二、             The Decorator Pattern

            It attaches additional responsibilities to an object dynamically.Decorators provide a flexible alternative to subclassing for extending functionality.

            三、             The Factory Pattern

            It defines an interface for creating an object, but lets subclasses decide which class to instantiate. Factory method lets a class defer instantiation to subclass.

            四、             The Abstract Pattern

            It provides an interface for creating families of related or dependent objects without specifying their concrete classes.

            五、             The Singleton Pattern

            It ensures a class has only one instance, and provides a global point of access to it.

            六、             The Command Pattern

            It encapsulates a request as an object, thereby letting you parameterize other objects with different requests, queue or log requests, and support undoable operations.

            七、             The Adapter Pattern

            It converts the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn’t otherwise because of  imcompatible interface.

            八、             The Façade Pattern

            It provides a unified interface to a set of interfaces in a subsystem. Façade defines a higher-level interface that makes the subsystem easier to use.

             

            在這上述的八個模式中,包含了設計模式的三種類型:創建型模式,結構型模式,行為模式。其中FactoryAbstract FactorySingleton為創建型模式,DecoratorAdapterFacade為結構型模式,其余的CommandObserver為行為模式。

            不過,感覺有時侯理解的特別清楚,但過一段時間就忘了。所以一定要將其用起來,才能對其有深深的體會,不會就是死的知識。一定要讓其活起來。

            呵呵,又看了一些蝸牛的家寫的設計模式趣解,反而更有助于理解呦,不妨看看。鏈接地址為:http://www.shnenglu.com/bangle/archive/2008/08/23/59725.html

            posted on 2009-07-21 18:11 Sandy 閱讀(383) 評論(0)  編輯 收藏 引用 所屬分類: 設計模式
            三级韩国一区久久二区综合| 久久久国产打桩机| 99精品伊人久久久大香线蕉| 老司机午夜网站国内精品久久久久久久久 | 久久综合狠狠综合久久综合88 | 亚洲午夜精品久久久久久浪潮| 狠狠色丁香久久婷婷综合蜜芽五月| 久久久久久综合网天天| 久久免费小视频| 久久精品综合网| 亚洲综合婷婷久久| 精品久久久久久无码专区| 久久精品亚洲福利| 久久精品国产99国产精品澳门| 色综合合久久天天给综看| 97精品伊人久久大香线蕉app| 伊人久久精品影院| 国产免费久久精品丫丫| 国产高潮国产高潮久久久| 国产aⅴ激情无码久久| 久久婷婷五月综合97色直播| 国产精品天天影视久久综合网| 一本色道久久88综合日韩精品| 久久精品国产亚洲沈樵| 国内精品久久久人妻中文字幕| 日韩人妻无码一区二区三区久久99| 伊人久久大香线蕉精品| 国产综合久久久久久鬼色| 亚洲AV无码成人网站久久精品大| 日本精品久久久久影院日本| 久久www免费人成精品香蕉| 久久久91精品国产一区二区三区 | 免费国产99久久久香蕉| 国内精品久久久久| 99久久99久久精品免费看蜜桃| 亚洲国产另类久久久精品小说| 久久99热这里只频精品6| 精品久久久久成人码免费动漫| 亚洲精品NV久久久久久久久久| 亚洲欧美久久久久9999| 久久频这里精品99香蕉久|