SP04 Rapid Software Development
SP04 Rapid Software Development
3. Problems
- It can be difficult to keep the interest of customers who are involved in the
process
- Team members may be unsuited to the intense involvement that
characterizes agile methods
- Prioritizing changes can be difficult where there are multiple stakeholders
- Maintain simplicity requires extra work
- Contracts may be a problem as with approaches to iterative development
- Suitable for the development of small or medium – sized business system
and personal computer products
- Not well suited to:
o Large – scale systems development with the development teams in
different places and where there may be complex interactions with
other hardware and software systems
o Critical systems development where a detailed analysis of all of the
system requirements is necessary to understand their safety or security
implications.
EXTREME PROGRAMMING (XP)
Perhaps the best – known and most widely used agile method
1. Idea of XP
- Extreme Programming takes an “extreme” approach to iterative
development
o New version may be built several times per day
o Increments are delivered to customers every 2 weeks
o All tests must be run for every build and the build is only accepted if
tests run successfully
2. The XP release cycle
- Incremental planning:
o Requirements are recorded on Story Cards
o Stories to be included in a release are determined by the time available
and their relative priority
o The developers break these Stories into development ‘Tasks’
- Small:
o The minimal useful set of functionality that provides business value is
developed first
o Releases of the system are frequent and incrementally add
functionality to the first release
- Simple Design:
o Enough design is carried out to meet the current requirements and no
more
- Test first development:
o An automated unit test framework is used to write tests for a new
piece of functionality before that functionality itself is implemented
- Refactoring:
o All developers are expected to refactor the code continuously as soon
as possible code improvements are found
o This keeps the code simple and maintainable
- Pair Programming:
o Developers work in pairs, checking each other’s work and providing
the support to always do a good job
- Collective Ownership:
o The pairs of developers work on all areas of the system, so that no
island of expertise develop and all the developers own all the code
o Anyone can change anything
- Continuous Integration:
o As soon as work on a task is complete it is integrated into the whole
system
o After any such integration, all the unit tests in the system must pass
- Sustainable pace:
o Large amounts of over – time are not considered acceptable as the net
effect is often to reduce code quality and medium term productivity
- On – site Customer:
o A representative of the end – user of the system (the Customer) should
be available full time for the use of the XP team
o In an extreme programming process, the customer is a member of the
development team and is responsible for bringing system
requirements to the team for implementation.
3. XP and agile principles
Principle Description in XP
Customer Full – time customer engagement with the team:
involvement - To help develop stories that define the requirements
- To help prioritize the features to be implemented in
each release
- To help develop acceptance tests which assess
whether or not the system meets its requirements
Incremental Small, frequent system releases
delivery
People not Pair programming
process Collective ownership
Process that avoids long working hours
Embrace change Regular system releases
Test – first development
Continuous integration
Maintain Constant refactoring of code
simplicity
3.1. Pair programming
- In XP, programmers work in pairs, sitting together to develop code
- This helps develop common ownership of code and spreads knowledge
across the team
- This serves as an informal review process as each line of code is looked at
by more than 1 person
- This encourages refactoring as the whole team can benefit from this
- Measurements suggest that development productivity with pair
programming is similar to that of two people working independently
Requirements scenarios: Story card for document downloading
- In XP, user requirements are expressed as scenarios or user stories; these are
written on cards.
- The development team break these stories down into implementation tasks.
These tasks are the basic of schedule and cost estimates
- The customer chooses the stories for inclusion in the next release based on
their priorities and the schedule estimates
Downloading and printing an article
First, you select the article that you want
from a displayed list
You then have to tell the system how you
will pay for it; this can either be through a
subscription, though a company account or
by credit card
Alter this, you get a copyright form from
the system to fill it
When you have submitted this, the article
you want is downloaded onto your
computer
You then choose a printer and a copy of the
article is printed
You tell the system printing has been
successful
If the article is a print – only article, you
can’t keep the PDF version, so it is
automatically deleted from your computer.
Task cards for document downloading:
- Task 1: Implement principal workflow
- Task 2: Implement article catalog and selection
- Task 3: Implement payment collection
Payment may be made in 3 different ways
The user selects which way they wish to pay
If the user has a library subscription, then they can input the subscriber key
which should be checked by the system
Alternatively, they can input an organizational account number. If this is
valid, a debit of the cost of the article is posted to this account
Finally, they may input a 16 digit credit card number and expiry date. This
should be checked for validity and, if valid a debit is posted to that credit
card account.
3.2. Testing in XP
- Test – first development
- Incremental test development from scenarios
- User involvement in test development and validation
- Automated test harnesses are used to run all component tests each time that
a new release is built
Test – first development
- Writing test before code clarifies the requirements to be implemented
- Test are written as programs rather than data so that they can be executed
automatically. The test includes a check that it has executed correctly
- All previous and new tests are automatically run when new functionality is
added. Thus checking that the new functionality has not introduced errors
Test 4: Test credit card validity
Input:
A string representing the credit card
number and two integers representing the
month and year when the card expires
Tests:
Check that all bytes in the string are digits
Check that the month lies between 1 and
12 and the year is greater than or equal to
the current year
Using the first 4 digits of the credit card
number, check that the card issuer is valid
by looking up the card issuer table.
Check credit card validity by submitting
the card number and expire date
information to the card issuer
Output:
OK or error message indicating that the
card is invalid
3.3. Refactoring
- XP processes refactoring to make changes easier when they have to be
implemented
- Refactoring is the process of constant code improvement where cod is
reorganized and rewritten to make it more efficient, easier to understand, etc.
- Refactoring is required because frequent releases mean that code is
developed incrementally and therefore tends to become messy
- Refactoring should not change the functionality of the system
- Automated testing simplifies refactoring as you can see if the changed code
still runs the tests successfully
4. Problem with XP
- Customer involvement:
o It may be difficult or impossible to find a customer who can represent
all stakeholders and who can be taken off their normal work to
become part of the XP team
o For generic products, there is no ‘customer’ – the marketing team may
not be typical of real customers
- Architectural design
o The incremental style of development can mean that inappropriate
architectural decisions are made at an early stage of the process
o Problems with these may not become clear until many features have
been implemented and refactoring the architecture is very expensive
- Test complacency:
o It is easy for a team to believe that because it has many tests, the
system is properly tested
o Because of the automated testing approach, there is a tendency to
develop tests that are easy to automate rather than tests that are ‘good’
tests
RAPID APPLICATION DEVELOPMENT
1. Concept
- Agile methods have received a lot of attention but other approaches to rapid
application development have been used for many years
- These are designed to develop data – intensive business applications and
rely on programming and presenting information from a database
2. Characteristics of RAD processes
- The processes of specification, design and implementation are concurrent
- The user requirements document defines only the most important
characteristics of the system
- There is no detailed specification
- Design documentation is minimized
- The system is developed in a series of increments
- End users evaluate each increment and make proposals for later increments
- System user interface are usually developed using an interactive
development system
3. RAD environment tools
- Database programming language: embed knowledge of the database
structure; include fundamental database manipulation operations
- Interface generator: create forms for data input and display
- Links to office applications: inks to office applications such as a spreadsheet
for the analysis and manipulation of numeric information or a word
processor for report template creation
- Report generators: define and create reports from information in the
database
Interface generation:
- Many applications are based around complex forms and developing these
forms manually is a time – consuming activity
- RAD environments include support for screen generation including:
o Interactive form definition using drag and drop techniques
o Form linking where the sequence of forms to be presented is specified
o Form verification where allowed ranges in form fields is defined
COST (Commercial Off The Shelf) reuse
- An effective approach to rapid development is to configure and link existing
off the shelf systems
- For example, a requirements management system could be built by using:
o A database to store requirements
o A word processor to capture requirements and format reports
o A spreadsheet for traceability management
Database programming languages
- Domain specific languages for business systems based around a database
management system
- Normally include a database query language, a screen generator, a report
generator and a spreadsheet
- May be integrated with a CASE toolset
- The language + environment is sometimes known as a fourth – generation
language (4GL)
- Cost – effective for small to medium sized business systems
RAPID PROTOTYPING
1. Concepts
1.1. Prototype
- A prototype is an initial version of a software system that is used to
demonstrate concepts, try out design options and, generally, to find out more
about the problem and its possible solutions
- A prototype is used:
o In the requirements engineering process: help customers and
developers understand the requirements for the system
Requirements elicitation: users can experiment with a prototype
to see how the system supports their work
Requirements validation: the prototype can reveal errors and
omissions in the requirements
o In the system design process: explore particular software solutions
and to support user interface design
o In the testing process: run back – to –back tests with the system that
will be delivered to the customer
- Prototyping is the rapid development of a system. Prototyping can be
considered as a risk reduction activity which reduces requirements, design
and testing risks.
1.2. Prototyping process
b. Visual programming
- Scripting languages such as Visual Basic support visual programming where
the prototype is developed by creating a user interface from standard items
and associating components with these items
- A large library of components exists to support this type of development
- These may be tailored to suit the specific application requirements
Visual programming with reuse