Course contentsShow
← Software Engineering
Lesson 286 of 1,9338. Structural Design PatternsFree lesson

Pattern Selection Criteria

Developing decision-making frameworks for choosing between structural patterns based on specific design problems.

Pattern Selection Criteria

What you'll learn: You'll learn how to systematically evaluate and choose the right structural design pattern for your specific problem.

The Challenge of Choice

By now, you've seen multiple structural patterns—Adapter, Bridge, Composite, Decorator, Facade, Flyweight, and Proxy. Each solves different problems, but how do you decide which one fits your situation? Pattern selection criteria are the decision-making guidelines that help you match your design problem to the appropriate pattern.

A Framework for Decision-Making

Think of choosing a pattern like selecting the right tool from a toolbox. You wouldn't use a hammer when you need a screwdriver, but sometimes a situation could work with multiple tools. Here's how to approach the decision:

Ask These Key Questions

  1. What's your primary problem? Are you dealing with incompatible interfaces (Adapter)? Need to simplify complexity (Facade)? Want to add behavior flexibly (Decorator)?

  2. What matters most? Performance and memory (Flyweight)? Controlling access (Proxy)? Managing independent variations (Bridge)?

  3. What's the trade-off you're willing to make? More abstraction layers vs. immediate simplicity? Runtime flexibility vs. compile-time clarity?

  4. Can you combine patterns? Sometimes your problem requires both a Facade to simplify and an Adapter to integrate legacy code.

Pattern Selection Checklist

  • Adapter: When you need two existing interfaces to work together
  • Bridge: When both abstraction and implementation vary independently
  • Composite: When you're modeling tree structures or part-whole hierarchies
  • Decorator: When you need flexible, stackable behavior additions
  • Facade: When complexity needs hiding behind a simple interface
  • Flyweight: When many similar objects consume too much memory
  • Proxy: When you need controlled, indirect access to an object

Key Takeaway: Selecting the right structural pattern requires understanding your primary problem, evaluating trade-offs (performance, complexity, flexibility), and matching pattern intent to your specific design constraints—sometimes using multiple patterns together.