Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach Software Engineering for Students A Programming Approach

web.firat.edu.tr
from web.firat.edu.tr More from this publisher
21.08.2013 Views

These are qualified by the statement that while there is value in the items on the right, the items on the left are valued more. Thus agile methods do not throw out the baby with the bath water; they simply give precedence to certain choices. The first value recognizes that individual creativity and group collaboration are more effective than following a prescriptive methodology. The second value recognizes that software is code, not the accompanying documentation. The third value recognizes that a good relationship between the clients and the developers is more important than arguing about contracts. The fourth value prioritizes users’ changing needs rather than adhering to some meaningless inflexible plan. Twelve supporting “statements” give guidance on achieving the four core values: 1. our highest priority is to satisfy the customer through early and frequent delivery of software 2. deliver working software frequently, from a couple of weeks to a couple of months, with a preference for the shorter timescale 3. working software is the primary measure of progress 4. welcome changing requirements, even late in development 5. business people and developers work together daily throughout the project 6. build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done. 7. the most efficient and effective method of conveying information to and within a development team is face-to-face conversation 8. the best architectures, requirements and designs emerge from self-organizing teams 9. continuous attention to technical excellence and good design enhance agility 10. agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely 11. simplicity – the art of maximizing the amount of work not done – is essential 12. at regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly. We shall see how these can be put into practice shortly, when we look at extreme programming. Tools for agile methods 26.2 The agile manifesto 331 Many people believe that appropriate software tools are vital to successful software projects. Agile methods take an independent attitude to tools and use whatever tools are useful, particularly the simplest tools available. This might mean a computer aided software engineering (CASE) tool but it also includes non-computer tools. Here are examples. Sketches can be made on paper, using color as appropriate for all sorts of diagrams, informal and more formal (such as UML diagrams). A scanner or digital camera can record the results for computer storage.

332 Chapter 26 ■ Agile methods and extreme programming A whiteboard and colored pens are useful for drawing diagrams, such as use case diagrams, class diagrams, user interface mock-ups and also informal sketches. It is easy to change the diagram, and it can be viewed collaboratively and discussed by a group of people. A digital camera is a convenient way of capturing the information on a whiteboard. Index cards and a large table are useful for designing the class structure of software, using CRC (Class–Responsibility–Collaborator) modeling (see Chapter 11). The cards can easily be moved around, changed or removed. Again a digital camera can record the end product. Sticky notes can be used with a whiteboard or a large sheet of paper to create diagrams during design. Simple tools such as those mentioned are cheap, portable, quick to use, flexible, assist collaborative working and can be used for communication with the user. On the other hand, simple tools can be limited, are not amenable to computer-assisted checking and do not support distributed working. 26.3 ● Extreme programming This is perhaps the best-known of the agile methods. Its name conveys something dangerous and foolhardy, but this is far from true. The name instead denotes a radical perspective which is a contrast to heavyweight methods. Centrally, extreme programming (XP) recognizes that requirements continually change and the method embraces the changes, rather than considering them to be disruptive. Before we look at the values of XP and its full set of techniques, we will explore its principal approaches. In XP, the client (or a representative) is always present as a member of the development team. This person writes use cases, termed stories in XP. (We met these in Chapter 4 on requirements engineering.) A use case is a small individual function that is required of the software. It is written in English (or another natural language) in non-technical language and typically occupies three sentences. It is a statement of a requirement, not a statement of implementation – what to implement, not how to implement. Thus a use case is a useful fragment of a requirements specification. For each use case, the developers make an estimate of how much effort will be needed for implementation. Because use cases are small, this will typically be a few weeks of person time. A longer estimate means that the use case is too large and needs to be broken down into smaller use cases. Once a use case has been priced, and a decision has been taken to implement it, then the client provides more detailed information about the requirement. The client specifies acceptance tests for each use case. These are a set of black box (functional) tests to ascertain whether the use case has been implemented correctly. XP uses the term acceptance test, rather than functional test, to emphasize their role in guaranteeing a system that is acceptable to the client. Acceptance tests are automated, so that they can be run repeatedly easily and objectively. A use case has not been successfully implemented until all its acceptance tests have been passed. The client is responsible for checking that tests have ultimately been successful. Acceptance tests drive the project. They are written before implementation of the use case is begun. They are repeatedly applied before and while the use case is being

332 Chapter 26 ■ Agile methods and extreme programming<br />

A whiteboard and colored pens are useful <strong>for</strong> drawing diagrams, such as use case diagrams,<br />

class diagrams, user interface mock-ups and also in<strong>for</strong>mal sketches. It is easy to<br />

change the diagram, and it can be viewed collaboratively and discussed by a group of<br />

people. A digital camera is a convenient way of capturing the in<strong>for</strong>mation on a whiteboard.<br />

Index cards and a large table are useful <strong>for</strong> designing the class structure of software,<br />

using CRC (Class–Responsibility–Collaborator) modeling (see Chapter 11). The cards<br />

can easily be moved around, changed or removed. Again a digital camera can record the<br />

end product.<br />

Sticky notes can be used with a whiteboard or a large sheet of paper to create diagrams<br />

during design.<br />

Simple tools such as those mentioned are cheap, portable, quick to use, flexible,<br />

assist collaborative working and can be used <strong>for</strong> communication with the user. On the<br />

other hand, simple tools can be limited, are not amenable to computer-assisted checking<br />

and do not support distributed working.<br />

26.3 ● Extreme programming<br />

This is perhaps the best-known of the agile methods. Its name conveys something dangerous<br />

and foolhardy, but this is far from true. The name instead denotes a radical perspective<br />

which is a contrast to heavyweight methods. Centrally, extreme programming<br />

(XP) recognizes that requirements continually change and the method embraces the<br />

changes, rather than considering them to be disruptive.<br />

Be<strong>for</strong>e we look at the values of XP and its full set of techniques, we will explore its<br />

principal approaches.<br />

In XP, the client (or a representative) is always present as a member of the development<br />

team. This person writes use cases, termed stories in XP. (We met these in Chapter 4 on<br />

requirements engineering.) A use case is a small individual function that is required of the<br />

software. It is written in English (or another natural language) in non-technical language<br />

and typically occupies three sentences. It is a statement of a requirement, not a statement<br />

of implementation – what to implement, not how to implement. Thus a use case is a useful<br />

fragment of a requirements specification. For each use case, the developers make an<br />

estimate of how much ef<strong>for</strong>t will be needed <strong>for</strong> implementation. Because use cases are<br />

small, this will typically be a few weeks of person time. A longer estimate means that the<br />

use case is too large and needs to be broken down into smaller use cases. Once a use case<br />

has been priced, and a decision has been taken to implement it, then the client provides<br />

more detailed in<strong>for</strong>mation about the requirement.<br />

The client specifies acceptance tests <strong>for</strong> each use case. These are a set of black box<br />

(functional) tests to ascertain whether the use case has been implemented correctly. XP<br />

uses the term acceptance test, rather than functional test, to emphasize their role in<br />

guaranteeing a system that is acceptable to the client. Acceptance tests are automated,<br />

so that they can be run repeatedly easily and objectively. A use case has not been successfully<br />

implemented until all its acceptance tests have been passed. The client is<br />

responsible <strong>for</strong> checking that tests have ultimately been successful.<br />

Acceptance tests drive the project. They are written be<strong>for</strong>e implementation of the<br />

use case is begun. They are repeatedly applied be<strong>for</strong>e and while the use case is being

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!