Professional Documents
Culture Documents
Agile Model–Driven
Development (AMDD)
Modeling and documentation are critical aspects of any software project. Mod-
eling is the act of creating an abstraction of a concept, and documentation
is a permanent record of information. In traditional software processes, such
as the IEEE 12207 (http://www.ieee.org), modeling is included as one or
more serial phases. Modern prescriptive processes, such as the rational uni-
fied process (RUP) (Kruchten 2000) or the enterprise unified process (EUP)
(http://www.enterpriseunifiedprocess.info), which describe in specific detail
the activities required to develop software, include modeling disciplines that
you work through in an evolutionary manner. Agile software processes, such
as feature-driven development (FDD) (Palmer and Felsing 2002) and extreme
programming (XP) (Beck 2000), also include evolutionary modeling efforts,
although in FDD, modeling is an explicit activity, whereas in XP it is implicit.
The point is that modeling and documentation are important parts of software
development, so it makes sense to want to be as effective and efficient at it as
possible.
This chapter describes agile model–driven design (AMDD), an approach to
software development where your implementation efforts are guided by agile
101
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
102 AGILE MODEL–DRIVEN DEVELOPMENT (AMDD)
models that are just barely good enough. This chapter addresses the following
topics:
r Modeling philosophies;
r Project stakeholders;
r What is agile modeling (AM)?;
r The values of AM;
r The principles of AM;
r The practices of AM;
r Easing into agile modeling;
r Agile model–driven development (AMDD);
r Fundamental information gathering skills;
r Agile documentation;
r Making whiteboards work for software development;
r AMDD and other agile methodologies; and
r AMDD and test-driven development (TDD).
1. Models are not necessarily documents. The reality is that the concepts
of “model” and “document” are orthogonal—you can have models that
are not documents and documents that are not models. A sketch on the
back of a paper napkin is a model, as is a drawing on a whiteboard (see
Figure 4.1), as is a low-fidelity user-interface prototype built from flip chart
paper and Post-It notes. These are all valuable models, yet questionable
documents.
2. Many developers do not like modeling. I think the biggest problem is that
when many developers hear the term model they think document, and due
to bad experiences in the past they think that modeling is dysfunctional.
Often a developer’s first exposure to modeling is during a “documentation
after the fact” effort in which a system has been released into production
and now management insists that the project team create all the models that
they “should have” created during development. Some of these documents
may in fact add value, but more often than not much of this effort is simply
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.1 Modeling Philosophies 103
FIGURE 4.1. A user-interface flow diagram for a student services application at a university.
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
104 AGILE MODEL–DRIVEN DEVELOPMENT (AMDD)
in in
0..*
0..*
Address
StudentAddress
Student
<<Associative Table>>
0..* 1 AddressID: integer <<PK>>
StudentNumber: integer <<PK>> 1 1..* CustomerNumber: integer <<PK>> <<FK>> Street: char(40)
SocialSecurityNumber: char(10) <<AK>> AddressID: integer <<PK>> <<FK>> City: char(20)
FirstName: char(30) StateID: integer <<FK>>
Surname: char(20) CountryID: integer <<FK>>
PhoneNumber: integer PostalCode: char(20)
FIGURE 4.2. A partial physical data model, depicted using UML notation, for the university.
between team members and project stakeholders because you are talk-
ing through issues, coming to a better understanding of what needs to be
built and building bonds among everyone involved with the project in the
process.
5. Domain knowledge is important. I am a firm believer that every devel-
oper should become a generalizing specialist (Chapter 15), someone with
one or more specialties that also has a general understanding of devel-
opment and the business domain in which they work. If you do not un-
derstand the problem domain there is very little chance that you can be
effective.
6. Each type of model has its strengths and weaknesses. In this book you will
learn about a wide range of models, including those of the unified modeling
language (UML) as well as non-UML models such as user-interface flow
diagrams (Figure 4.1) and data models (Figure 4.2). The implication is that
no one model is right for every situation.
7. You need a wide range of models. The systems you are building have
user interfaces; are often deployed to several hardware tiers; use object
technology, relational database technology, Web services, and XML; imple-
ment complex business rules; need to work for years if not decades; and
need to be responsive to change. Because you want to think before you
act, because each model is good for certain purposes, and because software
development is complex, this points to the need to know how to work with
several types of models.
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.1 Modeling Philosophies 105
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
106 AGILE MODEL–DRIVEN DEVELOPMENT (AMDD)
important from everyone else: modelers can learn details of a certain tech-
nology from a programmer and programmers can learn valuable design
and architecture techniques from modelers. In short, everyone is a novice,
including myself.
Now that we have set a philosophical foundation for modeling, the next
step is to ask how we can be effective at modeling.
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.3 What Is Agile Modeling (AM)? 107
1. They know the business, or at least a portion of it. They understand one
or more aspects of the problem domain. They are the subject matter experts
(SMEs) after all.
2. They think (reasonably) logically. Not only do stakeholders need to un-
derstand the business, they must also be able to describe what they do
systematically in a logical manner.
3. They can communicate well. Stakeholders must have good people and
communication skills to help them work closely with developers.
4. They are willing to invest the time in software development. Stakeholders
typically have other things to do than work on a software project. Your job
is to convince the stakeholders it is worth their while to invest their time
providing expertise to your team. It is important to understand that many
stakeholders have had bad experiences in the past with broken promises
from the systems department and may be unwilling to take the time out of
their busy schedules. You will need to convince them to have faith in you,
then justify that faith by successfully delivering working software.
5. They are not too narrowly focused. People who believe it is all about them
or their respective part of their organization, who only understand how it
is done today, who are unwilling or unable to consider new approaches, or
who are unable to prioritize their needs seldom make good stakeholders.
They need to be able to understand overall priorities!
6. They understand their role in the software development process. Stake-
holders (and developers) must have an understanding of how important
it is that they perform their respective roles correctly. If they shirk their
responsibilities, they jeopardize the entire effort.
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
108 AGILE MODEL–DRIVEN DEVELOPMENT (AMDD)
1. To define and show how to put into practice a collection of values, princi-
ples, and practices for effective, lightweight modeling.
2. To describe how to apply modeling techniques on agile software projects
teams.
3. To describe how you can improve your modeling activities following a
“near-agile” approach to software development, in particular, project teams
following the RUP or EUP.
The five values of AM, the first four of which are adopted from XP (Beck
2000), provide a philosophical foundation upon which its principles are based,
providing the primary motivation for the method. AM’s values include those
of XP. Briefly, those values are
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.7 Easing into Agile Modeling 109
2. Simplicity. Strive to develop the simplest solution possible that meets all
of your needs.
3. Feedback. Obtain feedback regarding your efforts often and early.
4. Courage. Have the courage to try new techniques and to make and then
stick to your decisions.
5. Humility. You need to have the humility to admit that you may not know
everything, that others have value to add to your project efforts.
The values of AM provide a foundation for its principles, several of which are
adopted from XP. There are eleven core principles, described in Table 4.1,
that you must adopt in order to be able to claim that you are “doing AM.” To
reflect the fact that every project team finds itself in a unique situation, AM
includes seven supplementary principles described in Table 4.2 that you can
optionally tailor into forming a version of AM that best fits your environment.
You will see these principles applied throughout this book.
The practices of AM were formulated from its principles. There are thirteen
core practices, described in Table 4.3, that you must adopt to be able to
accurately claim that you are doing AM—if you like, you can still adopt only
a subset of them, and benefit from doing so, but you are just not fully doing
AM until you adopt at least the entire core. There are eight supplementary
practices, described in Table 4.4, that you can tailor into your process to meet
your unique needs. You will see these practices applied throughout this book.
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
110 AGILE MODEL–DRIVEN DEVELOPMENT (AMDD)
Model with a purpose If you cannot identify why and for whom you
are creating a model then why are you
bothering to work on it at all?
Maximize stakeholder Your project stakeholders are investing
investment resources—time, money, facilities, and so
on—to have software developed that meets
their needs. Stakeholders deserve to invest
their resources the best way possible and to
not have them frittered away by your team.
For example, I could have invested several
hours cleaning up the sketch in Fig. 4.1 by
redrawing it using a sophisticated drawing
tool, but the sketch is good enough to get
the idea across. Furthermore, stakeholders
deserve to have the final say in how those
resources are invested or not invested. If it
was your money, would you want it any
other way?
Embrace change Change happens—new requirements are
discovered, people’s understanding of what
they need improves as they see the system
evolve, and their priorities change. This is
perfectly normal.
Incremental change To embrace change you need to take an
incremental approach to your own
development efforts, to change your system
a small portion at a time instead of trying to
get everything accomplished in one big
release. You can make a big change as a
series of small, incremental changes.
Multiple models You have a wide range of modeling artifacts
available to you, as you will see in later
chapters. Take the opportunity to expand
upon your intellectual toolkit and learn
new techniques whenever you can.
Travel light Traveling light means that you create just
enough models and documentation to get
by.
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.7 Easing into Agile Modeling 111
Principle Description
In the time since then I have been applying AM to projects, mentoring people
in its techniques, teaching AM courses, and speaking about AM at a variety
of conferences. The one thing that I have noticed is that many people strug-
gle with its plethora of concepts—five values, eleven core principles, seven
supplementary principles, thirteen core practices, and eight supplementary
practices—so it should not be any surprise that some people find AM complex.
Sigh.
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
112 AGILE MODEL–DRIVEN DEVELOPMENT (AMDD)
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.7 Easing into Agile Modeling 113
(continued )
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
114 AGILE MODEL–DRIVEN DEVELOPMENT (AMDD)
Create several models in Because each type of model has its strengths
parallel and weaknesses no single model is
sufficient for all your modeling needs. By
working on several at once you can easily
iterate back and forth between them and
use each model for what it is best suited.
Iterate to another artifact Whenever you find you are having difficulties
working on one artifact, perhaps you are
working on a use case and find that you are
struggling to describe the business logic,
then that is a sign that you should iterate to
another artifact. By iterating to another
artifact you immediately become “unstuck”
because you are making progress working
on that other artifact.
Model in small With incremental development you model a
increments little, code a little, test a little, and then
deliver a little. No more big design up front
(BDUF) where you invest weeks or even
months creating models and documents.
Collective ownership Everyone can work on any model, and ideally
any artifact on the project, if they need to.
Create simple content You should keep the actual content of your
models—your requirements, your analysis,
your architecture, or your design—as
simple as you possibly can while still
fulfilling the needs of your project
stakeholders. The implication is that you
should not add additional aspects to your
models unless they are justifiable.
Depict models simply Use a subset of the modeling notation
available to you—a simple model that
shows the key features that you are trying
to understand; a class model depicting the
primary responsibilities of classes and the
relationships among them often proves to
be sufficient.
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.7 Easing into Agile Modeling 115
Practice Description
Display models publicly This supports the principle of open and honest
communication on your team because all of
the current models are quickly accessible to
them, as well as with your project
stakeholders because you are not hiding
anything from them.
Consider testability When you are modeling you should be
constantly asking yourself “How are we
going to test this?” because if you cannot
test the software that you are building you
should not be building it.
A question that I get asked is how can people get started with AM but
perhaps not fully adopt it all at once. Some organizations do not want to
adopt just the core principles and practices at first, let alone some of the
supplementary ones. One common situation is that the organization is very
non-agile at the present moment and that adopting the entire AM core is just
too much to attempt at once. It is clear that many people need a way to ease
into AM slowly.
First, focus on improving communication between people. Modeling with
others is critical as is active stakeholder participation. When you use simple
tools it is much easier to model with others because there is not a tool learning
curve to overcome, and simple tools also make it possible for your stakeholders
to actively model with you. You will learn from your stakeholders.
Second, you should strive to keep things as simple as possible and to travel
as light as possible. This is easy to talk about but often proves quite difficult
to do in practice, at least at first. Using simple tools such as whiteboards and
paper to create models is a critical first step. Simple tools also make it much
less painful to discard temporary models because you have not invested as
much effort in them. It is also sometimes easier to purchase the low-tech
whiteboard and paper without investing in a sophisticated CASE tool.
Third, adopt techniques that enable you to work in an evolutionary (it-
erative and incremental) manner. Creating several models in parallel and
iterating to another artifact are crucial practices, but this of course requires
you to accept that you need multiple models. You may need more than one
whiteboard—a roomful helps! Keeping your models small by working on
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
116 AGILE MODEL–DRIVEN DEVELOPMENT (AMDD)
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.7 Easing into Agile Modeling 117
Practice Description
Upon adopting these concepts you will discover that it is quite easy to
add other ideas incrementally. For example, you will quickly discover that
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
118 AGILE MODEL–DRIVEN DEVELOPMENT (AMDD)
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.8 Agile Model–Driven Development (AMDD) 119
Reviews
(optional)
Detailed
Modeling
All Cycles
(minutes) (hours)
Implementation
(Ideally Test Driven)
(hours)
Cycle 1: Development
Cycle 2: Development
Cycle n: Development
effort. I highly suggest not investing any more time than this as you run the
danger of over modeling and of modeling something that contains too many
problems (two weeks without the concrete feedback that implementation
provides is a long time to go at risk, in my opinion).
For the first release of a system you need to take several days to identify
some high-level requirements as well as the scope of the release (what you
think the system should do). The goal is to get a good gut feel what the project
is all about, and very likely to gather sufficient information to provide an initial
estimate for your project. The goal of the initial architecture modeling effort
is to try to identify an architecture that has a good chance of working. In later
cycles both your initial requirements and your initial architect models will
need to evolve as you learn more, but for now the goal is to get something
that is just barely good enough so that your team can get coding. In subsequent
releases you may decide to shorten cycle 0 to several days, several hours, or
even remove it completely as your situation dictates.
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
120 AGILE MODEL–DRIVEN DEVELOPMENT (AMDD)
From a design point of view the AMDD approach of Figure 4.4 is very different
from traditional MDD approaches where you create a design model first then
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.9 Fundamental Information Gathering Skills 121
code from it. With AMDD you do a little bit of modeling and then a lot of
coding, iterating back when you need to. Your design efforts are now spread
out between your modeling and coding activities, with the majority of design
being done as part of your implementation efforts. In many ways this was also
true for many traditional projects: the developers would often do significantly
different things than what was in the design models, but the designers would
often blame the developers instead of question their overly serial processes.
AMDD is different from techniques such as feature-driven development
(FDD) or the use case-driven development (UCDD) styles of RUP and
ICONIX (Rosenberg and Scott 1999) in that it does not specify the type of
model(s) to create. All AMDD suggests is that you apply the right artifact,
but it does not insist on what that artifact is. For example, FDD insists that
features are your primary requirements artifact, whereas UCDD insists that
use cases are. AMDD works well with either a FDD or a UCDD approach
because the messages are similar—all three approaches are saying that it is a
good idea to model before you code.
r Interviewing;
r Observation; and
r Brain storming.
4.9.1 Interviewing
Although you should have one or more project stakeholders actively involved
in your project, and therefore readily accessible to you, you will still find that
you need to obtain information from others from time to time. A common
way to do this is via interviews. When interviewing someone you have several
potential goals to accomplish:
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
122 AGILE MODEL–DRIVEN DEVELOPMENT (AMDD)
Interviewing is a skill that takes years to master, one that cannot possibly
be taught in a few paragraphs. There are, however, a few helpful pointers to
help you to improve your interviewing skills:
1. Send ahead an agenda to set expectations and thus allow your interviewee
to prepare for the interview. An agenda can be something as simple as a
short e-mail.
2. Verify a few hours ahead of time that the interviewee is still available
because schedules may change.
3. Thank the interviewee for taking time out of their busy day.
4. Tell the interviewee what the project is about and how input is important.
5. Summarize the issues you want to discuss and verify how long the inter-
view will take. This helps to set expectations and enables the interviewee
to help you manage the time. This should mirror the agenda sent in step
1.
6. State and verify all assumptions. Do not assume that each stakeholder
holds the same assumptions.
7. Ask the interviewee whether you have missed anything or whether any-
thing should be added. This gives him a chance to voice concerns and
often opens new avenues of questioning.
8. Practice active listening skills—ask open-ended questions. Do not assume
you know everything, especially if you think you have already heard
it before. Your stakeholders rarely have a consistent view of the world
and part of the requirements definition process is to understand where
everyone is coming from. If everyone has the same view on everything,
that is great, but it is incredibly rare. Do not shut down your users with
a comment like “I have already heard this before. . . .”
9. End the interview by summarizing the main points. Discuss any misun-
derstandings and clear them up at this point. This gives you a chance to
review your notes and ensure you understood everything.
10. Thank the person at the end of the interview. Follow up with a thank-you
note too.
11. If you formalize the interview notes, send them to the interviewee for
review. This helps to put your interviewees at ease because they know the
input was not taken out of context. It also helps to improve the quality
of your notes because they will provide feedback.
12. Interviewing is more about listening than talking. Talking starts the pro-
cess, but the information you want comes from listening to responses.
Even when you ask an important question, e.g., “This system needs to be
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.9 Fundamental Information Gathering Skills 123
TIP
Take an Interviewing Course
Although few computer science programs offer interviewing courses, most
journalism programs do. Although the focus will be on news interviewing, the
fundamental skills are the same.
restricted to field reps, right?”, the important part of the interview is the
answer, e.g., “Yes” or “No” or “Well it’s actually like this. . . .”
4.9.2 Observation
I make it a habit to spend a day or two with my direct end users simply to sit
and observe what they do. One of the problems with interviewing people is
they leave out important details, details that you may not know to ask about
because they know their jobs so well. Another advantage of observing your
users is you see the tools they use to do their jobs. Perhaps they use a key
reference manual or use a notepad to write reminder notes for themselves
and/or their co-workers. Often they do things differently than the official
manual tells you it should be done. Taking the time to observe users doing
their work can give you insight into the requirements for the application you
are building.
4.9.3 Brainstorming
The basic idea is that someone, referred to as a facilitator, leads the group
through brainstorming. The facilitator starts by explaining the rules of brain-
storming and explaining what issues are to be discussed. All people present
must understand and abide by these rules. A good idea is to give everyone
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
124 AGILE MODEL–DRIVEN DEVELOPMENT (AMDD)
documentation. When you do not, you are at risk of creating too much
documentation, unnecessary documentation, or documentation that does
not meet their actual needs.
r Agile documents are sufficiently accurate, consistent, and detailed. Agile
documents do not need to be perfect; they just need to be good enough.
r Agile documents are sufficiently indexed. Documentation is not effective
if you cannot easily find the information contained in it; therefore an index
and a table of contents are important.
throughout this book you will see many whiteboard sketches, which is nice
for a book but are they acceptable for real-world development? My experience
is yes. Here is how I make it work for me.
Figure 4.5 shows a digital photo taken of a whiteboard sketch of a simple
use case diagram (Chapter 5), which I drew with a couple of stakeholders.
We took the photo because we were afraid that we would lose the valuable
information that it contains, although I am sure that we could easily reproduce
this diagram in less than a minute if we ever needed to (one of the side benefits
of practices such as depict models simply, create simple content, and model in
small increments is that you create models that you can easily reproduce).
Digital photos such as this prove to be useful ways to comfort people who
think that you need more documentation than you actually do because with
the photograph you have retained the model—it might not be pretty, but at
least you haven’t “lost” the information.
There are a couple of problems with Figure 4.5—the file size is relatively
large and it is hard to read because it is so dark. I am not that worried about
file size issues; disk storage is cheap, although large files can be a problem for
people with slow network connections. The readability problem is more of
an issue for me. Luckily there’s a quick solution, a product called Whiteboard
Photo (http://www.websterboards.com/products/wbp.html) from Polyvision,
formerly Pixid. I used this product to create Figure 4.6 from the original photo,
a process that took about two minutes end to end, including the time to run
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.11 Making Whiteboards Work for Software Development 127
Whiteboard Photo, open the file, clean the photo, and then save it back to
disk. One feature of the product is that you can clean many photos at once,
something I did not do in this case, so you can reduce the average cleaning
time even further.
Figure 4.6 is not perfect, the blotch in the diagram is the reflection of the
flash (the lighting in my work area could be better), but it addresses the
problems with Fig. 4.5. I then invested a few minutes with a paint program
to produce Fig. 4.7.
So how far should you go with whiteboard sketches? My experience is that
you can safely erase 95–99 percent of all sketches that you create. Then be-
tween 95 and 99 percent of the diagrams that remain can be photographed
and retained that way and a few diagrams I will transcribe into a sophisticated
software-based modeling tool. These percentages seem to be true for teams
familiar with AMDD; teams with people new to this approach will find that
they want to keep more diagrams because it comforts them. Over time, ex-
perience will teach them to have greater courage and to travel even lighter
than they think that they need to, but it takes time to wean people off their
“documentation habit.” Digital photos of whiteboards are a radical step for
many experienced IT professionals.
Of the photos that I do take, I will either stick with the raw photo as
you see in Fig. 4.5 or the automatically cleaned-up version in Fig. 4.6. It is
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
128 AGILE MODEL–DRIVEN DEVELOPMENT (AMDD)
important to understand that you are still investing time, albeit a short time,
when using Whiteboard Photo to clean up your diagrams. Remember the AM
principle to maximize stakeholder investment and only do this work if it adds
value, and very often it does. The only time that I will clean up the diagram
further, as you see in Fig. 4.7, is when the diagram is included in some sort of
official document such as a presentation to management, a system overview
document, or in this case a book. This cleanup step can often be avoided if
you work in brightly lit rooms and/or get good at aiming the camera so that
the flash appears off to the side of your photo.
The primary advantages of modeling on whiteboards are that it is an easy
and inclusive approach because practically anyone can use a whiteboard.
The primary disadvantages are that whiteboard sketches are not permanent,
something that you can easily address by taking a digital photo and cleaning
it up as appropriate.
The primary disadvantages are that it is hard to update a digital image of
a whiteboard photo; you typically have to redraw it if you happened to have
erased it from the board, and you cannot do sophisticated things such as
generate code from a static, hand-drawn image. Another issue is that white-
boards are only a viable option when your team is colocated, something that I
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.13 Agile Modeling and Test-Driven Development (TDD) 129
highly recommend. When this is not the case you will need to consider other
modeling tools.
As you saw in Figure 4.4 AM fits in very well with implementation efforts.
As you will see in Chapter 13, TDD is an implementation technique. A pri-
mary benefit of both modeling and TDD is that they promote a “think before
you act” approach to development. Just because they offer the same type of
benefit does not mean that they are incompatible with one another. Instead
experience shows that you can and should model on a project taking a TDD
approach.
Creating agile models can help your TDD efforts because they can reveal
the need for some tests. As an agile modeler sketches a diagram they will al-
ways be thinking “how can I test this” in the back of their minds because they
will be following the practice consider testability. TDD can also improve your
AM efforts. Following a test-first approach agile developers quickly discover
whether their ideas actually work—the tests either validate their models or
not—providing rapid feedback regarding the ideas captured within the mod-
els. This fits in perfectly with AM’s practice of prove it with code. The bottom
line is that the most effective developers have a wide range of techniques in
their intellectual toolboxes, and AM and TDD should be among those tech-
niques.
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
130 131
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007
4.15 Review Questions 133
is important, and then rate three of those tools against those features.
Which one “wins”—and why?
8. Search the Web for information about the model-driven architecture.
What are the advantages and disadvantages of this approach? How re-
alistic is the MDA? Does this seem like a viable strategy to you? Why or
why not?
9. Compare and contrast small development groups of three or four people
versus larger development groups of ten to twenty people. Take into con-
sideration management issues, communication issues, logistical issues,
decision-making ability, group dynamics, skills, and knowledge. What
do you believe is the ideal size for a development team? Why.
10. Is it important for the stakeholders to be co-located with a development
team? Why or why not?
Downloaded from https:/www.cambridge.org/core. New York University Libraries, on 20 Jan 2017 at 17:02:11, subject to the Cambridge Core terms of use, available at
Cambridge Books Online © Cambridge University Press, 2010
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/CBO9780511584077.007