100 likes | 124 Views
Discover the world of design patterns with a focus on the Factory Method pattern. Learn about the history of design patterns, key concepts, and practical applications through engaging examples and exercises. Dive into the fascinating story of Eddies Diner and explore UML from a general perspective. Enhance your programming skills by implementing the Factory Method pattern for creating dice with different sides for Viking Game and Monopoly. Get ready to elevate your software design expertise!
E N D
Tuesday 20 April 2010 Design Patternsintroduction
Today’s highlight’s • Design Patterns in general • History • Design Patterns more specific • Factory Method
History of Design Patterns • Christopher Alexander 1977 (a pattern language) • Sitting Circle
History II • Gang of Four 1994 (Design Patterns - Elements of Reusable Object-Oriented Software ) • Defines 23 Design Patterns (named GoF Patterns)
Definition • From Wiki: • a general reusable solution to a commonly occurring problem in software design
Programming • Let’s take a look at the code
Exercise • The Die Factory • Viking Game needs a die of 4 sides • Monopoly needs a die with 6 sides • Create the system using Factory Method design pattern