- Top-Down Design: work from generalities to specifics.
- Bottom-Up Design: work from specifics to generalities.
- Both methods have strong supporters.
- Also known as decomposition.
- Begins with a high level of abstraction and build down.
- Iterative method; works using a divide and conquer approach.
- Only need to focus on details for one part of the system at a time.
- Decompose top level, then decompose those items, etc.
- Stop dividing when the decomposition becomes trivial.
- Contrasts with bottom-up design (also known as composition).
- We can only concentrate on so many things as once.
- Defers deciding on low-level specifics which are subject to change.
- More ‘natural’.
- Problems may be so abstract its hard to get started.
- May not identify critical functionality early on.
- Unforeseen complexity can ripple back up, making things overly complex.
- Low-level constrains can often dictate higher level design.
Types of Decomposition
- Breaking apart program behaviour (functions) into subprograms, simplifying higher level algorithmic description
- Breaking apart program structure into modules.
- Each has well defined scope of operations (simpler).
- Breaking up data structures into components, each of which is simpler and relatively independent of the aggregate data structure.