Topics Covered Today 2. 3 Advanced Class design 2.3. 4 Design Patterns 23.5 Singleton Pattern 2.3.6 Strategy Pattern
2 Topics Covered Today • 2.3 Advanced Class Design – 2.3.4 Design Patterns – 2.3.5 Singleton Pattern – 2.3.6 Strategy Pattern
Reference > ISBN0-201-63361-2 >机械工 业出版社 > ISBN7-5641-0165-2
3 Reference • > – ISBN 0-201-63361-2 – >机械工 业出版社 • > – > ISBN: 7-5641-0165-2
History Patterns originated as an architectural concept by Christopher alexander The Timeless Way of Building 《建筑的永恒之道》
4 History • Patterns originated as an architectural concept by Christopher Alexander. • The Timeless Way of Building – 《建筑的永恒之道》
Alexander's pattern Patterns describe a solution so that it can be applied many times without ever being the same
7 Alexander’s Pattern.. • Patterns describe a solution so that it can be applied many times without ever being the same
History experimenting with the idea of applying patterm Y In 1980S, Kent Beck and Ward Cunningham bega to programming
8 History • In 1980s, Kent Beck and Ward Cunningham began experimenting with the idea of applying patterns to programming
Histor Design patterns gained popularity in computer science after the Design patterns book Elements of Reusable Object-Oriented Software > Erich gamma. Richard helm Foreword by Grady Booch Ralph Johnson, and John Vlissides( gang of four or goF was published in 1994
9 History • Design patterns gained popularity in computer science after the book > by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (Gang of Four or GoF) was published in 1994
Design pattern Design patterns describe practical solutions to common design problems that occur repeatedly in software development a design pattern description consists of Pattern name a description of the problem that the pattern addresses a description of the solution(for instance: class structure) a discussion of the consequences of using the pattern
10 Design Pattern • Design patterns describe practical solutions to common design problems that occur repeatedly in software development. • A design pattern description consists of: – Pattern name – A description of the problem that the pattern addresses – A description of the solution (for instance: class structure) – A discussion of the consequences of using the pattern