Design Patterns Flashcards
What is the difference between the Factory Pattern and the Abstract Factory Pattern?
Explain the Singleton Pattern. What are its pitfalls in a multi-threaded environment, and how do you make it thread-safe?
Can you walk me through how the Strategy Pattern works?
How Strategy Pattern compares to the State Pattern?
How would you implement the Observer Pattern, and where have you seen it used in real-world applications?
What is the Decorator Pattern?
What is Adapter Pattern?
What is Proxy Pattern?
What are the differences between Adapter, Decorator and Proxy?
What are the advantages of using the Builder Pattern over telescoping constructors or setters?
Can you describe a scenario where using the Command Pattern is appropriate? How does it support undo/redo functionality?
What is the difference between Composition and Inheritance in the context of design patterns? Which do design patterns prefer and why?