• <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>
            春暖花開(kāi)
            雪化了,花開(kāi)了,春天來(lái)了
            posts - 149,comments - 125,trackbacks - 0

            設(shè)計(jì)模式學(xué)習(xí)筆記

            最近利用早晨的大好時(shí)光,學(xué)習(xí)了一下設(shè)計(jì)模式,同時(shí)學(xué)習(xí)了英語(yǔ)。目前一共學(xué)習(xí)了八種模式:

            一、             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.

             

            在這上述的八個(gè)模式中,包含了設(shè)計(jì)模式的三種類(lèi)型:創(chuàng)建型模式,結(jié)構(gòu)型模式,行為模式。其中FactoryAbstract FactorySingleton為創(chuàng)建型模式,DecoratorAdapterFacade為結(jié)構(gòu)型模式,其余的CommandObserver為行為模式。

            不過(guò),感覺(jué)有時(shí)侯理解的特別清楚,但過(guò)一段時(shí)間就忘了。所以一定要將其用起來(lái),才能對(duì)其有深深的體會(huì),不會(huì)就是死的知識(shí)。一定要讓其活起來(lái)。

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

            posted on 2009-07-21 18:11 Sandy 閱讀(378) 評(píng)論(0)  編輯 收藏 引用 所屬分類(lèi): 設(shè)計(jì)模式
            72种姿势欧美久久久久大黄蕉| 99久久无色码中文字幕| 久久亚洲熟女cc98cm| 伊人久久大香线蕉精品不卡| 久久亚洲春色中文字幕久久久| 狠狠色丁香婷综合久久| 无码任你躁久久久久久老妇| 久久综合给久久狠狠97色| 久久93精品国产91久久综合| 亚洲中文字幕无码久久综合网 | 久久午夜伦鲁片免费无码| 99久久99这里只有免费的精品| 色偷偷91久久综合噜噜噜噜| 99久久久精品| 囯产极品美女高潮无套久久久 | 久久久久久久久久久精品尤物| 精品久久久久久亚洲精品| 色婷婷综合久久久久中文字幕 | 蜜臀av性久久久久蜜臀aⅴ麻豆 | 欧美久久一级内射wwwwww.| 国产韩国精品一区二区三区久久| 思思久久好好热精品国产| 97久久精品人人做人人爽| 中文字幕无码精品亚洲资源网久久| 精品无码人妻久久久久久| 久久97精品久久久久久久不卡| 久久99久国产麻精品66| 久久久久亚洲AV成人网人人软件| 国产精品久久久久无码av| 久久婷婷国产综合精品| 久久夜色精品国产亚洲| 亚洲国产天堂久久久久久| 久久亚洲欧洲国产综合| 久久国产福利免费| 国产精品久久久久久久午夜片| 久久r热这里有精品视频| 国产精品久久久久9999| 久久精品国产69国产精品亚洲| 成人资源影音先锋久久资源网| 久久精品毛片免费观看| 激情伊人五月天久久综合|