Skip to content
IRC-Coding IRC-Coding
Top-Down Bottom-Up Meet in the Middle Interfaces Coupling Cohesion

Top-Down vs. Bottom-Up Design: Differences & Risks

Compare top-down (goals→components) and bottom-up (components→system) design approaches. Coupling, cohesion, testability & economics.

S

schutzgeist

1 min read
Top-Down vs. Bottom-Up Design: Differences & Risks

Top-Down Design vs. Bottom-Up Design

This post is a definition of terms for Top-Down vs. Bottom-Up – including exam questions, core components, and tags.

In a Nutshell

  • Top-Down starts with business goals and progressively decomposes them into subproblems and interfaces.
  • Bottom-Up starts with existing building blocks (libs/frameworks/services) and composes a solution from them.

In practice, Meet in the Middle is often the sensible approach.

Compact Technical Description

Top-Down

  • First goals, context, use cases
  • Then refinement: subsystems → components → classes → operations
  • Advantage: clear business divisions, good test derivation from requirements

Bottom-Up

  • First reuse: libraries, SDKs, frameworks, existing systems
  • Then composition + adaptation
  • Advantage: fast start, lower implementation effort

Risks:

  • Top-Down: technical constraints become visible too late
  • Bottom-Up: technology-driven architecture, integration costs, vendor lock-in

Exam-Relevant Key Points

  • Clearly distinguish definitions
  • Keep coupling low, cohesion high
  • Define stable interfaces
  • Traceability: requirement → design → test
  • Adapter/Anti-Corruption Layer for external components
  • Meet in the Middle as realistic combination

Core Components

  1. Business goals + context
  2. Decomposition into subsystems
  3. Interface contracts
  4. Identification of existing components
  5. Adapter/Facade/ACL
  6. Quality goals/architecture rules
  7. SOLID/GRASP as guidelines
  8. Test strategy (acceptance → unit)
  9. Security/dependency checks/licenses
  10. ADRs (version decisions)

Practical Example (Payment Processing)

Top-Down:
- Goal: securely authorize payments
- Services: payment service, order service
- Ports: authorize(), cancel()

Bottom-Up:
- Available: payment SDK, HTTP client, event bus
- Adapter encapsulates SDK
- Contract tests against sandbox

Meet in the Middle:
- define business ports
- fill concrete adapter with SDK

Advantages and Disadvantages

Top-Down

  • Advantages: clear business structure, stable ports, good testability
  • Disadvantages: ramp-up phase, technical risks can emerge late

Bottom-Up

  • Advantages: fast results, high reusability
  • Disadvantages: risk of technology-driven divisions, integration/lock-in risk

Typical Exam Questions (with Brief Answer)

  1. Basic difference? Top-Down decomposes from the goal, Bottom-Up builds from building blocks.
  2. How does it affect coupling/cohesion? Top-Down strengthens business cohesion; Bottom-Up can increase coupling.
  3. How do you combine sensibly? Meet in the Middle + Adapter + ADRs.

Learning Strategy

  1. Draw both sketches for a mini-domain.
  2. Define ports as interfaces.
  3. Practice contract tests against external components.

Most Important Sources

  1. https://refactoring.guru/design-patterns/adapter
Back to Blog
Share:

Related Posts