Software Process Models


Published on

المحاضرات الرابعة والخامسة والسادسة

Published in: Education
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Software Process Models

  2. 2. 2. SOFTWARE DEVELOPMENT PROCESSMODELSInstructional Objectives Describe different process models used for software development Teach to identify the most appropriate software process model for a given problem 2
  3. 3. 2.1. THE GENERIC SOFTWARE LIFECYCLE [REF.1: PG.30] Generic activities in all software processes are:  Specification - what the system should do and its development constraints  Development - production of the software system  Validation - checking that the software is what the customer wants  Evolution - changing the software in response to changing demands 3
  4. 4. 2.2. WHAT IS A PROCESS MODEL? [REF.1: PG. 30-31, 87-88] A structured set of activities required to develop a software system  Specification;  Design;  Validation;  Evolution. A software process model is an abstract representation of a process. It presents a description of a process from some particular perspective. 4
  5. 5. SOFTWARE SPECIFICATION The process of establishing what services are required and the constraints on the system’s operation and development. Requirements engineering process  Feasibility study;  Requirements elicitation and analysis;  Requirements specification;  Requirements validation. 5
  7. 7. 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; Implementation  Translate this structure into an executable program; The activities of design and implementation are closely related and may be inter-leaved. 7
  8. 8. DESIGN PROCESS ACTIVITIES Architectural design Abstract specification Interface design Component design Data structure design Algorithm design 8
  10. 10. STRUCTURED METHODS Systematic approaches to developing a software design. The design is usually documented as a set of graphical models. Possible models  Object model;  Sequence model;  State transition model;  Structural model;  Data-flow model. 10
  11. 11. PROGRAMMING AND DEBUGGING Translating a design into a program and removing errors from that program. Programming is a personal activity - there is no generic programming process. Programmers carry out some program testing to discover faults in the program and remove these faults in the debugging process. 11
  13. 13. 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. 13
  15. 15. TESTING STAGES Component or unit testing  Individualcomponents 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 of emergent properties is particularly important. Acceptance testing (alpha testing)  Testingwith customer data to check that the system meets the customer’s needs 15
  16. 16. TESTING PHASES 16
  17. 17. SOFTWARE EVOLUTION Software is inherently flexible and can change. As requirements change through changing business circumstances, the software that supports the business must also evolve and change. Although there has been a distinction between development and evolution (maintenance) this is increasingly irrelevant as fewer and fewer systems are completely new 17
  19. 19. GENERIC SOFTWARE PROCESS MODELS The waterfall model  Separate and distinct phases of specification and development. Evolutionary development  Specification, development and validation are interleaved. Component-based software engineering  The system is assembled from existing components. 19
  20. 20. GENERIC SOFTWARE PROCESS MODELS There are many variants of these models e.g. formal development where a waterfall- like process is used but the specification is a formal specification that is refined through several stages to an implementable design. 20
  21. 21. 2.3. THE WATERFALL MODEL [REF.1: PG. 88-90; REF. 2: PG. 79-80] 21
  22. 22. WATERFALL MODEL (CLASSIC LIFECYCLE) Requirements analysis and definition System and software design Implementation and unit testing Integration and system testing Operation and maintenance The main drawback of the waterfall model is the difficulty of accommodating change after the process is underway. One phase has to be complete before moving onto the next phase. 22
  23. 23. WATERFALL MODEL PROBLEMS 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. Few business systems have stable requirements. 23
  24. 24. WATERFALL MODEL PROBLEMS The waterfall model is mostly used for large systems engineering projects where a system is developed at several sites. 24
  25. 25. 2.4. PROTOTYPING MODEL [REF.1: PG. 90-91; REF.2: PG. 83-85] Exploratory development  Objective is to work with customers and to evolve a final system from an initial outline specification. Should start with well-understood requirements and add new features as proposed by the customer. Throw-away prototyping  Objectiveis to understand the system requirements. Should start with poorly understood requirements to clarify what is really needed. 25
  26. 26. 2.4. PROTOTYPING MODEL [REF.1: PG. 90-91; REF.2: PG. 83-85] 26
  27. 27. 2.4. PROTOTYPING MODEL Problems  Lack of process visibility;  Systems are often poorly structured;  Special skills (e.g. in languages for rapid prototyping) may be required. Applicability  For small or medium-size interactive systems;  For parts of large systems (e.g. the user interface);  For short-lifetime systems. 27
  28. 28. 2.5. COMPONENT-BASED SOFTWAREENGINEERING (CBSE) [REF.1: PG. 91-93] Based on systematic reuse where systems are integrated from existing components or COTS (Commercial-off-the-shelf) systems. Process stages  Component analysis;  Requirements modification;  System design with reuse;  Development and integration. This approach is becoming increasingly used as component standards have emerged 28
  30. 30. PROCESS ITERATION System requirements ALWAYS evolve in the course of a project so process iteration where earlier stages are reworked is always part of the process for large systems. Iteration can be applied to any of the generic process models. Two (related) approaches  Incremental delivery;  Spiral development. 30
  31. 31. 2.6. INCREMENTAL DEVELOPMENT [REF.1: PG. 93-95;REF.2: PG. 80-81] 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. 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 31
  32. 32. 2.6. INCREMENTAL DEVELOPMENT [REF.1: PG. 93-95;REF.2: PG. 80-81] 32
  33. 33. INCREMENTAL DEVELOPMENT 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. 33
  34. 34. SPIRAL DEVELOPMENT 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. 34
  35. 35. 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. 35
  37. 37. RAPID SOFTWARE DEVELOPMENT Because of rapidly changing business environments, businesses have to respond to new opportunities and competition. Rapid software development and delivery is now often the most critical requirement for software systems. Businesses may be willing to accept lower quality software if rapid delivery of essential functionality is possible. 37
  38. 38. REQUIREMENTS Because of the changing environment, it is often impossible to arrive at a stable, consistent set of system requirements. Therefore a waterfall model of development is impractical and an approach to development based on iterative specification and delivery is the only way to deliver software quickly. 38
  39. 39. CHARACTERISTICS OF RAPID SOFTWAREDEVELOPMENT PROCESS The processes of specification, design and implementation are concurrent. There is no detailed specification, and design documentation is minimized. The system is developed in a series of increments. End users evaluate each increment and make proposals for later increments. System user interfaces are usually developed using an interactive development system. 39
  41. 41. ADVANTAGES OF INCREMENTAL DEVELOPMENT Accelerated delivery of customer services. Each increment delivers the highest priority functionality to the customer. User engagement with the system. Users have to be involved in the development which means the system is more likely to meet their requirements and the users are more committed to the system. 41
  42. 42. PROBLEMS WITH INCREMENTAL DEVELOPMENT Management problems  Progress can be hard to judge and problems hard to find because there is no documentation to demonstrate what has 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 meet 42 new requirements.
  43. 43. PROTOTYPING For some large systems, incremental iterative development and delivery may be impractical; this is especially true when multiple teams are working on different sites. Prototyping, where an experimental system is developed as a basis for formulating the requirements may be used. This system is thrown away when the system specification has been agreed. 43
  45. 45. CONFLICTING OBJECTIVES The objective of incremental development is to deliver a working system to end-users. The development starts with those requirements which are best understood. The objective of throw-away prototyping is to validate or derive the system requirements. The prototyping process starts with those requirements which are poorly understood. 45
  46. 46. 2.9. AGILE METHODS [REF.1: PG. 418-420] Dissatisfaction with the overheads involved in design methods 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. Agile methods are probably best suited to small/medium-sized business systems or PC products. 46
  47. 47. PRINCIPLES OF AGILE METHODS Principle Description Customer involvement The customer should be closely involved throughout the development process. Their role is provide and prioritise new system requirements and to evaluate the iterations of the system. Incremental delivery The software is developed in increments with the customer specifying the requirements to be included in each increment. People not process The skills of the development team should be recognised and exploited. The team should be left to develop their own ways of working without prescriptive processes. Embrace change Expect the system requirements to change and design the system so that it can accommodate these changes. Maintain simplicity Focus on simplicity in both the software being developed and in the development process used. Wherever possible, actively work to eliminate complexity from the system. 47
  48. 48. 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 characterizes agile methods. Prioritizing 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 48
  49. 49. 2.10. EXTREME PROGRAMMING [REF.1: PG. 420-427] Perhaps the best-known and most widely used 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. 49
  51. 51. EXTREME PROGRAMMING PRACTICES 1 Incremental planning 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’. Small Releases 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. Simple Design Enough design is carried out to meet the current requirements and no more. Test first development An automated unit test framework is used to write tests for a new piece of functionality before that functionality itself is implemented. Refactoring All developers are expected to refactor the code continuously as soon as possible code improvements are found. This keeps the code simple and maintainable. 51
  52. 52. EXTREME PROGRAMMING PRACTICES 2 Pair Programming Developers work in pairs, checking each otherÕ work and s providing the support to always do a good job. Collective Ownership The pairs of developers work on all areas of the system, so that no islands of expertise develop and all the developers own all the code. Anyone can change anything. Continuous Integration As soon as 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. Sustainable pace Large amounts of over-time are not considered acceptable as the net effect is often to reduce code qualit y and medium term productivity 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 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. 52
  53. 53. XP AND AGILE PRINCIPLES Incremental development is supported through small, frequent system releases. Customer involvement means full-time customer engagement with the team. People not process through pair programming, collective ownership and a process that avoids long working hours. Change supported through regular system releases. Maintaining simplicity through constant refactoring of code. 53
  54. 54. REQUIREMENTS SCENARIOS In XP, user requirements are expressed as scenarios or user stories. These are written on cards and the development team break them down into implementation tasks. These tasks are the basis of schedule and cost estimates. The customer chooses the stories for inclusion in the next release based on their priorities and the schedule estimates. 54
  55. 55. STORY CARD FOR DOCUMENT DOWNLOADING Downloading an d printing an article First, you select the article that you want f rom a displayed list.You then have to tell the system how you will pay for it - this can either be through a subscription, through a company account or by credit card. After this, you get a copyright f orm from the system to fill in and, when you have submitted this, the article you want is downloaded onto your computer. You then choose a printer and a copy of the article is printed. You tell the system if printing has been successful. If the article is a print-only article, you canÕt keep the PDF version so it is autom atically deleted from your com puter . 55
  56. 56. XP AND CHANGE Conventional wisdom in software engineering is to design for change. It is worth spending time and effort anticipating changes as this reduces costs later in the life cycle. XP, however, maintains that this is not worthwhile as changes cannot be reliably anticipated. Rather, it proposes constant code improvement (refactoring) to make changes easier when they have to be implemented. 56
  57. 57. TESTING IN XP Test-first development. Incremental test development from scenarios. User involvement in test development and validation. Automated test harnesses are used to run all component tests each time that a new release is built. 57
  58. 58. TASK CARDS FOR DOCUMENT DOWNLOADING Task 1: Imp lement p rincip al workflow Task 2: Imp lement article catalog and selection Task 3: Imp lement p ayment collection Payment may be made in 3 different ways. The user selects which way they wish to pay. If the user has a library subscription, then they can input the subscriber key which should be checked by the system. Alternatively, they can input an or ganisational account number. If this is valid, a debit of the cost of the article is posted to this account. F inally they , may input a 16 digit credit card number and expiry date. This should be checked for validity and, if valid a debit is posted to that credit card account. 58
  59. 59. TEST CASE DESCRIPTION Test 4: Test credit card validity Inpu t: A string re e prsenting thecred cardnumbera two intege r nting it nd rs eprese the month and year when the card expires Tests: Check that all bytes in the string are digits Check that the month lies between 1 and 12 and the year is greater than or equal to the current year. Using the first 4 digits of the credit card number, check that the card issuer is valid by looking up the card issuer table. Check credit card validity by submitting the card number and expiry date information to the card issuer Outpu t: OK or error m essage indicating that the card is invalid 59
  60. 60. TEST-FIRST DEVELOPMENT Writing tests before code clarifies the requirements to be implemented. Tests are written as programs rather than data so that they can be executed automatically. The test includes a check that it has executed correctly. All previous and new tests are automatically run when new functionality is added. Thus checking that the new functionality has not introduced errors. 60
  61. 61. PAIR PROGRAMMING In XP, programmers work in pairs, sitting together to develop code. This helps develop common ownership of code and spreads knowledge across the team. It serves as an informal review process as each line of code is looked at by more than 1 person. It encourages refactoring as the whole team can benefit from this. Measurements suggest that development productivity with pair programming is similar to that of two people working independently 61
  62. 62. 2.11. RAPID APPLICATION DEVELOPMENT (RAD)[REF.1: PG. 427-431; REF.2: PG. 81-83] Agile methods have received a lot of attention but other approaches to rapid application development have been used for many years. These are designed to develop data- intensive business applications and rely on programming and presenting information from a database. 62
  63. 63. RAD ENVIRONMENT TOOLS Database programming language Interface generator Links to office applications Report generators 63
  64. 64. A RAD ENVIRONMENT 64
  65. 65. INTERFACE GENERATION Many applications are based around complex forms and developing these forms manually is a time-consuming activity. RAD environments include support for screen generation including:  Interactive form definition using drag and drop techniques;  Form linking where the sequence of forms to be presented is specified;  Form verification where allowed ranges in form fields is defined. 65
  66. 66. VISUAL PROGRAMMING Scripting languages such as Visual Basic support visual programming where the prototype is developed by creating a user interface from standard items and associating components with these items A large library of components exists to support this type of development These may be tailored to suit the specific application requirements 66
  67. 67. VISUAL PROGRAMMING WITH REUSE Menu compon en t Date co mpo nent Fi l e Ed it Vi ews Layo ut Op ti on s Help General 12th January 2 00 0 Ind ex Rang e check in g 3.8 76 s crip t Us er prompt comp on en t + Draw can vas s crip t comp on en t T di sp lay ree comp on en t 67
  68. 68. PROBLEMS WITH VISUAL DEVELOPMENT Difficult to coordinate team-based development. No explicit system architecture. Complex dependencies between parts of the program can cause maintainability problems. 68
  69. 69. COTS REUSE An effective approach to rapid development is to configure and link existing off the shelf systems. For example, a requirements management system could be built by using: A database to store requirements;  A word processor to capture requirements and format reports;  A spreadsheet for traceability management; 69
  70. 70. COMPOUND DOCUMENTS For some applications, a prototype can be created by developing a compound document. This is a document with active elements (such as a spread sheet) that allow user computations. Each active element has an associated application which is invoked when that element is selected. The document itself is the integrator for the different applications.
  72. 72. 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 in:  The requirements engineering process to help with requirements elicitation and validation;  In design processes to explore options and develop a UI design;  In the testing process to run back-to-back tests.
  73. 73. BENEFITS OF PROTOTYPING Improved system usability. A closer match to users’ real needs. Improved design quality. Improved maintainability. Reduced development effort.
  76. 76. THROW-AWAY PROTOTYPES Prototypes should be discarded after development as they are not a good basis for a production system:  Itmay 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.
  77. 77. THE RATIONAL UNIFIED PROCESS A modern process model derived from the work on the UML and associated process. 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.
  78. 78. RUP PHASE MODEL Phase it erat ion Incept ion Elaborat ion Const ruct ion Transit ion
  79. 79. RUP PHASES Inception  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.
  80. 80. RUP GOOD PRACTICE Develop software iteratively Manage requirements Use component-based architectures Visually model software Verify software quality Control changes to software
  81. 81. STATIC WORKFLOWS Work flow Description Business modelli ng 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. Configuration and This supporting workflow managed changes to the system (see change management Chapter 29). Project management This supporting workflow manages the system development (see Chapter 5). Environment This workflow is concerned with making appropriate software tools available to the software development team.
  82. 82. COMPUTER-AIDED SOFTWARE ENGINEERING Computer-aided software engineering (CASE) is software to support software development and evolution processes. Activity automation  Graphical editors for system model development;  Data dictionary to manage design entities;  Graphical UI builder for user interface construction;  Debuggers to support program fault finding;  Automated translators to generate new versions of a program. 82
  83. 83. CASE TECHNOLOGY Case technology has led to significant improvements in the software process. However, these are not the order of magnitude improvements that were once predicted  Software engineering requires creative thought - this is not readily automated;  Software engineering is a team activity and, for large projects, much time is spent in team interactions. CASE technology does not support these much. 83
  84. 84. CASE CLASSIFICATION Classification helps us understand the different types of CASE tools and their support for process activities. Functional perspective  Tools are classified according to their specific function. Process perspective  Tools are classified according to process activities that are supported. Integration perspective  Tools are classified according to their organisation into integrated units. 84
  85. 85. FUNCTIONAL TOOL CLASSIFICATION Tool type Examples Planning tools PERT tools, estimation tools, spreadsheets Editing tools T ext editors, diagram editors, word processors Change management tools Requirements traceability tools, change control systems Configuration management tools Version management systems, system building tools Prototyping tools Very high-level languages, user interface generators Method-support tools Design editors, data dictionaries, code generators Language-processing tools Compilers, interpreters Program analysis tools Cross reference generators, static analysers, dynamic analysers T esting tools T est data generators, file comparators Debugging tools Interactive debugging systems Documentation tools Page layout programs, image editors Re-engineering tools Cross-reference systems, program re-structuring systems 85
  86. 86. ACTIVITY-BASED TOOL CLASSIFICATION Re-en g i neeri ng t ool s Test in g t oo ls Debu ggi ng t oo ls Prog ram analy si s t o ol s Lang uage-p ro ces si ng t oo ls Meth od s up po r t t o ol s Prot o ty pi ng t oo l s Co nfi gurati on management to ol s Ch an ge man ag emen t t oo ls Do cu men t at io n t oo ls Ed it i ng t oo l s Pl anni ng t o ol s Sp eci f cat io n i Desi gn Impl emen t at io n V ficat i on eri and V dat io n ali 86
  87. 87. CASE INTEGRATION Tools  Support individual process tasks such as design consistency checking, text editing, etc. Workbenches  Support a process phase such as specification or design, Normally include a number of integrated tools. Environments  Support all or a substantial part of an entire software process. Normally include several integrated workbenches. 87
  88. 88. TOOLS, WORKBENCHES, ENVIRONMENTS CASE t echn olog y T ls oo Wor kb en ch es Envir ments on Fi l e Integ rat ed Process -cen tr ed Ed it ors Co mpil ers comp ar at ors en vir ments on en vir ments on An alys i s an d Pro gramming T in g est des ig n Mu lt i-met ho d Si n gle-meth od General-pu rp os e Lang uage-sp ecifi c workb en ch es workb en ch es workb en ch es workb en ch es 88