Software Engineering for Students A Programming Approach
Software Engineering for Students A Programming Approach Software Engineering for Students A Programming Approach
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
- Page 303 and 304: 280 Chapter 19 ■ Testing 19.3 Dev
- Page 305 and 306: 282 Chapter 19 ■ Testing 19.2 The
- Page 307 and 308: 284 Chapter 20 ■ Groups The term
- Page 309 and 310: 286 Chapter 20 ■ Groups Of course
- Page 311 and 312: 288 Chapter 20 ■ Groups • Exerc
- Page 314 and 315: CHAPTER 21 This chapter explains: 2
- Page 316 and 317: Stage Input Output 21.3 Feedback be
- Page 318 and 319: Summary The essence and the strengt
- Page 320 and 321: CHAPTER 22 This chapter: 22.1 ● I
- Page 322 and 323: 22.2 The spiral model 299 to try to
- Page 324 and 325: 22.4 ● Discussion Exercises 301 A
- Page 326 and 327: CHAPTER 23 Prototyping This chapter
- Page 328 and 329: Therefore, in summary: ■ the prod
- Page 330 and 331: 23.5 Evolutionary prototyping 307 U
- Page 332 and 333: Reuse components 23.6 Rapid prototy
- Page 334 and 335: Pitfalls For users, the problems of
- Page 336 and 337: Answers to self-test questions 313
- Page 338 and 339: 24.2 ● Big-bang implementation 24
- Page 340 and 341: Tested component Figure 24.1 Top-do
- Page 342 and 343: 24.7 ● Use case driven implementa
- Page 344 and 345: ■ middle-out ■ use case based.
- Page 346 and 347: SELF-TEST QUESTION 25.1 What is the
- Page 348 and 349: sharing of software or their own re
- Page 350 and 351: Summary 327 Inappropriate patches,
- Page 352 and 353: Further reading 329 Cathedral and t
- Page 356 and 357: 26.3 Extreme programming 333 develo
- Page 358 and 359: SELF-TEST QUESTION 26.3 Which of th
- Page 360 and 361: CHAPTER 27 This chapter explains:
- Page 362 and 363: Figure 27.1 The phases of the unifi
- Page 364 and 365: 27.5 ● Iteration 27.6 Case study
- Page 366 and 367: The transition phase Summary 343 Th
- Page 368: PART F PROJECT MANAGEMENT
- Page 371 and 372: 348 Chapter 28 ■ Teams The commun
- Page 373 and 374: 350 Chapter 28 ■ Teams Level of s
- Page 375 and 376: 352 Chapter 28 ■ Teams A chief pr
- Page 377 and 378: 354 Chapter 28 ■ Teams benefits o
- Page 379 and 380: 356 Chapter 28 ■ Teams • Furthe
- Page 381 and 382: 358 Chapter 29 ■ Software metrics
- Page 383 and 384: 360 Chapter 29 ■ Software metrics
- Page 385 and 386: 362 Chapter 29 ■ Software metrics
- Page 387 and 388: 364 Chapter 29 ■ Software metrics
- Page 389 and 390: 366 Chapter 29 ■ Software metrics
- Page 391 and 392: 368 Chapter 29 ■ Software metrics
- Page 393 and 394: CHAPTER 30 This chapter: 30.1 ● I
- Page 395 and 396: 372 Chapter 30 ■ Project manageme
- Page 397 and 398: 374 Chapter 30 ■ Project manageme
- Page 399 and 400: 376 Chapter 30 ■ Project manageme
- Page 401 and 402: 378 Chapter 30 ■ Project manageme
- Page 403 and 404: 380 Chapter 30 ■ Project manageme
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