Software Architecture: Design Patterns
More Design Patterns articles:
- Creational Patterns (Singleton, Factory, Builder, Prototype, Abstract Factory)
- Design Patterns Catalog
- Design Patterns Overview
This article is a conceptual guide to Design Patterns — including exam questions, core components, and key topics.
In a Nutshell
Design Patterns are reusable solutions to common problems in object-oriented software development. They improve structure, maintainability, and team communication.
Compact Definition
The Gang of Four patterns typically fall into three categories:
- Creational Patterns (e.g., Singleton, Factory)
- Structural Patterns (e.g., Adapter, Facade, Proxy)
- Behavioral Patterns (e.g., Observer, Strategy, Command)
Patterns are not ready-made classes but conceptual solutions that apply across many programming languages. They establish a shared vocabulary within teams.
Exam-Relevant Highlights
- Categories: Creation, Structure, Behavior
- Reusable solutions
- Decoupling and extensibility
- Practical relevance (Java, C#, Python)
- Security: e.g., Singleton for centralized access control
- Cost efficiency: reduced development time
- Documentation: pattern justification and diagrams
Core Components (Examples)
- Singleton
- Factory Method
- Observer
- Adapter
- Strategy
- Decorator
- Proxy
- Command
- Facade
- Builder
Practical Example (Singleton in Python)
class Logger:
_instance = None
def __new__(cls):
if cls._instance is None:
cls._instance = super().__new__(cls)
return cls._instance
Advantages and Disadvantages
Advantages
- Proven solutions
- Unified language within teams
- Loose coupling
- Better maintainability
Disadvantages
- Misapplication increases complexity
- Overengineering for small problems
Common Exam Questions (with Brief Answers)
- What is a design pattern? A proven template for solving a recurring design problem.
- What are the main categories? Creational, Structural, and Behavioral patterns.
- What defines the Singleton pattern? Ensures exactly one instance per application context.
- When do you use Observer? When multiple objects need to react to state changes.
Open-Ended Answer
Patterns work best when they solve a concrete problem. Use them in project documentation to demonstrate structured design — but avoid pattern overuse.
Learning Strategy
- Master 3–5 patterns and understand their roles.
- Implement 2 patterns yourself.
- Practice explaining use cases and benefits in 5 sentences.
- Apply patterns only when you have a genuine need.
Topic Analysis
- Core: Design Patterns
- Challenges: Roles and overhead
- Security: Access control
- Documentation: Pattern justification
- Cost Efficiency: Code reuse
Further Reading
Recommended Resources: Design Patterns
Design Patterns
Books about design patterns and software design
Design Patterns von Gang of Four
Bei Amazon ansehenAffiliate-Link: Bei einem Kauf erhalten wir möglicherweise eine Provision.
Patterns of Enterprise Application Architecture von Martin Fowler
Bei Amazon ansehenAffiliate-Link: Bei einem Kauf erhalten wir möglicherweise eine Provision.
Refactoring von Martin Fowler
Bei Amazon ansehenAffiliate-Link: Bei einem Kauf erhalten wir möglicherweise eine Provision.





