100 likes | 107 Vues
Tuesday 20 April 2010. Design Patterns introduction. 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.
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