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 concept 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.
Core Definition
The GoF patterns are typically grouped into three categories:
- Creational patterns (e.g., Singleton, Factory)
- Structural patterns (e.g., Adapter, Facade, Proxy)
- Behavioral patterns (e.g., Observer, Strategy, Command)
Patterns aren’t finished classes—they’re concepts that apply across many programming languages. They establish a shared vocabulary within a team.
Exam-Relevant Highlights
- Categories: creation, structure, behavior
- Reusable solutions
- Decoupling and extensibility
- Practical use (Java, C#, Python)
- Security: e.g., Singleton for centralized access control
- Cost efficiency: reduced development time
- Documentation: pattern choice + 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
Strengths and Weaknesses
Strengths
- Proven solutions
- Common language across the team
- Decoupling
- Better maintainability
Weaknesses
- Misapplication introduces complexity
- Overengineering for small problems
Common Exam Questions (With Short Answers)
- What is a Design Pattern? A proven template for solving a recurring design problem.
- What categories exist? Creational, structural, and behavioral patterns.
- What defines Singleton? Exactly one instance per application context.
- When do you use Observer? When multiple objects need to react to state changes.
Open-Ended Response
Patterns are worthwhile when they solve a concrete problem. In project documentation, you can use them to demonstrate structured design—but avoid pattern overuse.
Learning Strategy
- Learn 3–5 patterns and understand their roles.
- Implement 2 patterns yourself.
- Practice explaining usage and benefits in 5 lines.
- Apply patterns only when there’s a genuine need.
Topic Analysis
- Core: design patterns
- Challenges: roles and overhead
- Security: access control
- Documentation: pattern justification
- Cost efficiency: reusability
Further Resources
Recommended Reading: 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.





