You are on page 1of 8

FEATURE: SOFTWARE DEVELOPMENT

Agile
velopment rate, improve product qual-
ity, and shorten delivery cycle time.

SLAP and
Model-Driven MDD Processes Overview
SLAP is an agile process adopted at
Motorola that uses scrum1 as a baseline

Development and includes certain extreme program-


ming practices.2 As Figure 1 and Table
1 show, SLAP divides a software de-

in Practice
velopment life cycle into multiple itera-
tions. Each iteration consists of three
sprints: application requirements and
architecture, development, and system
integration feature testing (SIFT).
Yuefeng Zhang, UniqueSoft Each sprint is five weeks long and
has the same set of activities (called its
Shailesh Patel, Motorola calendar). For example, the calendar
for the development sprint is as fol-
lows: week 1 for sprint kickoff, appli-
// Combining model-driven development practices cation requirements analysis, and high-
level design; week 2 for detailed design;
with agile techniques can significantly week 3 for implementation; week 4 for
reduce software development cycle time and formal technical review and rework;
and week 5 for integration readiness
increase productivity and quality. // and sprint postmortem meeting.
Starting at Sprint 3 in Iteration 2,
all three sprints in different iterations
go in parallel. For a given iteration, the
requirements and architecture sprint
aims to specify the application require-
ments and lay out the application archi-
tecture for the next iteration; the devel-
opment sprint aims to implement the
requirements and architecture from the
BOTH THE AGILE development pro- modeling. 5 In previous work, Yuefeng previous iteration; and the SIFT sprint
cesses (such as scrum1 and extreme Zhang presents a method of apply- aims to test the implementation from
programming 2) and model-driven de- ing extreme programming practices the previous iteration.
velopment (MDD) practices3,4 have to MDD for better productivity and Motorola’s MDD process is based
been widely adopted in industry for quality. 6 on the unified software development
years. To inherit the benefits of both, This article presents a different ag- process. 3 It divides a software develop-
increasing amounts of results on in- ile MDD process and its implementa- ment life cycle into multiple milestone
troducing agility into MDD are being tion for the development of a real-time phases over time (such as inception or
published in academia. 5,6 For exam- telecommunication system. In partic- elaboration), and each milestone phase
ple, in The Object Primer, Scott Am- ular, we show how to combine a sys- consists of one or more iterations. Each
bler describes how to combine extreme tem-level agile process (SLAP) and an iteration contains the same set of core
programming and MDD into agile MDD process into one to speed up de- development activities (such as require-

84 I E E E S O F T W A R E | P U B L I S H E D B Y T H E I E E E C O M P U T E R S O C I E T Y 0 74 0 -74 5 9 / 11 / $ 2 6 . 0 0 © 2 0 11 I E E E
Iterations and sprints in a system-level agile process (SLAP).
TABLE 1

Sprint 1 Sprint 2 …… Sprint n

Iteration 1 Requirements and Development System integration feature testing


architecture (SIFT)

Iteration 2 Requirements and architecture Development SIFT

…… Requirements and architecture Development

Iteration n Requirements and architecture

Mapping between SLAP and MDD in agile MDD.


TABLE 2

SLAP MDD

Sprints Iterations

Requirements and architecture Application requirements specification and architecture Application requirements specification and architecture

Development High-level design Requirements analysis and high-level design

Detailed design Detailed design

Coding, unit testing, and integration testing Code generation and UML unit and integration testing

SIFT Subsystem testing and system testing

ments analysis or high-level design) and Release planning:


break project scope
follows a tailored V-Model process.
into prioritized list of
backlog items. 24 hours
Agile MDD
The key in achieving agile MDD is to
combine an agile process with an MDD
process in a way that can inherit the Iteration planning:
5-week
Increment of
benefits of both and at the same time sprints
select and map functionality
avoid their shortcomings. backlog items to
iterations and sprints
Process Overview
Our strategy of combining SLAP and
MDD into agile MDD is to take SLAP Application requirements &
Development sprint SIFT sprint
as the backbone process and map MDD architecture sprint
iterations and activities to the corre-
sponding SLAP sprints and activities FIGURE 1. Agile model-driven development overview. The colors teal, purple, and yellow
(see Table 2 and Figure 1). represent application requirements and architecture, development, and SIFT, respectively.
In this way, like SLAP, an iteration in
agile MDD still consists of three sprints. eration, UML unit testing, and integra- to figure out where and how to apply
The sprint for requirements specifica- tion testing. The SIFT sprint includes what agile practices in MDD.
tion and architecture is the same as the subsystem testing and system testing. Table 3 answers the where and
one in SLAP. The development sprint what questions. In particular, it shows
includes requirements analysis, high- Implementation and Lessons Learned which MDD practices (where) corre-
level design, detailed design, code gen- The key in implementing agile MDD is spond or relate to which agile practices

M A R C H /A P R I L 2 0 1 1 | IEEE S O F T W A R E 85
FEATURE: SOFTWARE DEVELOPMENT

MDD practices and corresponding (c) or related (r) agile practices.


TABLE 3

Agile practices Agile management practices

Test-driven development

meeting (retrospectives)
Iterative and incremen-

Continuous integration

Daily standup meeting

status tracking online


Paired development

over comprehensive

Daily development

Sprint postmortem
(5-week calendar)
Working software

regression testing

Short sprint cycle


tal development

Rapid feedback
documentation

Automated
MDD Modeling as coding r
practices
Paired modeling c

Test-driven modeling c

Iterative and incremental modeling c

Modeling as live design r


documentation

Automated batch mode simulation c

Continuous modeling c

MDD tools chain r

Agile MDD Daily MDD plan update r


management
practices Daily MDD task status update r

MDD plan for the current sprint r

MDD lessons learned in the past r


sprint (what to keep, change, try)

(what) in agile MDD. Here, the corre- ming language, and we use UML code sprint. A senior developer pairs with a
sponding relationship represents that generator as a UML compiler. Devel- junior developer, if possible.
a given MDD practice corresponds to opment is one-way: forward engineer- This generally works in detecting
the counterpart of an agile practice, ing from UML to C or C++. We apply and resolving modeling issues instantly,
while the relate relationship means that paired development to UML modeling but not enough paring could be done
the agile practice applies to the related (that is, paired modeling). all the time for various program prior-
MDD practice or that the MDD prac- We observed that it’s essential for ity reasons. Another difficulty is that
tice supports or enables the related ag- MDD tools to be able to trace code rotating pairs asks for developers to
ile practice. generation issues at the UML action change domain knowledge frequently.
In the rest of this subsection, we an- language (SDL7 in our case) level back It’s a challenge to minimize productiv-
swer the how question—that is, how to to the UML model level. MDD tools ity impact due to ramp-up on domain
apply agile practices to MDD and use sometimes fail to do so. knowledge. This issue is alleviated by
MDD to support and enable agile prac- discussing potential domain knowledge
tices. In addition, the following discus- Paired modeling. This corresponds to issues with developers prior to pair as-
sion also includes lessons learned in the paired development agile practice. signment so that domain knowledge
practice. Typically, two developers (perhaps a transfer can be done in a controlled
developer and a customer representa- manner.
Modeling as coding. Here, we use tive) work together on UML model- In addition to paired modeling, we
UML as a high-level visual program- ing for one sprint and rotate pairs per also do paired review and training to

86 I E E E S O F T W A R E | W W W. C O M P U T E R . O R G / S O F T W A R E
ASN.1 (Abstract iSL (Interface Code generation
UML 2 Syntax Notation Specification configuration
help individuals come up to speed on One) Language) files
MDD tools and domain knowledge.

Test-driven modeling. This corre- UML signals and Code generation toolset
sponds to the test-driven development data types U2P
agile practice. In this practice, we
create UML sequence diagrams fi rst
and then use them to drive UML de- Hand coding (such as Data marshaling Application logic Platform integration
sign and development of test cases. external operations) code code code
At the beginning of a sprint, the fo-
cus of modeling and test case creation
is on signal names and order. The data Build
associated with a signal is ignored.
Accordingly, the focus of UML state
machines at the beginning of a sprint Component executable
is on receiving and sending signals
in the right order. The details of sig- FIGURE 2. Target platform code generation workflow. The toolset generates application
nal processing logic are ignored. Once logic code from a UML model, generates data marshaling code from iSL and ASN.1 files, and
all the test cases pass unit testing, we generates platform integration code from configuration files.
then add signal data fields into test
cases and the details of signal process- abling factor is to maximize automa- lyze testing results. In addition, MDD
ing logic into the state machines in the tion by an MDD tools chain, which tools should provide a command-based
UML model. includes maximized automatic code interface for simulation builds and ex-
This practice is most helpful for generation (see Figure 2) and auto- ecution to minimize human interaction.
keeping a large number of model mated regression testing by simulation. This practice plays a key role in au-
changes under control and preventing tomatically detecting UML modeling
defects rather than fi nding defects after Modeling as live design documen- problems so that we can stop the mod-
they occur in the UML model. tation. This is the result of applying eling activity promptly to fi nd the root
One diffi culty is that we can’t af- the agile manifesto “working soft- cause of problems.
ford to represent all possible error sce- ware over comprehensive documenta-
narios in sequence diagrams. Another tion” to UML modeling. In this prac- Continuous modeling. This corre-
diffi culty is that we can’t use sequence tice, we use the UML model as a live sponds to the agile practice of continu-
diagrams to represent nonfunctional design document to minimize manual ous integration. In this practice, we
requirements. So, we created a man- documentation.
ual test plan document to describe er- • merge UML design frequently,
ror scenarios and nonfunctional test Automated batch mode simulation. • perform automatic code generation
cases. This corresponds to the agile practice for simulation and automated batch
of automated regression testing. In this mode simulation many times in a
Iterative and incremental modeling. practice, we develop and verify individ- sprint, and
This corresponds to the counterpart of ual test cases fi rst, add them to the list • perform automatic code generation
agile practice. In this practice, we do for automated batch mode execution, for target platform testing and SIFT
UML modeling over multiple sprints, execute all the test cases in batch mode two or more times in a sprint.
repeat the same set of development ac- overnight, and fi nally analyze test re-
tivities in each sprint, and create and sults to fi nd the root cause of the failed Figure 2 shows the target platform code
evolve an executable model for each test cases. generation workflow.
sprint with an increment of functional- We observed that the UML sequence The automatic code generation is
ity on top of the model from the previ- diagram tracing capability of UML maximized in that it includes
ous sprint. simulation tools is key for verifying
The key is to keep the model execut- and debugging new test cases quickly. • UML code generation,
able in terms of both simulation and To capture issues, we use a different • data marshaling code generation,
target platform testing. One major en- dedicated developer each week to ana- and

M A R C H /A P R I L 2 0 1 1 | IEEE S O F T W A R E 87
FEATURE: SOFTWARE DEVELOPMENT

• platform integration code gen- input and generate C/C++ code. the high-level design phase to the sys-
eration. In choosing MDD tools, it’s very tem integration testing phase only. All
important to consider not only the ca- other phases follow a tailored V-Model
To succeed in this practice, we must pability of individual tools, but also process. This is justified because differ-
be able to merge UML model changes of interfacing to other tools to form a ent teams collaborate loosely.
frequently. Unfortunately, the current tools chain. To be productive, MDD In agile MDD, to align with the ag-
UML modeling tool has some major tools should provide any necessary ile process, MDD has been changed to
graphical merging problems when de- UML profile extensions and UML ac- enable end-to-end iterations—that is,
velopers merge many changes simulta- tion language adjustments. In addition, apply iterations to all phases, from sys-
neously. To alleviate this issue, we set UML language and tools training at tem requirements specification all the
up an integration branch and coordi- the beginning of a project is important, way down to system testing.
nate among developers so that we can but it’s not enough. It’s essential to pro-
merge a little at a time but frequently. vide agile MDD support upon request. System Engineering
Automatic code generation and sim- In both Motorola’s agile and MDD
ulation are two rewarding methods for Agile MDD management. We use the processes, the typical system engineer-
achieving mistake-proof development. agile project planning and manage- ing artifacts are handwritten docu-
They’re also the fundamental enabler ment tool VersionOne (www.version- ments (such as FrameMaker files). De-
for UML model refactoring. one.com) and the following agile MDD velopers usually use UML diagrams
UML integration testing can help management practices for the develop- only occasionally for documentation.
detect runtime issues with the UML ment sprint management: a daily MDD No downstream reuse is attempted.
model, data marshaling code, platform plan update in daily standup meetings, In agile MDD, to support short iter-
integration code, and other handwrit- a daily MDD task status update, fre- ation cycle time, we streamline system
ten code such as external operations. quent reviews of current sprint plans, engineering and development phases as
As part of SIFT, testing helps iden- and a sprint postmortem meeting for follows. We create a system engineer-
tify interoperability issues among lessons learned. ing UML model to precisely define a
different components within the ap- system architecture and its dynamic
plication subsystem and the external Comparison with behavior in a layered fashion. In this
interfaces between the subsystem and Stand-alone Agile way, a given application system is de-
its environment. and MDD Processes composed layer by layer until each leaf
From a high-level process view, agile active class can be implemented as a
MDD tools chain. In this practice, MDD seems to be nothing more than separate OS process (which is handled
we value the MDD tools chain over a trivial summation of stand-alone ag- as a separate UML model in the devel-
individual tools, using it in particu- ile and MDD processes. However, in opment sprint). We syntax check the
lar to maximize automation. This en- reality, it’s challenging to combine ag- system engineering model and create it
ables rapid feedback and other agile ile and MDD into a coherent process with downstream reuse in mind, such
practices. that can inherit the advantages of both as by reusing the interface, signals, and
Specifically, we use the following while also avoiding their shortcomings. corresponding sequence diagrams of
MDD tools as a tools chain: The major differences between agile each leaf active class in the develop-
MDD and stand-alone processes lie in ment sprint. Handwritten documents
• IBM Tau for UML modeling, streamlining MDD activities to align are created only for information that
• IBM Tester for unit and integration with agile processes. is not suitable for UML modeling, such
test harness, as textural system requirements.
• a UML-to-test case data types con- Iterative and Incremental Development
version tool, and The agile process applies iterations Coding
• a code generation toolset for UML, to all phases, from system require- In the agile process, coding means to
data marshaling, and platform inte- ments specification all the way down write programs in any chosen program-
gration code generation. to system testing. This is achieved by ming language. In MDD, the mean-
tight collaboration of different teams ing of coding varies depending on the
As an example of the tools chain’s us- through a feature team. UML modeling tools in use. For a tool
age, the code generation toolset can Motorola’s stand-alone MDD pro- that only supports a state-oriented state
take a UML model from IBM Tau as cess typically applies iterations from machine and uses a programming lan-

88 I E E E S O F T W A R E | W W W. C O M P U T E R . O R G / S O F T W A R E
guage as a UML action language, the In agile MDD, to streamline UML implement both integration and system
tool typically generates a code skele- unit testing and integration testing, testing environments. Like MDD, the
ton. In this case, coding is a mixture of we use the MDD tools chain for unit integration testing includes the entire
UML modeling and normal program- testing. On the UML side, we use UML model, related platform integra-
ming within the tool. If the tool sup- IBM Tau (a UML model verifier), and tion code, and data marshaling code as
ports reverse engineering, the coding on the unit test harness side, we use a whole. One difference is that in ag-
can also include modifying the tool- IBM Tester. We use a co-simulation ile MDD, the tools chain automatically
generated source code files in the specif- tool to bridge the communication be- generates both platform integration
ically marked regions and then reverse tween these two tools. In this man- code and data marshaling code. An-
engineering the changes back into the ner, unit testing means to execute test other difference is that, because we test
model. cases through a test harness. Similar the UML model as a whole in unit test-
In agile MDD, coding is modeling, to MDD, this type of testing can ap- ing, we reuse the same unit test cases
and the UML code generator is the ply to an individual active class, any for integration testing. In addition, the
UML compiler. In this manner, cod- active container class, or the entire same tools chain automates both inte-
ing is one-way: forward engineering model as a whole. A major difference gration and system testing.
from UML to C/C++. This is achieved is that this method is a combination of
by using an MDD tools chain that sup- both black- and white-box testing: the Test-Driven Development
ports UML transition-oriented state test harness treats the UML model as a In the agile process, test-driven devel-
machines and can automatically gener- black box, and the UML model verifier opment means to write unit test cases
ate fully executable code from a UML treats the UML model as a white box (that is, testing code with embedded
model. in that it shows internal message ex- class method calls) first, and then im-
changes among different active classes plement and test the class methods
Unit Testing in the model. A major advantage is that until the unit testing passes. In MDD,
In the agile process, we use a unit test- this method can test not only normal test-driven development means to cre-
ing tool (such as CppUnit for C++) to UML elements but also external opera- ate UML sequence diagrams first, then
instantiate objects of classes under test- tions. Another advantage is that it can create the UML model according to the
ing and call the methods of objects. be adapted to perform integration and sequence diagrams, and, finally, mod-
We test each class as a black box. In system testing. ify and execute sequence diagrams un-
MDD, unit testing is message driven. til the UML unit testing passes.
The way of performing unit testing Integration and System Testing In agile MDD, this practice is ex-
varies, depending on the capability of In the agile process, integration and tended to streamline unit, integration,
tools. For example, some UML mod- system testing includes testing all the and system testing. First, we create the
eling tools support the execution of classes of an application system (or UML sequence diagrams, then we cre-
UML sequence diagrams. In this case, subsystem), related platform integra- ate both UML model and test cases (for
unit testing means to execute sequence tion code, and data marshaling code as unit, integration, and system testing)
diagrams. This type of testing is white a whole. Testers use different test cases according to the sequence diagrams.
box in nature and can apply to an indi- and procedures for integration and sys- Finally, we execute the test cases until
vidual active class, any active container tem testing. the unit, integration, and system testing
class, or the entire model as a whole. A In MDD, integration testing in- pass.
major issue with this method is that it cludes testing an entire UML model,
can’t test external operations. A com- related platform integration code, and Results
mon solution is to maintain a sepa- data marshaling code as a whole. Both We applied agile MDD to the devel-
rate version of external operations for platform integration code and data opment of a real-time telecommunica-
simulation only. Another difficulty is marshaling code are typically created tion system successfully and released
that, because the message data can be by hand. The test cases, procedures, the product as planned. Our applica-
very complicated, it’s difficult and er- and environments for MDD integration tion system included five major com-
ror-prone to define and associate mes- testing are different from those for inte- ponents, two of which we modeled in
sage data with sequence diagrams by gration testing in an agile process. UML for automatic code generation.
hand. In addition, this testing method In agile MDD, to streamline unit, in- Agile MDD applied to the development
can only test the code generated for tegration, and system testing, the UML of these two UML-based autocoding
simulation. unit testing environment is adapted to components only. The development

M A R C H /A P R I L 2 0 1 1 | IEEE S O F T W A R E  89
FEATURE: SOFTWARE DEVELOPMENT

30
27
24 limited in increasing the total code gen-
21
18
eration percentage. It’s essential to au-
15 tomate data marshaling and platform
12 integration code generation to signifi-
09
06
cantly increase the total percentage of
03 code generation.
00 We divided the entire software de-
Workahead 1

Workahead 2

√ Sprint 3–IT1

√ Sprint 4–IT2

√ Sprint 5–IT3

√ Sprint 6–IT4

√ Sprint 7–IT5

√ Sprint 8–IT6

√ Sprint 9–IT7

√ Sprint 10–IT8

√ Sprint 11–IT9

√ Sprint 12–IT10
velopment life cycle into 10 iterations
and 12 sprints. Early in the project, the
team struggled to gain and maintain
traction because we failed to follow ag-
ile MDD practices. We started the proj-
FIGURE 3. Sample sprint velocity chart in terms of number of story points per sprint. The ect as a brand-new team that formed in
development reached the lowest sprint velocity level in Sprint 5, and stabilized and gained batches—not all team members joined
traction starting at Sprint 6 and later. at the same time. In particular, a sig-
nificant portion of the team started at
Sprint 6 in an overall plan of 12 sprints.
ABOUT THE AUTHORS

Many team members had no MDD


YUEFENG ZHANG is a senior systems/application engineer at background or prior agile experience.
UniqueSoft, a company specializing in model-driven development and In addition, most team members needed
engineering. His research interests include model-driven development,
to pick up new domain knowledge.
agile software development processes, aspect and service-oriented
modeling methodology and tools, and their applications to automatic As Figure 3 indicates, the develop-
code generation. Zhang has a PhD in computer science from the Uni- ment sprint velocity reached the lowest
versity of Western Ontario. Contact him at yuefeng.zhang@uniquesoft. level in Sprint 5. To get the project back
com.
on track, we created a quick baseline
of prior sprints because the agile MDD
SHAILESH PATEL is a software engineering development manager baseline wasn’t available, established
at Motorola. His research interests include model-driven development, a revised plan before executing Sprint
DFSS (Design for Six Sigma)-driven software development, agile soft-
6, eliminated manual detailed design
ware development processes, and software measurement. Patel has an
MS in computer engineering from the University of Illinois. Contact him documentation, and implemented test-
at CSG024@motorolasolutions.com. driven modeling and other agile MDD
practices. After taking these actions,
the development stabilized and gained
traction starting at Sprint 6 and going
forward.
Similar to Mike Cohn’s defi nition
of velocity,8 the sprint velocity in Fig-
of other hand-coded components fol- a high percentage of code generation in ure 3 is in terms of the number of story
lowed the normal agile process. All the conjunction with agile MDD practices, points (similar to use case scenarios) ac-
interfaces among these components are the productivity in number of source tually completed in each sprint. As we
formally defi ned in formal languages— code lines per staff month increased mentioned earlier, we used VersionOne
Interface Specification Language threefold compared with hand coding. for agile project planning and manage-
or Abstract Syntax Notation One We also observed that the quality of au- ment. The data for Figure 3 comes from
(http://www.obj-sys.com/asn1tutorial/ tomatically generated code in terms of this tool. The story points are the units
asn1only.html)—for later marshaling defects density is significantly higher of work effort measured and tracked in
code generation. than manual code. VersionOne.
As Figure 2 shows, an automatic Regarding UML code generation, We observed that, as we approached
code generation toolset maximizes au- we observed that the more complicated the release due date, the defect closing
tomatic code generation. More than 93 the UML state machines, the higher the rate couldn’t catch up with the defect
percent of the entire component code UML automatic code generation per- opening rate because certain types of
was automatically generated. With such centage. UML code generation alone is testing (such as load or stress testing,

90 I E E E S O F T W A R E | W W W. C O M P U T E R . O R G / S O F T W A R E
availability testing, and robust testing) Agile MDD is still relatively new in References
happened in the last few weeks. We real software development. The learn- 1. K. Schwaber and M. Beedle, Agile Software
Development with SCRUM, Pearson, 2002.
quickly got this under control by im- ing curve is sharp for any new orga- 2. K. Beck, Extreme Programming Explained,
proving code inspection and the change nization to adopt due to process, cul- Addison-Wesley, 2000.
request resolution process. ture, methodology, and other related 3. I. Jacobson, G. Booch, and J. Rumbaugh,
The Unified Software Development Process,
changes. Thus, adopting a new agile Addison-Wesley, 1999.

F
MDD process is not likely to produce 4. T. Stahl and M. Volter, Model-Driven Soft-
rom the MDD perspective, a short-term benefit. But, for the long ware Development, John Wiley & Sons, 2006.
5. S.W. Ambler, The Object Primer, Cambridge
the key to success is to maxi- term, it’s ultimately worth it for large Univ. Press, 2004.
mize automation using the projects with multiple releases. 6. Y. Zhang, “Test-Driven Modeling for Model
MDD tools chain to enable mistake- Driven Development,” IEEE Software, vol.
21, no. 5, 2004, pp. 80–86.
free (high-quality) development and
7. J. Ellsberger, D. Hogrefe, and A. Sarma, SDL:
significant productivity increase. From Formal Object-Oriented Language for Com-
the agile perspective, the key is to ef- municating Systems, Pearson, 1997.
8. M. Cohn, Agile Estimating and Planning,
ficiently achieve end-to-end iterations,
Acknowledgments Pearson, 2006.
from system engineering all the way We thank the editors and reviewers for their
down to system testing. This requires constructive comments. We also thank Mo-
streamlining different process activities torola managers (especially Cathal Tierney Selected CS articles and columns
and Mike Wirtjes) for their strong support are also available for free at
such as system engineering, develop- for agile model-driven development and ap-
ment, and testing. proval of this article’s publication. http://ComputingNow.computer.org.

SUBSCRIBE TODAY
KEEP YOUR
COPY OF
IEEE SOFTWARE
FOR YOURSELF!

Give subscriptions
to your colleagues
or as graduation or
promotion gifts—
way better than a tie!

IEEE Software
is the authority on
translating software
theory into practice.

www.computer.org/
software/SUBSCRIBE

M A R C H /A P R I L 2 0 1 1 | IEEE S O F T W A R E  91

You might also like