Sie sind auf Seite 1von 7

Objectives SoftwareReuse

T Toexplainthebenefitsofsoftwarereuseandsome l i h b fi f f d reuseproblems T di Todiscussseveraldifferentwaystoimplement l diff i l softwarereuse T Toexplainhowreusableconceptscanbe l i h bl b representedaspatternsorembeddedinprogram generators TodiscussCOTSreuse T d Todescribethedevelopmentofsoftwareproduct ib h d l f f d lines

Topicscovered Topics covered


Thereuselandscape Designpatterns Design patterns Generatorbasedreuse Applicationframeworks Applicationsystemreuse Application system reuse

Softwarereuse Software reuse


Inmostengineeringdisciplines,systemsare d l designedbycomposingexistingcomponents thathavebeenusedinothersystems. Softwareengineeringhasbeenmorefocused g g onoriginaldevelopmentbutitisnow g , recognisedthattoachievebettersoftware, morequicklyandatlowercost,weneedto adoptadesignprocessthatisbasedon adopt a design process that is based on systematicsoftwarereuse.

Reusebasedsoftware engineering
Applicationsystemreuse
Thewholeofanapplicationsystemmaybereused pp y y eitherbyincorporatingitwithoutchangeinto othersystems(COTSreuse)orbydeveloping applicationfamilies.
Increased dependability p y

Reusebenefits1 Reuse benefits 1


Reused software, that has been tried and tested in working systems, , g y , should be m ore dependable than new software. The initial use of the software reveals any design and implementation faults. These are then fixed, thus reducing the number of failures when the software is reused. If software exists there is less uncertainty in the costs of reusing that exists, software than in the costs of development. This is an important factor for project management as it reduces the margin of error in project cost estimation. This is particularly true when relatively large software components such as sub systems are reused sub-systems reused. Instead of application specialists doing the same work on different projects, these specialists can develop reusable software that encapsulate their knowledge.

Reduced process risk

Componentreuse p
Componentsofanapplicationfromsubsystemsto singleobjectsmaybereused.CoveredinChapter g j y p 19.
Effective use of specialists

Object and function reuse Objectandfunctionreuse


Softwarecomponentsthatimplementasingle welldefined object or function may be reused.

Reusebenefits2 Reuse benefits 2


Standards compliance Some standards, such as user interface standards, can be implemented as a set of standard reusable components. For i l d f d d bl example, if menus in a user interfaces are implemented using reusable components, all applications present the same menu formats to users. The use of standard user interfaces improves dependability as users are less likely to make mistakes when presented with a familiar interface. Bringing a system to market as early as possible is o ften more important than overall development costs Reusing software can costs. speed up system production because both development and validation time should be reduced.
Increased maintenance costs

Reuseproblems1 Reuse problems 1


If the source code of a reused software system or component is n ot available then maintenance costs may be increased as the reused elements of the system may become increasingly incompatible with system changes. CASE toolsets may not support development with reuse. It may be difficult or impossible to integrate these tools with a component library system. The software process assumed by these tools may not take reuse into account. Some software engineers sometimes prefer to re write components as re-write they believe that they can improve on the reusable component. This is partly to do with trust and partly to do with the fact that writing original software is s een as more challenging than reusing other peoples so ftware. ftware

Lack of tool support

Accelerated development

Not-invented-here Not invented here syndrome

Reuseproblems2 Reuse problems 2


Creating and maintaining a component library Populating a reusable component library and ensuring the software developers can use this library can be expensive. Our current techniques for classifying, cataloguing and retrieving software components are immature. Software components h S f have to b di be discovered i a lib d in library, understood and, d d d sometimes, adapted to work in a n ew environment. Engineers must be reasonably confident of finding a component in the library before they will make routinely include a component search as part of their normal development process. process

Thereuselandscape The reuse landscape


Althoughreuseisoftensimplythoughtofas y p , thereuseofsystemcomponents,thereare manydifferentapproachestoreusethatmay beused. be used Reuseispossibleatarangeoflevelsfrom simplefunctionstocompleteapplication systems. Thereuselandscapecoverstherangeof possiblereusetechniques. possible reuse techniques

Finding, understanding and Fi di d di d adapting reusable components

Thereuselandscape The reuse landscape


Design patterns

Reuseapproaches1 Reuse approaches 1


Generic abstractions that occur across applications are represented as design patterns that show abstract and concrete objects and interactions interactions. Systems are developed by integrating components (collections of objects) that conform to component-model standards. standards This is covered in Chapter 19 19. Collections of abstract and concrete classes that can be adapted and extended to create ap plication systems. Legacy systems ( L t (see Ch t 2) th t can b Chapter that be wrapped b d y defining a set of interfaces and providing access to these legacy systems through these interfaces. Systems are developed by linking shared services that may be externally provided.

Component-based development Application frameworks Legacy system L t wrapping Service-oriented Service oriented systems

Reuseapproaches2 Reuse approaches 2


Application product lines COTS integration Configurable vertical applications Program libraries Program generators An application type is generalised around a common architecture so that it can be adapted in different ways for different customers customers. Systems are developed by integrating existing application systems. A generic system is designed so that it can be configured to the needs of specific system customers. Class and function libraries implementing commonly-used abstractions are available for reuse. A generator system embeds knowledge of a particular types of application and can generate systems or system fragments in that domain. Shared components are woven into an application at different places when the program is compiled.

Reuseplanningfactors Reuse planning factors


Thedevelopmentscheduleforthesoftware. The expected software lifetime Theexpectedsoftwarelifetime. Thebackground,skillsandexperienceofthe developmentteam. d l Thecriticalityofthesoftwareanditsnon y functionalrequirements. Th Theapplicationdomain. li ti d i Theexecutionplatformforthesoftware. p

Aspect-oriented software development

Conceptreuse Concept reuse


Wh Whenyoureuseprogramordesigncomponents,youhave d i h tofollowthedesigndecisionsmadebytheoriginal developerofthecomponent. developer of the component. Thismaylimittheopportunitiesforreuse. However, a more abstract form of reuse is concept reuse However,amoreabstractformofreuseisconceptreuse whenaparticularapproachisdescribedinan implementationindependentwayandanimplementation isthendeveloped. i th d l d Thetwomainapproachestoconceptreuseare:
Design patterns; Designpatterns; Generativeprogramming.

Designpatterns Design patterns


Adesignpatternisawayofreusingabstract g p knowledgeaboutaproblemanditssolution. Apatternisadescriptionoftheproblemand theessenceofitssolution. the essence of its solution Itshouldbesufficientlyabstracttobereused indifferentsettings. Patterns often rely on object characteristics Patternsoftenrelyonobjectcharacteristics suchasinheritanceandpolymorphism.

Patternelements Pattern elements


Name
Ameaningfulpatternidentifier. g p

Multipledisplays Multiple displays

Problemdescription. Solutiondescription.
Notaconcretedesignbutatemplateforadesign g p g solutionthatcanbeinstantiatedindifferentways.

Consequences
Theresultsandtradeoffsofapplyingthepattern.

TheObserverpattern The Observer pattern


N Name
Observer.

TheObserverpattern The Observer pattern

Description p
Separatesthedisplayofobjectstatefromtheobjectitself.

Problemdescription
Used when multiple displays of state are needed Usedwhenmultipledisplaysofstateareneeded.

Solutiondescription
SeeslidewithUMLdescription.

Consequences
Optimisationstoenhancedisplayperformanceareimpractical.

Applicationframeworks Application frameworks


Frameworksareasubsystemdesignmadeup k b d d ofacollectionofabstractandconcreteclasses andtheinterfacesbetweenthem. Thesubsystemisimplementedbyadding y p y g componentstofillinpartsofthedesignand y g byinstantiatingtheabstractclassesinthe framework. Frameworks are moderately large entities that Frameworksaremoderatelylargeentitiesthat canbereused.

Frameworkclasses Framework classes


S t Systeminfrastructureframeworks i f t t f k
Supportthedevelopmentofsystem infrastructuressuchascommunications,user infrastructures such as communications user interfacesandcompilers.

Middleware integration frameworks Middlewareintegrationframeworks


Standardsandclassesthatsupportcomponent communicationandinformationexchange. communication and information exchange

Enterpriseapplicationframeworks
Support the development of specific types of Supportthedevelopmentofspecifictypesof applicationsuchastelecommunicationsor financialsystems.

Extendingframeworks Extending frameworks


Frameworksaregenericandareextendedtocreateamore specificapplicationorsubsystem. Extending the framework involves Extendingtheframeworkinvolves
Addingconcreteclassesthatinheritoperationsfromabstract classesintheframework; ; Addingmethodsthatarecalledinresponsetoeventsthatare recognisedbytheframework.

Modelviewcontroller Model view controller


SysteminfrastructureframeworkforGUI g design. Allowsformultiplepresentationsofanobject andseparateinteractionswiththese and separate interactions with these presentations. MVCframeworkinvolvestheinstantiationofa numberofpatterns(asdiscussedearlier number of patterns (as discussed earlier underconceptreuse).

Problemwithframeworksistheircomplexitywhichmeansthat ittakesalongtimetousethemeffectively.

Modelviewcontroller Model view controller

Applicationsystemreuse Application system reuse


Involvesthereuseofentireapplication l h f l systemseitherbyconfiguringasystemforan environmentorbyintegratingtwoormore systemstocreateanewapplication. Twoapproachescoveredhere:
COTS product integration; COTSproductintegration; Productlinedevelopment.

Das könnte Ihnen auch gefallen