Software Engineering I. Coping with changes
Discussion Giving reasons for your answer based on the type of system being developed, suggest the most appropriate generic software process model that might be used as a basis for managing the development of the following systems: A system to control anti-lock braking in a car A virtual reality system to support software maintenance A university accounting system that replaces an existing system An interactive travel planning system that helps users plan journeys with the lowest environmental impact 2
Coping with change Change is inevitable in all large software projects. Business changes lead to new and changed system requirements New technologies open up new possibilities for improving implementations Changing platforms require application changes Change leads to rework so the costs of change include both rework (e.g. re-analysing requirements) as well as the costs of implementing new functionality Coping with changes 3
BOEHM S SPIRAL MODEL 4
Boehm s spiral model Process is represented as a spiral rather than as a sequence of activities with backtracking. Each loop in the spiral represents a phase in the process. No fixed phases such as specification or design - loops in the spiral are chosen depending on what is required. Risks are explicitly assessed and resolved throughout the process. Boehm s spiral model 5
Boehm s spiral model of the software process Boehm s spiral model 6
Spiral model sectors Objective setting Specific objectives for the phase are identified. Risk assessment and reduction Risks are assessed and activities put in place to reduce the key risks. Development and validation A development model for the system is chosen which can be any of the generic models. Planning The project is reviewed and the next phase of the spiral is planned. Boehm s spiral model 7
Spiral model usage Spiral model has been very influential in helping people think about iteration in software processes and introducing the risk-driven approach to development. In practice, however, the model is rarely used as published for practical software development. Boehm s spiral model 8
RATIONAL UNIFIED PROCESS 9
RUP good practice Develop software iteratively Plan increments based on customer priorities and deliver highest priority increments first. Manage requirements Explicitly document customer requirements and keep track of changes to these requirements. Use component-based architectures Organize the system architecture as a set of reusable components. Visually model software Use graphical UML models to present static and dynamic views of the software. Verify software quality Ensure that the software meets organizational quality standards. Control changes to software Manage software changes using a change management system and configuration management tools. Rational Unified Process 10
Workflows RUP Phases Rational Unified Process 11
Inception RUP phases Establish the business case for the system. Elaboration Develop an understanding of the problem domain and the system architecture. Construction System design, programming and testing. Transition Deploy the system in its operating environment. Rational Unified Process 12
RUP engineering workflows Business modelling The business processes are modelled using business use cases. Requirements Actors who interact with the system are identified and use cases are developed to model the system requirements. Analysis and design A design model is created and documented using architectural models, component models, object models and sequence models. Implementation The components in the system are implemented and structured into implementation sub-systems. Automatic code generation from design models helps accelerate this process. Test Testing is an iterative process that is carried out in conjunction with implementation. System testing follows the completion of the implementation. Deployment A product release is created, distributed to users and installed in their workplace. Rational Unified Process 13
RUP supporting workflows Configuration and change management It manages changes to the system. Project management It manages the system development. Environment It is concerned with making appropriate software tools available to the software development team. Rational Unified Process 14
AGILE SOFTWARE DEVELOPMENT - OVERVIEW 15
Discussion What types of software were developed in the 1980s? Which conditions and environments were given? How was the team work? What changed in the 1990s? Were there new challenges? Which? 16
Agile manifesto We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan That is, while there is value in the items on the right, we value the items on the left more. http://agilemanifesto.org/ Agile Software Development - overview 17
Agile methods Dissatisfaction with the overheads involved in software design methods of the 1980s and 1990s led to the creation of agile methods. These methods: Focus on the code rather than the design. Are based on an iterative approach to software development. Are intended to deliver working software quickly and evolve this quickly to meet changing requirements. The aim of agile methods is to reduce overheads in the software process (e.g. by limiting documentation) and to be able to respond quickly to changing requirements without excessive rework. Agile Software Development - overview 18
The principles of agile methods Agile Software Development - overview 19
Agile method applicability Product development where a software company is developing a small or medium-sized product for sale. Custom system development within an organization, where there is a clear commitment from the customer to become involved in the development process and where there are not a lot of external rules and regulations that affect the software. Because of their focus on small, tightly-integrated teams, there are problems in scaling agile methods to large systems. Agile Software Development - overview 20
Problems with agile methods 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 characterises agile methods. Prioritising changes can be difficult where there are multiple stakeholders. Maintaining simplicity requires extra work. Contracts may be a problem as with other approaches to iterative development. Agile Software Development - overview 21
Agile methods and software maintenance Most organizations spend more on maintaining existing software than they do on new software development. So, if agile methods are to be successful, they have to support maintenance as well as original development. Two key issues: Are systems that are developed using an agile approach maintainable, given the emphasis in the development process of minimizing formal documentation? Can agile methods be used effectively for evolving a system in response to customer change requests? Problems may arise if original development team cannot be maintained. Agile Software Development - overview 22
PLAN-DRIVEN VS. AGILE DEVELOPMENT 23
Plan-driven vs. agile development Plan-driven development A plan-driven approach to software engineering is based around separate development stages with the outputs to be produced at each of these stages planned in advance. Not necessarily waterfall model plan-driven, incremental development is possible. Iteration occurs within activities. Agile development Specification, design, implementation and testing are interleaved and the outputs from the development process are decided through a process of negotiation during the software development process. Plan-driven vs. Agile development 24
Technical, human, organizational issues Is it important to have a very detailed specification and design before moving to implementation? If so, you probably need to use a plan-driven approach. Is an incremental delivery strategy, where you deliver the software to customers and get rapid feedback from them, realistic? If so, consider using agile methods. How large is the system that is being developed? Agile methods are most effective when the system can be developed with a small co-located team who can communicate informally. This may not be possible for large systems that require larger development teams so a plandriven approach may have to be used. Plan-driven vs. Agile development 25
Technical, human, organizational issues What type of system is being developed? Plan-driven approaches may be required for systems that require a lot of analysis before implementation (e.g. realtime system with complex timing requirements). What is the expected system lifetime? Long-lifetime systems may require more design documentation to communicate the original intentions of the system developers to the support team. What technologies are available to support system development? Agile methods rely on good tools to keep track of an evolving design. Plan-driven vs. Agile development 26
Technical, human, organizational issues How is the development team organized? If the development team is distributed or if part of the development is being outsourced, then you may need to develop design documents to communicate across the development teams. Are there cultural or organizational issues that may affect the system development? Traditional engineering organizations have a culture of plan-based development, as this is the norm in engineering. How good are the designers and programmers in the development team? It is sometimes argued that agile methods require higher skill levels than plan-based approaches in which programmers simply translate a detailed design into code. Is the system subject to external regulation? If a system has to be approved by an external regulator (e.g. the FAA approve software that is critical to the operation of an aircraft) then you will probably be required to produce detailed documentation as part of the system safety case. Plan-driven vs. Agile development 27
EXTREME PROGRAMMING 28
Extreme programming 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. Extreme programming 29
Extreme programming practices Principle or practice Incremental planning Small releases Simple design Test-first development Refactoring Description Requirements are recorded on story cards and the stories to be included in a release are determined by the time available and their relative priority. The developers break these stories into development Tasks. The minimal useful set of functionality that provides business value is developed first. Releases of the system are frequent and incrementally add functionality to the first release. Enough design is carried out to meet the current requirements and no more. An automated unit test framework is used to write tests for a new piece of functionality before that functionality itself is implemented. All developers are expected to refactor the code continuously as soon as possible code improvements are found. This keeps the code simple and maintainable. Extreme programming 30
Extreme programming practices Pair programming Collective ownership Continuous integration Sustainable pace On-site customer Developers work in pairs, checking each other s work and providing the support to always do a good job. The pairs of developers work on all areas of the system, so that no islands of expertise develop and all the developers take responsibility for all of the code. Anyone can change anything. As soon as the work on a task is complete, it is integrated into the whole system. After any such integration, all the unit tests in the system must pass. Large amounts of overtime are not considered acceptable as the net effect is often to reduce code quality and medium term productivity A representative of the end-user of the system (the customer) should be available full time for the use of the XP team. 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. Extreme programming 31
The extreme programming release cycle Extreme programming 32
SCRUM 33
Scrum The Scrum approach is a general agile method but its focus is on managing iterative development rather than specific agile practices. There are three phases in Scrum. The initial phase is an outline planning phase where you establish the general objectives for the project and design the software architecture. This is followed by a series of sprint cycles, where each cycle develops an increment of the system. The project closure phase wraps up the project, completes required documentation such as system help frames and user manuals and assesses the lessons learned from the project. Scrum 34
The Sprint cycle Sprints are fixed length, normally 2 4 weeks. The starting point for planning is the product backlog, which is the list of work to be done on the project. The selection phase involves all of the project team who work with the customer to select the features and functionality to be developed during the sprint. > sprint backlog Once these are agreed, the team organize themselves to develop the software. During this stage the team is isolated from the customer and the organization, with all communications channelled through the so-called Scrum master. The role of the Scrum master is to protect the development team from external distractions. At the end of the sprint, the work done is reviewed and presented to stakeholders. The next sprint cycle then begins. Scrum 35
Teamwork in Scrum The Scrum master is a facilitator who arranges daily meetings, tracks the backlog of work to be done, records decisions, measures progress against the backlog and communicates with customers and management outside of the team. The whole team attends short daily meetings where all team members share information, describe their progress since the last meeting, problems that have arisen and what is planned for the following day. This means that everyone on the team knows what is going on and, if problems arise, can re-plan short-term work to cope with them. Scrum 36
Scrum benefits The product is broken down into a set of manageable and understandable chunks. Unstable requirements do not hold up progress. The whole team have visibility of everything and consequently team communication is improved. Customers see on-time delivery of increments and gain feedback on how the product works. Trust between customers and developers is established and a positive culture is created in which everyone expects the project to succeed. Scrum 37
Discussion Have you heard about them? Test-driven development Behavior-driven development Domain-driven design Model-driven architecture Slow programming 38