Prototype Design Pattern

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Prototype Design Pattern - Presentation Transcript

    1. From Design Patterns (Gamma et al)‏ Presented by David Kemp Melbourne Patterns Group
    2. Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype. Design Patterns, Gamma et al, Chapter 4.
    3.  
    4. Creational Patterns
      • Abstract Factory
      • Builder
      • Factory Method
      • Prototype
      • Singleton
    5.  
    6. Image from Flickr by Bob Henry Photography (http://flickr.com/photos/bobasonic/170043435/)‏ Some rights reserved (http://creativecommons.org/licenses/by-nc-sa/2.0/deed.en)‏
      • Alternative to Factory Method and Abstract Factory.
      • Can be used to implement Abstract Factory.
      • To avoid building a class hierarchy of factories.
      • Can be used when loading classes dynamically
      • Often can use class objects instead.
    7. Image from Flickr by Slowburn / Andreas Schaefer ( http://flickr.com/photos/slowburn/70150248/ )‏ Some rights reserved (http://creativecommons.org/licenses/by-nc-sa/2.0/deed.en)‏
      • Add/Remove prototypes at runtime.
      • Specify new prototypes by varying data.
      • Specify new prototypes by varying structure.
      • Less classes (less sub-classing!)‏
      • Dynamic class loading.
    8. Discussion
      • Factory Method: delegate to subclasses.
      • AbstractFactory, Builder, and Prototype: delegate to another class.
      • Prototype: reduces the total number of classes.
      • Builder: Good when construction logic is complex.
    SlideShare Zeitgeist 2009

    + melbournepatternsmelbournepatterns Nominate

    custom

    426 views, 0 favs, 1 embeds more stats

    Talk given at the Melbourne Patterns Group Meeting more

    More info about this document

    CC Attribution-NoDerivs LicenseCC Attribution-NoDerivs License

    Go to text version

    • Total Views 426
      • 406 on SlideShare
      • 20 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 9
    Most viewed embeds
    • 20 views on http://melbournepatterns.org

    more

    All embeds
    • 20 views on http://melbournepatterns.org

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories