Download presentation
Presentation is loading. Please wait.
Published byKerry Mitchell Modified over 9 years ago
1
What to know for the exam
2
Smalltalk will be used for questions, but there will not be questions about the grammar. Questions might ask – how particular patterns are different for Smalltalk – How to program a pattern in Smalltalk – How to program basic OO problem – questions that assume general knowledge of basic classes like collections or streams
3
Kent Beck patterns Composed method Complete creation method Conversion method Query method Intention revealing message Double dispatch
4
Core patterns Mediator Façade Proxy Command Template Method Adapter Null Object Composite Strategy Decorator State Iterator Observer Value Object
5
Creational Abstract factory (peripheral) Factory method Prototype Builder Singleton Dependency Injection
6
Peripheral Memento Chain of responsibility Bridge Visitor Type Object Extension Object Generation Gap
7
Compound Flyweight – To save space, factor out a Value Object, and create them using a Memoizing Factory that records the flyweight pool. Interpreter – Represent a program with a Composite, and let the class hierarchy match the grammar of the language. Define an “ interpret ” method in each class.
8
Dangerous Patterns Mediator – Supposed to be used to allow colleagues to be reusable. Is often used to allow programmers to continue to be procedural. Singleton – Supposed to be used to encapsulate global state when it cannot be eliminated. Is often used as a justification of global state.
9
Principles Single responsibility principle Open/closed principle Liskov substitution principle Dependency inversion principle
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.