Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Chicago Information Technology Architects Group - Design Patterns


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Chicago Information Technology Architects Group - Design Patterns

  1. 1. Design Patterns in Java and .NET<br />Tim Murphy<br />Technical Specialist<br />Mike Vogt<br />Vice President of Architecture<br />
  2. 2. Objective<br />Show the usefulness of Design Patterns when developing applications and how they apply no matter what the platform.<br />
  3. 3. Agenda<br />History of patterns<br />What are patterns<br />Why are patterns important<br />Explore 6 common patterns<br />Anti-Patterns<br />
  4. 4. History Of Patterns<br />Gang Of Four<br />POSA – Patterns of Software Architecture<br />Patterns of Enterprise Application Architecture<br />
  5. 5. What Are Patterns<br />Pattern Name<br />Problem<br />Solution<br />Consequences<br />
  6. 6. Why Are Patterns Important<br />Common vocabulary<br />Repositories of common solutions<br />
  7. 7. Factory Method Pattern<br />Method for object creation<br />Lets subclasses decide which classes to create<br />
  8. 8. Decorator Pattern<br />Attach additional responsibilities to an object dynamically<br />Allows behavior to be added via “wrappers”<br />Avoids extensive inheritance hierarchies<br />cost()<br /> Whip<br />cost()<br /> Mocha<br />cost()<br />DarkRoast<br />
  9. 9. Adapter Pattern<br />Allows a system to use methods that do not match their interface<br />
  10. 10. Visitor Pattern<br />A way of separating an algorithm from an object structure it operates on.<br />One can add new operations to existing object structures without modifying those structures<br /><<interface>><br />CarElement<br />+ accept(CarElementVisitor v)<br />Wheel<br />Engine<br />Body<br />Car<br />
  11. 11. Strategy Pattern<br />Interchangeable algorithms<br />
  12. 12. Composite Pattern<br />Allows you to compose objects into tree structures to represent whole-part hierarchies.<br />Lets clients treat individual objects and compositions of objects uniformly.<br /><<interface>><br />Component<br />+ operation<br />+ add(Component c)<br />+ remove(Component c)<br />+ getChild(inti)<br />Node<br />Client<br />Leaf<br />Leaf<br />Leaf<br />Composite<br />add, remove, getChild, operation<br />Leaf<br />+ operation()<br />
  13. 13. Anit-Patterns<br />One pattern to rule them all<br />Loosey Goosey<br />
  14. 14. ResourcesDesign Patterns: Elements of Reusable Object-Oriented Software – Erich Gamma, Richard Helm, Ralph Johnson, and John VlissidesHead First Design Patterns – Eric Freeman and Elisabeth FreemanDesign Patterns In C# - Steven John Metsker<br />
  15. 15. Thank You!Blogs – -tmurphy@psclistens.commvogt@psclistens.comTwitter –@twmurph@mvogt99PSC’s<br />