45
©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 1 Rapid software development

Software Engineering - Ch17

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 1

Rapid software development

Page 2: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 2

Objectives

● To explain how an iterative, incrementaldevelopment process leads to faster deliveryof more useful software

● To discuss the essence of agile developmentmethods

● To explain the principles and practices ofextreme programming

● To explain the roles of prototyping in thesoftware process

Page 3: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 3

Topics covered

● Agile methods

● Extreme programming

● Rapid application development

● Software prototyping

Page 4: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 4

Rapid software development

● Because of rapidly changing businessenvironments, businesses have to respondto new opportunities and competition.

● This requires software and rapiddevelopment and delivery is not often themost critical requirement for softwaresystems.

● Businesses may be willing to accept lowerquality software if rapid delivery of essentialfunctionality is possible.

Page 5: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 5

Requirements

● Because of the changing environment, it isoften impossible to arrive at a stable,consistent set of system requirements.

● Therefore a waterfall model of developmentis impractical and an approach todevelopment based on iterative specificationand delivery is the only way to deliversoftware quickly.

Page 6: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 6

Characteristics of RAD processes

● The processes of specification, design andimplementation are concurrent. There is no detailedspecification and design documentation isminimised.

● The system is developed in a series of increments.End users evaluate each increment and makeproposals for later increments.

● System user interfaces are usually developed usingan interactive development system.

Page 7: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 7

An iterative development process

Page 8: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 8

Advantages of incremental development

● Accelerated delivery of customer services.Each increment delivers the highest priorityfunctionality to the customer.

● User engagement with the system. Usershave to be involved in the developmentwhich means the system is more likely tomeet their requirements and the users aremore committed to the system.

Page 9: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 9

Problems with incremental development

● Management problems• Progress can be hard to judge and problems hard to find

because there is no documentation to demonstrate whathas been done.

● Contractual problems• The normal contract may include a specification; without a

specification, different forms of contract have to be used.

● Validation problems• Without a specification, what is the system being tested

against?

● Maintenance problems• Continual change tends to corrupt software structure

making it more expensive to change and evolve to meetnew requirements.

Page 10: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 10

Prototyping

● For some large systems, incrementaliterative development and delivery may beimpractical; this is especially true whenmultiple teams are working on different sites.

● Prototyping, where an experimental systemis developed as a basis for formulating therequirements may be used. This system isthrown away when the system specificationhas been agreed.

Page 11: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 11

Incremental development and prototyping

Page 12: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 12

Conflicting objectives

● The objective of incremental development isto deliver a working system to end-users.The development starts with thoserequirements which are best understood.

● The objective of throw-away prototyping is tovalidate or derive the system requirements.The prototyping process starts with thoserequirements which are poorly understood.

Page 13: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 13

Agile methods

● Dissatisfaction with the overheads involved in designmethods led to the creation of agile methods. Thesemethods:• Focus on the code rather than the design;

• Are based on an iterative approach to softwaredevelopment;

• Are intended to deliver working software quickly andevolve this quickly to meet changing requirements.

● Agile methods are probably best suited tosmall/medium-sized business systems or PCproducts.

Page 14: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 14

Principles of agile methods

Principle Description

Customer involvement The customer should be closely involved throughout thedevelopment process. Their role is provide and prioritise newsystem requirements and to evaluate the iterations of the system.

Incremental delivery The software is developed in increments with the customerspecifying the requirements to be included in each increment.

People not process The skills of the development team should be recognised andexploited. The team should be left to develop their own ways ofworking without prescriptive processes.

Embrace change Expect the system requirements to change and design the systemso that it can accommodate these changes.

Maintain simplicity Focus on simplicity in both the software being developed and inthe development process used. Wherever possible, actively workto eliminate complexity from the system.

Page 15: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 15

Problems with agile methods

● It can be difficult to keep the interest of customerswho are involved in the process.

● Team members may be unsuited to the intenseinvolvement that characterises agile methods.

● Prioritising changes can be difficult where there aremultiple stakeholders.

● Maintaining simplicity requires extra work.

● Contracts may be a problem as with otherapproaches to iterative development.

Page 16: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 16

Extreme programming

● Perhaps the best-known and most widelyused agile method.

● Extreme Programming (XP) takes an‘extreme’ approach to iterative development.• New versions may be built several times per

day;• Increments are delivered to customers every 2

weeks;• All tests must be run for every build and the

build is only accepted if tests run successfully.

Page 17: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 17

The XP release cycle

Page 18: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 18

Extreme programming practices 1

Incremental planning Requirements are recorded on Story Cards and the Stories to beincluded in a release are determined by the time available andtheir relative priority. The developers break these Stories intodevelopment ‘Tasks’.

Small Releases The minimal useful set of functionality that provides businessvalue is developed first. Releases of the system are frequent andincrementally add functionality to the first release.

Simple Design Enough design is carried out to meet the current requirementsand no more.

Test first development An automated unit test framework is used to write tests for a newpiece of functionality before that functionality itself isimplemented.

Refactoring All developers are expected to refactor the code continuously assoon as possible code improvements are found. This keeps thecode simple and maintainable.

Page 19: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 19

Extreme programming practices 2

Pair Programming Developers work in pairs, checking each other’s work andproviding the support to always do a good job.

Collective Ownership The pairs of developers work on all areas of the system, so thatno islands of expertise develop and all the developers own all thecode. Anyone can change anything.

Continuous Integration As soon as work on a task is complete it is integrated into thewhole system. After any such integration, all the unit tests in thesystem must pass.

Sustainable pace Large amounts of over-time are not considered acceptable as thenet effect is often to reduce code quality and medium termproductivity

On-site Customer A representative of the end-user of the system (the Customer)should be available full time for the use of the XP team. In anextreme programming process, the customer is a member of thedevelopment team and is responsible for bringing systemrequirements to the team for implementation.

Page 20: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 20

XP and agile principles

● Incremental development is supported throughsmall, frequent system releases.

● Customer involvement means full-time customerengagement with the team.

● People not process through pair programming,collective ownership and a process that avoids longworking hours.

● Change supported through regular system releases.

● Maintaining simplicity through constant refactoring ofcode.

Page 21: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 21

Requirements scenarios

● In XP, user requirements are expressed asscenarios or user stories.

● These are written on cards and thedevelopment team break them down intoimplementation tasks. These tasks are thebasis of schedule and cost estimates.

● The customer chooses the stories forinclusion in the next release based on theirpriorities and the schedule estimates.

Page 22: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 22

Story card for document downloading

Page 23: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 23

XP and change

● Conventional wisdom in softwareengineering is to design for change. It isworth spending time and effort anticipatingchanges as this reduces costs later in the lifecycle.

● XP, however, maintains that this is notworthwhile as changes cannot be reliablyanticipated.

● Rather, it proposes constant codeimprovement (refactoring) to make changeseasier when they have to be implemented.

Page 24: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 24

Testing in XP

● Test-first development.

● Incremental test development fromscenarios.

● User involvement in test development andvalidation.

● Automated test harnesses are used to run allcomponent tests each time that a newrelease is built.

Page 25: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 25

Task cards for document downloading

Page 26: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 26

Test case description

Page 27: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 27

Test-first development

● Writing tests before code clarifies therequirements to be implemented.

● Tests are written as programs rather thandata so that they can be executedautomatically. The test includes a check thatit has executed correctly.

● All previous and new tests are automaticallyrun when new functionality is added. Thuschecking that the new functionality has notintroduced errors.

Page 28: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 28

Pair programming

● In XP, programmers work in pairs, sitting together todevelop code.

● This helps develop common ownership of code andspreads knowledge across the team.

● It serves as an informal review process as each lineof code is looked at by more than 1 person.

● It encourages refactoring as the whole team canbenefit from this.

● Measurements suggest that developmentproductivity with pair programming is similar to thatof two people working independently.

Page 29: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 29

Rapid application development

● Agile methods have received a lot ofattention but other approaches to rapidapplication development have been used formany years.

● These are designed to develop data-intensive business applications and rely onprogramming and presenting informationfrom a database.

Page 30: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 30

RAD environment tools

● Database programming language

● Interface generator

● Links to office applications

● Report generators

Page 31: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 31

A RAD environment

Page 32: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 32

Interface generation

● Many applications are based around complex formsand developing these forms manually is a time-consuming activity.

● RAD environments include support for screengeneration including:• Interactive form definition using drag and drop

techniques;

• Form linking where the sequence of forms to bepresented is specified;

• Form verification where allowed ranges in form fields isdefined.

Page 33: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 33

Visual programming

● Scripting languages such as Visual Basicsupport visual programming where theprototype is developed by creating a userinterface from standard items andassociating components with these items

● A large library of components exists tosupport this type of development

● These may be tailored to suit the specificapplication requirements

Page 34: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 34

Visual programming with reuse

Page 35: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 35

Problems with visual development

● Difficult to coordinate team-baseddevelopment.

● No explicit system architecture.

● Complex dependencies between parts of theprogram can cause maintainability problems.

Page 36: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 36

COTS reuse

● An effective approach to rapid developmentis to configure and link existing off the shelfsystems.

● For example, a requirements managementsystem could be built by using:• A database to store requirements;

• A word processor to capture requirements andformat reports;

• A spreadsheet for traceability management;

Page 37: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 37

Compound documents

● For some applications, a prototype can be createdby developing a compound document.

● This is a document with active elements (such as aspreadsheet) that allow user computations.

● Each active element has an associated applicationwhich is invoked when that element is selected.

● The document itself is the integrator for the differentapplications.

Page 38: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 38

Application linking

Page 39: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 39

Software prototyping

● A prototype is an initial version of a systemused to demonstrate concepts and try outdesign options.

● A prototype can be used in:• The requirements engineering process to help

with requirements elicitation and validation;

• In design processes to explore options anddevelop a UI design;

• In the testing process to run back-to-back tests.

Page 40: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 40

Benefits of prototyping

● Improved system usability.

● A closer match to users’ real needs.

● Improved design quality.

● Improved maintainability.

● Reduced development effort.

Page 41: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 41

Back to back testing

Page 42: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 42

The prototyping process

Page 43: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 43

Throw-away prototypes

● Prototypes should be discarded afterdevelopment as they are not a good basis fora production system:• It may be impossible to tune the system to meet

non-functional requirements;• Prototypes are normally undocumented;• The prototype structure is usually degraded

through rapid change;• The prototype probably will not meet normal

organisational quality standards.

Page 44: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 44

Key points

● An iterative approach to software development leadsto faster delivery of software.

● Agile methods are iterative development methodsthat aim to reduce development overhead and soproduce software faster.

● Extreme programming includes practices such assystematic testing, continuous improvement andcustomer involvement.

● The approach to testing in XP is a particular strengthwhere executable tests are developed before thecode is written.

Page 45: Software Engineering - Ch17

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 17 Slide 45

Key points

● Rapid application development environmentsinclude database programming languages,form generation tools and links to officeapplications.

● A throw-away prototype is used to explorerequirements and design options.

● When implementing a throw-away prototype,start with the requirements you leastunderstand; in incremental development,start with the best-understood requirements.