0
0
LLDsystem_design~5 mins

When to use which structural pattern in LLD - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the main purpose of the Adapter pattern?
The Adapter pattern helps two incompatible interfaces work together by converting one interface into another expected by the client.
Click to reveal answer
beginner
When should you use the Composite pattern?
Use the Composite pattern when you want to treat individual objects and compositions of objects uniformly, like a tree structure of parts and wholes.
Click to reveal answer
intermediate
What problem does the Proxy pattern solve?
The Proxy pattern controls access to an object, adding a placeholder that can add security, lazy loading, or logging before forwarding requests.
Click to reveal answer
intermediate
When is the Decorator pattern useful?
Use the Decorator pattern to add responsibilities to objects dynamically without changing their class, like adding features to a window or text.
Click to reveal answer
beginner
Why choose the Facade pattern?
The Facade pattern provides a simple interface to a complex subsystem, making it easier for clients to use without knowing all details.
Click to reveal answer
Which structural pattern would you use to allow incompatible interfaces to work together?
AFacade
BComposite
CDecorator
DAdapter
If you want to add features to an object dynamically without changing its class, which pattern fits best?
ADecorator
BProxy
CComposite
DAdapter
Which pattern provides a simple interface to a complex system?
ADecorator
BFacade
CComposite
DProxy
To treat individual objects and groups of objects the same way, which pattern is appropriate?
AComposite
BProxy
CAdapter
DFacade
Which pattern controls access to an object, possibly adding security or lazy loading?
AFacade
BDecorator
CProxy
DAdapter
Explain when and why you would use the Adapter, Decorator, and Facade patterns in a system design.
Think about how each pattern changes or hides complexity.
You got /3 concepts.
    Describe the differences between Composite and Proxy patterns and give real-life examples for each.
    Focus on structure vs access control.
    You got /3 concepts.