A Functional Skeleton of the System as a Whole
How do you create a candidate architecture in XP? The solution is to pick a set of stories that force you to build a skeleton of the system as a whole in your first iteration. If you can’t find the stories that force you to create the architecture you need, then you either put as much architecture in place as you need for now or you put the whole architecture in place on speculation. In Extreme Programming Explained: Embrace Change (2nd Edition) (The XP Series), Kent Beck writes about building a functional skeleton of the system.
Architecture is just as important in XP projects as it is in any software project. Part of the architecture is captured by the system metaphor. If you have a good metaphor in place, everyone on the team can tell about how the system as a whole works.
The First Iteration Must Be a Functioning Skeleton of the System as a Whole
The next step is to see how the story turns into objects. The rules of the Planning Game state that the result of the first iteration must be a functioning skeleton of the system as a whole. But you still have to do the simplest thing that could possibly work. How can you reconcile these two?
Pick a Set of Stories that Force You to Create the Whole Architecture
For the first iteration, pick a set of simple, basic stories that you expect will force you to create the whole architecture. Then narrow your horizon and implement the stories int eh simplest way that can possibly work. At the end of the exercise you will have your architecture. It may not be the architecture you expected, but then you will have learned something.
Put as Much Architecture as You Need or Put the Whole Architecture in Place on Speculation
What if you can’t find a set of stories that force you to create the architecture you know, you absolutely know, you are going to need? Either you can put the whole architecture in place on speculation, or you can put as much architecture in place now as you need to meet your current needs, and trust that you can put more in later. I put in the architecture I need now and trust my ability to change it later.
Key Take Aways
Here’s my key take aways:
- Have a system metaphor.
- Pick a set of stories that force you to build a skeleton of the system as a whole.
- If you can’t find the right stories, then either base the architecture on speculation or put as much architecture in place as you need for now.
- System Metaphor (C2.com)