Bird
Raised Fist0

What is a typical trade-off when using the Facade pattern in a large system?

medium🪤 Complexity Trap Q6 of Q15
OOP & Design Patterns - Adapter vs Facade vs Proxy - Structural Pattern Comparison
What is a typical trade-off when using the Facade pattern in a large system?
AHigher memory usage due to duplicated subsystem objects
BIncreased complexity in client code due to multiple interfaces
CClients lose direct access to subsystem features, limiting flexibility
DSlower performance because Facade converts interfaces at runtime
Step-by-Step Solution
Solution:
  1. Step 1: Understand Facade trade-offs on flexibility

    Facade simplifies interfaces but hides subsystem details, reducing client flexibility.
  2. Step 2: Why other options are incorrect

    Increased complexity in client code due to multiple interfaces is false as Facade reduces client complexity; Higher memory usage due to duplicated subsystem objects is unrelated; Slower performance because Facade converts interfaces at runtime confuses Facade with Adapter.
  3. Final Answer:

    Option C -> Option C
  4. Quick Check:

    Facade hides subsystem details, limiting flexibility [OK]
Quick Trick: Facade hides complexity but limits flexibility [OK]
Common Mistakes:
MISTAKES
  • Thinking Facade increases client complexity
  • Confusing Facade with Adapter or Proxy
Trap Explanation:
PITFALL
  • Candidates often overlook the flexibility loss due to Facade's abstraction.
Interviewer Note:
CONTEXT
  • Checks understanding of Facade's trade-offs in large systems.
Master "Adapter vs Facade vs Proxy - Structural Pattern Comparison" in OOP & Design Patterns

2 interactive learning modes - each teaches the same concept differently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More OOP & Design Patterns Quizzes