Lecture 02 - Software Processes PDF
Document Details
Uploaded by ChivalrousOnomatopoeia
Dr. Noha Adly
Tags
Summary
This lecture provides an overview of software processes, including various models (e.g., Waterfall, Incremental) and activities involved in software development. It highlights the importance of process improvement, the challenges of accommodating change, and the roles of various stakeholders in the software development lifecycle.
Full Transcript
Software Processes Software process models Process activities Coping with change Process improvement Dr. Noha Adly CSE 322 - Software Processes 1 The software process Software processes are a set o...
Software Processes Software process models Process activities Coping with change Process improvement Dr. Noha Adly CSE 322 - Software Processes 1 The software process Software processes are a set of related activities involved in producing a software system. There is no universal software engineering method for different software systems type, but Fundamental software engineering activities are: Specification – defining what the system should do; Design and implementation – defining the organization of the system and implementing the system; Validation – checking that it does what the customer wants; Evolution – changing the system in response to changing customer needs. A software process model is an abstract representation of a process. It presents a description of a process from some particular perspective. Dr. Noha Adly CSE 322 - Software Processes 2 Software process descriptions When we describe and discuss processes, we usually talk about the activities in these processes such as specifying a data model, designing a user interface, etc. and the ordering of these activities. Activities are complex and include sub-activities such as requirements validation, architectural design, unit testing, etc. Process descriptions may also include: Products or deliverables, which are the outcomes of a process activity; e.g a model of the software architecture Roles, which reflect the responsibilities of the people involved in the process; e.g project manager, configuration manager, programmer Pre- and post-conditions, which are statements that are true before and after a process activity has been enacted or a product produced. Dr. Noha Adly CSE 322 - Software Processes 3 Plan-driven and agile processes Plan-driven processes are processes where all of the process activities are planned in advance and progress is measured against this plan. In agile processes, planning is incremental and continual as the software develops and it is easier to change the process to reflect changing customer requirements. For safety-critical systems, a very structured development process is required. For business systems, with rapidly changing requirements, a more flexible, agile process is likely to be better There are no right or wrong software processes. In practice, most practical processes include elements of both Dr. Noha Adly plan-driven and agile approaches. CSE 322 - Software Processes 4 Software process models The waterfall model Plan-driven model. Separate and distinct phases of specification and development. Incremental development Specification, development and validation are interleaved. May be plan-driven or agile. Integration and configuration The system is assembled from existing configurable components. May be plan-driven or agile. In practice, most large systems are developed using a process that incorporates elements from all of these models. Dr. Noha Adly CSE 322 - Software Processes 5 The waterfall model Dr. Noha Adly CSE 322 - Software Processes 6 Waterfall model phases There are separate identified phases in the waterfall model: Requirements analysis and definition System and software design Implementation and unit testing Integration and system testing Operation and maintenance All Process activities must be planned and scheduled before starting development Result of each phase is one or more documents that are approved (‘signed off’). The following phase should not start until the previous phase has finished. Dr. Noha Adly CSE 322 - Software Processes 7 The Waterfall Model The main drawback of the waterfall model is the difficulty of accommodating change after the process is underway. Inflexible partitioning of the project into distinct stages makes it difficult to respond to changing customer requirements. Therefore, this model is only appropriate when the requirements are well-understood and changes will be fairly limited during the design process. E.g. Embedded systems and Critical safety systems Few business systems have stable requirements. The waterfall model is mostly used for large systems engineering projects where a system is developed at several sites. In those circumstances, the plan-driven nature of the waterfall model helps coordinate the work. Dr. Noha Adly CSE 322 - Software Processes 8 Incremental development Based on the idea of developing an initial implementation, exposing this to user comment and evolving it through several versions until an adequate system has been developed Specification, development, and validation activities are interleaved rather than separate, with rapid feedback across activities. Dr. Noha Adly CSE 322 - Software Processes 9 Incremental development benefits The cost of accommodating changing customer requirements is reduced. The amount of analysis and documentation that has to be redone is much less than is required with the waterfall model. It is easier to get customer feedback on the development work that has been done. Customers can comment on demonstrations of the software and see how much has been implemented. More rapid delivery and deployment of useful software to the customer is possible. Customers are able to use and gain value from the software earlier than is possible with a waterfall process. Dr. Noha Adly CSE 322 - Software Processes 10 Incremental development problems The process is not visible. Managers need regular deliverables to measure progress. If systems are developed quickly, it is not cost-effective to produce documents that reflect every version of the system. System structure tends to degrade as new increments are added. Regular change leads to messy code Increasingly costly to add new features Unless time and money is spent on refactoring to improve the software, regular change tends to corrupt its structure. Acute for large complex systems Dr. Noha Adly CSE 322 - Software Processes 11 Integration and configuration Based on software reuse where systems are integrated from existing components or application systems (sometimes called COTS – (Commercial-Off-The-Shelf) systems). Reused elements may be configured to adapt their behaviour and functionality to a user’s requirements Reuse is now the standard approach for building many types of business system Dr. Noha Adly CSE 322 - Software Processes 12 Types of reusable software Stand-alone application systems (COTS) that are configured for use in a particular environment. Collections of objects that are developed as a package to be integrated with a component framework such as.NET or J2EE. Web services that are developed according to service standards and which are available for remote invocation. Dr. Noha Adly CSE 322 - Software Processes 13 Advantages and disadvantages Advantages Reduced costs and risks as less software is developed from scratch Faster delivery and deployment of system Disadvantages requirements compromises are inevitable so system may not meet real needs of users Loss of control over evolution of reused system elements Dr. Noha Adly CSE 322 - Software Processes 15 Process activities Dr. Noha Adly CSE 322 - Software Processes 16 Process activities Real software processes are inter-leaved sequences of technical, collaborative and managerial activities with the overall goal of specifying, designing, implementing and testing a software system. The four basic process activities of Specification Development Validation Evolution are organized differently in different development processes. In the waterfall model, they are organized in sequence, whereas in incremental development they are interleaved Dr. Noha Adly CSE 322 - Software Processes 17 Software specification The process of establishing what services are required and identifying the constraints on the system’s operation and development. Requirements engineering is the process of developing a software specification. Critical stage as a mistake leads to later problem in design and implementation A feasibility study is carried out before the requirement engineering to assess whether there is a market need and whether it is realistic technically and financially Requirements are usually presented at two levels of detail. End-users and customers with a high-level statement of the requirements System developers with a more detailed system specification. Dr. Noha Adly CSE 322 - Software Processes 18 Requirement Engineering Activities Requirements elicitation and analysis What do the system stakeholders require or expect from the system? Done through observation of existing systems, discussions with potential users and procurers, task analysis, and so on. may involve the development of system models and prototypes. Requirements specification Defining the requirements in detail trough translation of information gathered during the analysis activity Two types of requirements may be included User requirements: abstract statements of the system system requirements: more detailed description of the functionality Requirements validation Checking the validity of the requirements for realism, consistency, and completeness. Dr. Noha Adly CSE 322 - Software Processes 19 The requirements engineering process Dr. Noha Adly CSE 322 - Software Processes 20 Software design and implementation The process of converting the system specification into an executable system. Software design Design a software structure that realises the specification; Describe data models and structures Define interfaces between components Design is developed in stages with constant backtracking Implementation Translate this structure into an executable program; The activities of design and implementation are closely related and may be inter-leaved. Dr. Noha Adly CSE 322 - Software Processes 21 A general model of the design process Dr. Noha Adly CSE 322 - Software Processes 22 Design Inputs Most software interfaces with other software systems. These include the operating system, database, middleware, and other application systems. These make up the ‘software platform’, the environment in which the software will execute. Information about this platform is an essential input to the design process, as designers must decide how best to integrate it with the software’s environment. The requirements specification is a description of the functionality the software must provide and its performance and dependability requirements. If the system is to process existing data, then the description of that data may be included in the platform specification; otherwise, the data description must be an input to the design process so that the system data organization to be defined. Dr. Noha Adly CSE 322 - Software Processes 23 Design activities Architectural design, where you identify the overall structure of the system, the principal components (subsystems or modules), their relationships and how they are distributed. Database design, where you design the system data structures and how these are to be represented in a database. Interface design, where you define the interfaces between system components. Component selection and design, where you search for reusable components. If unavailable, you design how it will operate. The design process activities are both interleaved and interdependent. Dr. Noha Adly CSE 322 - Software Processes 24 A general model of the design process Dr. Noha Adly CSE 322 - Software Processes 25 System implementation The software is implemented either by developing a program or programs or by configuring an application system. Design and implementation are interleaved activities for most types of software system. Programming is an individual activity with no standard process. Debugging is the activity of finding program faults and correcting these faults. Dr. Noha Adly CSE 322 - Software Processes 26 Software validation Verification and validation (V & V) is intended to show that a system conforms to its specification and meets the requirements of the system customer. Involves checking and review processes and system testing. System testing involves executing the system with test cases that are derived from the specification of the real data to be processed by the system. Testing is the most commonly used Validation technique. Dr. Noha Adly CSE 322 - Software Processes 27 Testing stages Component testing Individual components are tested independently; Components may be functions or objects or coherent groupings of these entities. System testing: Testing of the system as a whole. Testing interactions between components Showing that the system meets its functional and non functional requirements Testing of emergent properties. Customer testing: Testing with real data to check that the system meets the customer’s needs. (Alpha and Beta testing) Dr. Noha Adly CSE 322 - Software Processes 28 Testing phases in a plan-driven software process (V-model) Testing is driven by a set of plans Independent team of testers work from these pre-formulated test plans Dr. Noha Adly CSE 322 - Software Processes 29 Software evolution Software is inherently flexible and can change – compared to hardware system As requirements change through changing business circumstances, the software that supports the business must also evolve and change. Although there has been a split between development and evolution (maintenance) - this is increasingly irrelevant as very few systems are completely new. it makes much more sense to see development and maintenance as a continuum Dr. Noha Adly CSE 322 - Software Processes 30 System evolution Rather than two separate processes, it is more realistic to think of software engineering as an evolutionary process where software is continually changed over its lifetime in response to changing requirements and customer needs. Dr. Noha Adly CSE 322 - Software Processes 31 Coping with change Dr. Noha Adly CSE 322 - Software Processes 32 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 Whatever software process model is used, it is essential that it can accommodate changes to the software 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 Dr. Noha Adly CSE 322 - Software Processes 33 Reducing the costs of rework Change anticipation, where the software process includes activities that can anticipate possible changes before significant rework is required. For example, a prototype system may be developed to show some key features of the system to customers. They can experiment with the prototype and refine their requirements before committing to high software production costs. Change tolerance, where the process is designed so that changes can be accommodated at relatively low cost. This normally involves some form of incremental development. Proposed changes may be implemented in increments that have not yet been developed. If this is impossible, then only a single increment (a small part of the system) may have to be altered to incorporate the change. Dr. Noha Adly CSE 322 - Software Processes 34 Software prototyping A prototype is an initial version of a system used to demonstrate concepts and try out design options. A prototype can be used to anticipate changes in: The requirements engineering process to help with requirements elicitation and validation; In design processes to explore software solutions development of a UI design for the system In the testing process to run back-to-back tests. Dr. Noha Adly CSE 322 - Software Processes 36 Software prototyping Q u Quick i ck p l a n Co m m u n icat io n plan communication Modeling Mo d e lin g Q u i ck d e si g n Quick design Deploym ent Deployment D e live r y delivery & Co n st r u ct io n & Fe e d b ack Construction feedback of of p r oprototype t o t yp e May be based on rapid prototyping languages or tools Dr. Noha Adly CSE 322 - Software Processes 37 The process model of prototype development Dr. Noha Adly CSE 322 - Software Processes 38 Prototype development Decide objective of prototype before start E.g. To develop user interface, Validate some functional system requirements, demonstrate applications to managers, etc The same prototype cannot meet all objectives. If the objectives are left unstated, management or end-users may misunderstand the function of the prototype. Consequently, they may not get the benefits that they expected from the prototype development. Decide on functionality to include and what to leave out should focus on areas of the product that are not well-understood Error checking and recovery may not be included in the prototype; Focus on functional rather than non-functional requirements such as reliability and security Dr. Noha Adly CSE 322 - Software Processes 39 Throw-away prototypes Prototypes should be discarded after development as they are not a good basis for a 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 organizational quality standards. Dr. Noha Adly CSE 322 - Software Processes 41 Incremental delivery Rather than deliver the system as a single delivery, the development and delivery is broken down into increments with each increment delivering part of the required functionality. increments are delivered and deployed for use in a real operational environment User requirements are prioritised and the highest priority requirements are included in early increments. Once the development of an increment is started, the requirements are frozen though requirements for later increments can continue to evolve. Experimenting with the system helps them clarify their requirements for later system increments Architectural design must be open and completed before the implementation for the various increments commences. Dr. Noha Adly CSE 322 - Software Processes 42 Incremental delivery Dr. Noha Adly CSE 322 - Software Processes 43 Incremental delivery One of the main advantages of the incremental models is their ability to cope with change during the development of the system. As an example, consider an error in the requirements. With the waterfall model, the error may not be noticed until acceptance testing, when it is probably too late to correct it. (Note that the client probably does not see the software running until the acceptance tests.) In the incremental model, there is a good chance that a requirements error will be recognized as soon as the corresponding software is incorporated into the system. Dr. Noha Adly CSE 322 - Software Processes 44 Incremental delivery advantages Customer value can be delivered with each increment so system functionality is available earlier. Early increments act as a prototype to help elicit requirements for later increments. Lower risk of overall project failure. The highest priority system services tend to receive the most testing. Dr. Noha Adly CSE 322 - Software Processes 45 Incremental delivery disadvantages Difficult to implement for existing systems as increments have less functionality than the system being replaced. Most systems require a set of basic facilities that are used by different parts of the system. As requirements are not defined in detail until an increment is to be implemented, it can be hard to identify common facilities that are needed by all increments. The essence of iterative processes is that the specification is developed in conjunction with the software. However, this conflicts with the procurement model of many organizations, where the complete system specification is part of the system development contract. Dr. Noha Adly CSE 322 - Software Processes 46 Process improvement Dr. Noha Adly CSE 322 - Software Processes 47 Process improvement Process improvement means understanding existing processes and changing these processes to increase product quality and/or reduce costs and development time. Many software companies have turned to software process improvement as a way of enhancing the quality of their software, reducing costs or accelerating their development processes. The principal approaches to process improvement are agile approaches, geared to reducing process overheads, and maturity-based approaches based on better process management and the use of good software engineering practice. Dr. Noha Adly CSE 322 - Software Processes 48 Approaches to improvement The process maturity approach, which focuses on improving process and project management and introducing good software engineering practice The level of process maturity reflects the extent to which good technical and management practice has been adopted in organizational software development processes. The agile approach, which focuses on iterative development and the reduction of overheads in the software process. The primary characteristics of agile methods are rapid delivery of functionality and responsiveness to changing customer requirements. Dr. Noha Adly CSE 322 - Software Processes 49 The process improvement cycle Dr. Noha Adly CSE 322 - Software Processes 50 Process improvement activities Process measurement You measure one or more attributes of the software process or product. These measurements forms a baseline that helps you decide if process improvements have been effective. Process analysis The current process is assessed, and process weaknesses and bottlenecks are identified. Process models (sometimes called process maps) that describe the process may be developed. Process change Process changes are proposed to address some of the identified process weaknesses. These are introduced and the cycle resumes to collect data about the effectiveness of the changes. Dr. Noha Adly CSE 322 - Software Processes 51 Process measurement Wherever possible, quantitative process data should be collected However, where organisations do not have clearly defined process standards this is very difficult as you don’t know what to measure. A process may have to be defined before any measurement is possible. Process measurements should be used to assess process improvements But this does not mean that measurements should drive the improvements. The improvement driver should be the organizational objectives. Process metrics Time taken for process activities to be completed e.g Calendar time or effort to complete an activity or process Resources required for processes or activities e.g. Total effort in person- days Number of occurrences of a particular event e.g. Number of defects discovered Dr. Noha Adly CSE 322 - Software Processes 52 Software Engineering Institute (SEI) Capability maturity levels The SEI process maturity framework identifies maturity levels that essentially correspond to the use of good software engineering practice. The maturity of a software company processes reflects the process management, measurement and use of good software engineering practice in the company Dr. Noha Adly CSE 322 - Software Processes 53 The SEI capability maturity model Initial - Essentially uncontrolled: goals associated with the process are satisfied, the scope of work to is explicitly set out and communicated to the team members Managed - Product management procedures defined and used: goals associated with the process are met and organizational policies are in place that define when each process should be used. There must be documented project plans that define the project goals. Resource management and process monitoring procedures must be in place across the institution. Defined - Process management procedures and strategies defined and used: Each project has a managed process, adapted to the requirements from a defined set of organizational processes. Process assets and measurements must be collected and used for future process improvements. Quantitatively Managed - Quantitative management strategies defined and used: there is an organizational responsibility to use statistical and other quantitative methods to control sub-processes Optimising - Process improvement strategies defined and used: Trends must be analyzed and the processes adapted to changing business needs. Dr. Noha Adly CSE 322 - Software Processes 54 Process Assessment and Improvement CMM-Based Appraisal for Internal Process Improvement (CBA IPI)— provides a diagnostic technique for assessing the relative maturity of a software organization; uses the SEI CMM as the basis for the assessment Standard CMMI Assessment Method for Process Improvement (SCAMPI) — provides a five step process assessment model that incorporates five phases: initiating, diagnosing, establishing, acting and learning. SPICE—The SPICE (ISO/IEC15504) standard defines a set of requirements for software process assessment. The intent of the standard is to assist organizations in developing an objective evaluation of the efficacy of any defined software process. ISO 9001:2000 for Software—a generic standard that applies to any organization that wants to improve the overall quality of the products, systems, or services that it provides. Therefore, the standard is directly applicable to software organizations and companies. Dr. Noha Adly CSE 322 - Software Processes 55 The Rational Unified Process RUP is a very general iterative software development process framework based on UML. It is a hybrid process model that brings together elements from All of the generic process models (Waterfall and Incremental) illustrates good practice in specification and design Supports prototyping and incremental delivery. The activities of (requirements, design, implementation, test, etc.) exist in RUP, but they may occur many times during development. For example, requirements may be derived for each component many times instead of once only for the entire product. Normally described from 3 perspectives A dynamic perspective that shows phases over time; A static perspective that shows process activities; A practice perspective that suggests good practice. Dr. Noha Adly CSE 322 - Software Processes 56 RUP Phases A development cycle in RUP has four phases. Each phase usually done in one or more iteration. The end of each phase is marked by a milestone. Inception: Create a business case for the project; may involve requirements analysis, risk analysis, prototyping. Milestone: (Objectives) Elaboration. Develop and analyze models for the S/W; project development plans, identify risks, user documentation, release description. Milestone: (requirement model, Architecture, development plan) Construction. System design, Coding and quality assurance. Milestone: (Operational Capability) Transition. Transfer the program or component to the user; ensure that the user has adequate documentation and other resources to make use of it. Milestone: (Release) Dr. Noha Adly CSE 322 - Software Processes 57 RUP iteration Iteration within the RUP is supported in two ways In-phase iteration: Each phase is iterative with results developed incrementally. Cross-phase iteration As shown by the loop in the RUP model, the whole set of phases may be enacted incrementally. Dr. Noha Adly CSE 322 - Software Processes 58 Static workflows in the RUP The static view of the RUP focuses on the activities that take place during the development process These are called workflows There are six core process workflows identified in the process and three core supporting workflows. There are two main families of RUP workflows Engineering Management The RUP has been designed in conjunction with the UML, so the workflow description is oriented around associated UML models such as sequence models, object models, etc. Dr. Noha Adly CSE 322 - Software Processes 59 Static workflows in the RUP - Core Workflow Description Business The business processes are modelled using business use cases. modelling Requirements Actors who interact with the system are identified and use cases are developed to model the system requirements. Analysis and A design model is created and documented using architectural design 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. Testing 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. Dr. Noha Adly CSE 322 - Software Processes 60 Static workflows in the RUP – (Supporting Management) Workflow Description Configuration and This supporting workflow managed changes to the change system management Project This supporting workflow manages the system management development Environment This workflow is concerned with making appropriate software tools available to the software development team. The advantage in presenting dynamic and static views is that phases of the development process are not associated with specific workflows. So, all of the RUP workflows may be active at all stages of the process. In the early phases of the process, most effort will probably be spent on workflows such as business modelling and requirements in the later phases, in testing and deployment. Dr. Noha Adly CSE 322 - Software Processes 61 RUP – Phases versus Workflows Dr. Noha Adly CSE 322 - Software Processes 62 RUP good software engineering practice – six practices recommended 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. Analyze the impact of changes on the system before accepting them. 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 meet’s organizational quality standards. Control changes to software Manage software changes using a change management system and configuration management tools. Dr. Noha Adly CSE 322 - Software Processes 63