Suppose you are building a new online store.
The plan lists member sign-up, product search, the shopping cart, payment, order cancellation, and delivery tracking.
If you design all of these and then build them in one go, you will not see a working screen until months later.
If a serious problem then shows up in the payment flow, you have to rework many parts you already built.
Iterative development
reduces this kind of loss by splitting the system into short
iterations
and completing it bit by bit.
This post covers the basic principles of iterative development and the criteria for dividing work into iterations.
The waterfall approach goes through requirements, design, implementation, and testing once each, in sequence.
Each phase must finish before the next one starts, so anything missed in an earlier phase only shows up later.
If testing comes last, design mistakes are discovered late, and the scope of the fix tends to grow.
Iterative development changes this order: it builds a small scope all the way through and uses the result to plan the next step.
Aspect
Waterfall
Iterative development
Unit of progress
Each phase completed once
Small iterations repeated many times
Checking results
Checked for the first time near the end
Some features checked at the end of each iteration
Handling change
Hard to return to earlier phases
Reflected in the plan for the next iteration
Finding risks
Found late, in later phases
Found early, in the first iterations
Putting high-risk features in early iterations ๐
When you divide work into iterations, it is important to handle
high-risk features
first.
In the online store, browsing products and adding items to the cart are fairly familiar features.
Payment integration, however, has to account for response delays and failure handling from an external payment API.
So you could plan iteration 1 for product browsing and order creation, and iteration 2 for payment integration.
If you find a problem in payment integration during iteration 2, you only fix the payment part and do not have to roll back the entire order flow.
๐
If you divide iterations strictly by the order of a feature list, the middle iterations may end with nothing that runs.
The key is to cut the scope so that
One well-known framework for iterative development is the
Unified Process
(UP).
UP divides a project into four phases, and runs several iterations within each phase.
Inception
: Confirm the project's scope, its main risks, and its feasibility. Not all requirements are fixed in this phase. (See Distinguishing ideas from requirements.)
Elaboration
: Establish the core architecture and reduce the major risks. This is the phase in which most of the important use cases are analyzed.
Construction
: Implement the remaining features iteratively. Most of the development time is spent in this phase.
Transition
: Deploy to users and finish the work needed for operation.
Iterations continue across the four phases of inception, elaboration, construction, and transition, and the runnable features grow over time
A single iteration usually proceeds in this order.
Planning
: Decide which use cases and risks to handle in this iteration.
Analysis and design
: Organize the objects and interactions needed for the selected features.
Implementation and testing
: Build the features and verify them with automated tests.
Integration and review
: Merge with the existing system, then review the result with the stakeholders.
Teams set the length of an iteration to suit the project, and it is common to keep it the same every time.
A fixed length makes progress easier to predict and lowers the effort of planning.
๐จโ๐ป
At the end of each iteration, ask, "Can we show this to users now?"
If the answer is hard to give, the iteration is probably too large, or the work has not been cut into units that can run.
Iterative development splits the system into small parts so that you
run it early and check it often
.
Put high-risk features in the early iterations, and cut the scope so that each iteration leaves a working result. That makes it easier to adjust the plan when requirements change.