You are on page 1of 34

Topics

 Introduction
 The Fit
 Common Practises
 Modelling Specific Practises
 XP Objections to Agile Modelling
 Agile Modelling and Planning XP Projects
 Initial Project Planning .
 Iteration/Release Planning
 XP Implementation Phase
Agile Modelling (AM) and eXtreme Programming (XP) are
from the agile movement and motivated by the desire to
produce better software faster.
Dissimilarities:

XP does not encourage big up-front modelling .

Agile Modelling needs to be applied with some other development


methodology to be beneficial which brings a suite of agile techniques to
the process of modelling.

XP does do modelling, but not “big up-front modelling.”

Modelling is performed as and when required during the lifetime of an


XP project.
When Modeling is applied, Agile Modelling practises can be extremely
useful.
Many of the Agile Modelling practises fit straight into XP and are
the modelling equivalent of the XP programming-oriented practises.

 Agile Modelling’s emphasis is modelling and XP’s emphasis is


programing,.
The following practices doesn’t have place within XP:
• model with a purpose,
• using multiple models
• know your models.

Does not stress on the act of modelling or on the models


created.

 Focused on the use of stand-up modelling meetings where


existing code is analysed or new code is explored through the
use of diagrams
XP does not have much to say about the act of modelling
or of the models that might be created.

There are a number of purposes to modelling which can


be very relevant to XP.
• “Model to Understand”
• “Model to Communicate”
Relevant when refactoring or
extending the code.

The nature of object-oriented


systems necessitates considering
cooperating classes together.

. Review the instances of the


classes being created, interacted
and are discarded.

To produce a structural class


diagram and one or more sequence
diagrams to help me understand
the code.

Creation of class diagram using


Omondo plug-in for Eclipse is
shown in the diagram.
Free Hand Structure
 Source code don’t explain the ideas.

Pair programming strategy calls a meeting to run through their


ideas with the partner in XP . Models serve the best form of
communication involving white boards, post-it notes, index cards,
etc

 “Model to understand” and “Model to communicate,” begins


with “valid purpose.”.
Complete understanding requires the following to be reviewed:
class diagram (for the system structure),
 sequence diagram (for its behaviour),
 data diagram (for the database representation), etc.
Knowing the tools is important for both agile modeller or XP
developer.

XP developers and Agile modeller needs to understand the models


available.

Understand the strengths and weaknesses of different types of


models.

Helps to keep models as simple as possible.


Modelling is all about big up-front design (BMUF – Big Modelling
Up-Front syndrome)

Allmodels are permanent documents.

You need to use a complex modelling tool.

You need to know, and use, UML to create models.

XP does not encourage modelling.

XP does not create any documentation


An XP project is planned at a number of levels and at various
points during an XP projects lifetime .

Agile Modelling practises may be more or less relevant at


different stages during this process.

.
Primary steps of planning process
 Initial planning game
 Elaboration process

Initial Planning Game


 Business and development resort to modelling to help them clarify the
user stories.
By applying AgileModelling practices, modelling can be controlled and
focused.
For e.g.,when a User Interface mock up might be created, with
some simple flowcharts to prototype system behaviour as a way of
elaborating a user story,planning can help.
User interface design
The flow diagram expresses the flow when the submit button is
pressed is drawn on a white board.
The eventual application will be implemented as a
Java 2 Enterprise Editionbased web application.
Models are created to know the requirements of the system which in turn help
to produce better estimates, etc.
Release planning game:

With the initial planning game,AgileModelling practises can help focus the
modelling activities to clarify user requirements.

Elaboration process:

 Typically a shorter process than project planning phase.


 Agile Modelling can be applied to ensure that modelling does not become
a burden.
Iteration planning:

Breaking down user stories into tasks, is necessary to model the


implementation of user stories.

Involve initial class structures, behaviour, etc. which allow tasks


to be identified, clarified or split up.

This is not large up-front design, as the models may be discarded


or may be intended to help elaborate the tasks.
 The point at which the code actually gets written within an XP
project .

Helps in understanding the code in order to refactor it.

Implementation oriented practises, such as “Test-first coding,” and


“Refactoring,” are focussed rather than the more process-oriented
ones like, “The Planning Game” or the “40 hour week rule.”

The practises followed in this section are:


a. refactoring,
b. test-first coding,
c. simple design and
d. pair programming.
Refactoring is primarily a code improvement technique .Key issues to
consider when refactoring:
 Make sure you know how to improve the code.
 Make sure what you have done has improved the code.
Make sure you shouldn’t refactor
“When you haven’t got a clear plan of how you will improve the
code.”

To gain a better understanding modelling various aspects of the system


can help.

 By modifying the model, you can evaluate how you might refactor it
and whether it appears to have benefited from the refactoring. Lot
cheaper than actually coding the changes and then considering the
results.
AgileModelling practises application can determine if they need to be
revised or not. For example, by considering the following two Agile
Modelling practises:
 Update only when it hurts not to do so.
 Discard temporary models.

Tools that provide “in sync” modelling can really help agile Modelling
during refactoring.

Tools minimises the extra work required to produce the models but
maximises the benefits from having the models.

For e.g. models can be created at the click of a few buttons (including
sequence diagram style models) and any changes subsequently made to
the source code are immediately reflected in the models.
Test-first coding essentially follow this cycle:
1. Write a test.
2. Write the code to be tested.
3. Run the test/get the code to work.
4. If the test has passed, then return to step 1 until finished.

Modelling may be relevant is once a test has been written focus is on


implementing the business code.
Modify the test-first coding cycle to the following, maximizes the XP
practice, as well as, supporting the AgileModelling principle of rapid
feedback:
1. Write a test.
2. Model the solution.
3. Implement the solution.
4. Run the test/get the code to work.
5. Discard temporary models.
6. If the test has passed, then return to step 1 until finished.
The XP practise of simple design aims to promote the simplest implementation
that will:
1. Run all the tests.
2. Has no duplicate code.
3. Makes it clear to anyone reading the code what it is meant to do.
4. Have the fewest possible classes and methods.

Agile Modelling is about designing for today and leaving tomorrow to tomorrow.
There are in fact a variety of Agile Modelling practises that also promote simplicity
within modelling. These are:
1. Create simple content.
2. Depict models simply.
3. Apply patterns gently.
4. Formalise contract models.
Pair programming involves two developers working together at a
single machine.

Within the pair, one developer controls the mouse and keyboard
(the driver) while the other essentially monitors what the first is
doing (the navigator).

Pair communicates and understands what they are trying to


achieve.

 The navigator understands how the driver is intended to achieve


their goals.

 There are situations when these goals can be achieved merely by


discussing what is to be done while sitting at the terminal.

You might also like