Explain it in 60 seconds
The decorator pattern
Backend Engineering · OOP and Design Patterns · Beginner
What is the decorator pattern?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Wraps object to add behaviour, same interface.
- Stackable layers.
- e.g. caching, logging, retries around a client.
- Alternative to subclassing.
- Single responsibility per layer.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.