CH08-Software-Prototyping-软件工程讲义英语版-教学课件.ppt
Ian Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 1Chapter 8Software PrototypingIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 2Software PrototypinglRapid software development to validate requirementsIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 3ObjectiveslTo describe the use of prototypes in different types of development projectlTo discuss evolutionary and throw-away prototypinglTo introduce three rapid prototyping techniques-high-level language development,database programming and component reuselTo explain the need for user interface prototypingIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 4Topics coveredlPrototyping in the software processlPrototyping techniqueslUser interface prototypingIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 5Ian Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 6Uses of system prototypeslThe principal use is to help customers and developers understand the requirements for the systemRequirements elicitation.Users can experiment with a prototype to see how the system supports their workRequirements validation.The prototype can reveal errors and omissions in the requirementslPrototyping can be considered as a risk reduction activity which reduces requirements risksIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 7Prototyping benefitslMisunderstandings between software users and developers are exposedlMissing services may be detected and confusing services may be identifiedlA working system is available early in the processlThe prototype may serve as a basis for deriving a system specificationlThe system can support user training and system testingIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 8Prototyping processIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 9Ian Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 10Prototyping in the software processlEvolutionary prototypingAn approach to system development where an initial prototype is produced and refined through a number of stages to the final systemlThrow-away prototypingA prototype which is usually a practical implementation of the system is produced to help discover requirements problems and then discarded.The system is then developed using some other development processIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 11Prototyping objectiveslThe objective of evolutionary prototyping is to deliver a working system to end-users.The development starts with those requirements which are best understood.lThe objective of throw-away prototyping is to validate or derive the system requirements.The prototyping process starts with those requirements which are poorly understoodIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 12Ian Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 13Evolutionary prototypinglMust be used for systems where the specification cannot be developed in advance e.g.AI systems and user interface systemslBased on techniques which allow rapid system iterationslVerification is impossible as there is no specification.Validation means demonstrating the adequacy of the systemIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 14Ian Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 15Evolutionary prototyping advantageslAccelerated delivery of the systemRapid delivery and deployment are sometimes more important than functionality or long-term software maintainabilitylUser engagement with the systemNot only is the system more likely to meet user requirements,they are more likely to commit to the use of the systemIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 16Evolutionary prototypinglSpecification,design and implementation are inter-twinedlThe system is developed as a series of increments that are delivered to the customerlTechniques for rapid system development are used such as CASE tools and 4GLslUser interfaces are usually developed using a GUI development toolkitIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 17Ian Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 18Prototypes as specifications#lSome parts of the requirements(e.g.safety-critical functions)may be impossible to prototype and so dont appear in the specificationlAn implementation has no legal standing as a contractlNon-functional requirements cannot be adequately tested in a system prototypeIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 19Incremental development#lSystem is developed and delivered in increments after establishing an overall architecturelRequirements and specifications for each increment may be developedlUsers may experiment with delivered increments while others are being developed.therefore,these serve as a form of prototype systemlIntended to combine some of the advantages of prototyping but with a more manageable process and better system structureIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 20Incremental development processIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 21Throw-away prototyping#lUsed to reduce requirements risklThe prototype is developed from an initial specification,delivered for experiment then discardedlThe throw-away prototype should NOT be considered as a final systemSome system characteristics may have been left outThere is no specification for long-term maintenanceThe system will be poorly structured and difficult to maintainIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 22Throw-away prototypingIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 23Ian Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 24Rapid prototyping techniqueslVarious techniques may be used for rapid developmentDynamic high-level language developmentDatabase programmingComponent and application assemblylThese are not exclusive techniques-they are often used togetherlVisual programming is an inherent part of most prototype development systemsIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 25Dynamic high-level languages#lLanguages which include powerful data management facilitieslNeed a large run-time support system.Not normally used for large system developmentlSome languages offer excellent UI development facilitieslSome languages have an integrated support environment whose facilities may be used in the prototypeIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 26Choice of prototyping languagelWhat is the application domain of the problem?lWhat user interaction is required?lWhat support environment comes with the language?lDifferent parts of the system may be programmed in different languages.However,there may be problems with language communicationsIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 27Ian Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 28Database programmingIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 29Component and application assemblylPrototypes can be created quickly from a set of reusable components plus some mechanism to glue these component togetherlThe composition mechanism must include control facilities and a mechanism for component communicationlThe system specification must take into account the availability and functionality of existing componentsIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 30Ian Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 31Reusable component compositionIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 32Compound documents#lFor some applications,a prototype can be created by developing a compound documentlThis is a document with active elements(such as a spreadsheet)that allow user computationslEach active element has an associated application which is invoked when that element is selectedlThe document itself is the integrator for the different applicationsIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 33Application linking in compound documentsIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 34Visual programming#lScripting 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 itemslA large library of components exists to support this type of developmentlThese may be tailored to suit the specific application requirementsIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 35Visual programming with reuseIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 36Problems with visual developmentlDifficult to coordinate team-based developmentlNo explicit system architecturelComplex dependencies between parts of the program can cause maintainability problemsIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 37User interface prototyping#lIt is impossible to pre-specify the look and feel of a user interface in an effective way.prototyping is essentiallUI development consumes an increasing part of overall system development costslUser interface generators may be used to draw the interface and simulate its functionality with components associated with interface entitieslWeb interfaces may be prototyped using a web site editorIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 38Key pointslA prototype can be used to give end-users a concrete impression of the systems capabilitieslPrototyping is becoming increasingly used for system development where rapid development is essentiallThrow-away prototyping is used to understand the system requirementslIn evolutionary prototyping,the system is developed by evolving an initial version to the final versionIan Sommerville 2000 Software Engineering,6th edition.Chapter 8 Slide 39Key pointslRapid development of prototypes is essential.This may require leaving out functionality or relaxing non-functional constraintslPrototyping techniques include the use of very high-level languages,database programming and prototype construction from reusable componentslPrototyping is essential for parts of the system such as the user interface which cannot be effectively pre-specified.Users must be involved in prototype evaluation