There are two ways to break down a project (OK, there are probably more than two ways, but work with me here…)
One way is horizontally, meaning to implement an entire application layer at once. This would be like building the entire UI first, then the business layer, then the database, etc. The other way is to implement bits and pieces of all layers over and over, which is like taking a vertical slice through a program — a bit of UI, business logic, persistence, and so on. When people are first learning Agile, it seems to be difficult to get their heads around what taking a vertical slice actually means and why they would want to do it. They need everything built before anyone would possibly want to use their creation, so vertical versus horizontal doesn’t make any practical difference to them. It becomes my job to explain why vertical is superior in most casts. So I’m talking to a manager here, trying to find the right words to allow him to understand what I’m trying to say, and I stumble upon this metaphor, Eating Toast.
Let’s say we’re going to hold a dinner party and we’re responsible for preparing the feast. This act consists of 4 separate activities: Shopping, Cooking, Eating, and Cleaning. If I were to implement this task horizontally, I’d learn how to shop really, really, really well, and fill up my grocery cart as well as anyone else in the entire world. But, who cares? I can’t do anything with the food, so I’m left with this pile of food and no way to make use of it. Ah, so now I need to learn to cook. Now I can take the food I bought and do something with it — I can cook it! But, again, who cares? Having plates full of cooked food is not useful to anyone if you don’t know how to eat it. And the story goes on, through the eating and cleaning phases of our dinner project/party.
Now, an alternative way of looking at this is that, instead of learning how to be the world’s best shopper, cook, eater, and cleaner before I can actually have my party, maybe I can learn how to shop for, prepare, eat, and clean up from a simple meal of a piece of toast. If I want to throw a Toast-Only Dinner Party, I’m now set I’ve learned how to buy, cook, eat, and clean toast. Next, I can learn how to cook waffles, followed by sandwiches, etc, each time making my potential dinner party more lavish and elegant. Dish by dish, I can learn how to expand my knowledge beyond Eating Toast.
After hearing this metaphor, the idea of vertical versus horizontal made sense. Does it make sense to you?
Yours, with crumbs,