View
224
Download
0
Category
Preview:
Citation preview
SoftwareWiederverwendung
Univ.Prof. Dipl.-Ing. Dr. techn.
Harald GALL
Universität ZürichTechnische Universität Wien
(c) 2006, H. Gall ReuseBenefits.2
Inhalt
• Einführung und Ziele des SoftwareReuse
• Probleme des Software Reuse
• Moderne Reuse Ansätze
• Kategorisierung von Software Reuse• Aspekte von Software Reuse
(c) 2006, H. Gall ReuseBenefits.3
Einführung und Ziele
• Reuse - ein neues Konzept?☞andere Ingenieurdisziplinen☞Software - Hardware
• Software?☞Konzept verspricht auch im Bereich der
Software viele Vorteile☞Bestehende Entwicklungen nutzen☞Reuse ist mehr als Software Design
• Komponenten + Design + Maßsystem + Prozesse
☞Industrielle Erfolgsberichte
(c) 2006, H. Gall ReuseBenefits.4
• Application system reuse☞ The whole of an application system may be reused either
by incorporating it without change into other systems(COTS reuse) or by developing application families.
• Component reuse☞ Components of an application from sub-systems to single
objects may be reused.
• Object and function reuse☞ Software components that implement a single well-
defined object or function may be reused.
Reuse-based Software Engineering
(c) 2006, H. Gall ReuseBenefits.5
Reuse benefits 1
Increased dependability Reused software, that has been tried and tested in working systems,
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.
Reduced process risk If software exists, there is less uncertainty in the costs of reusing that
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.
Effective use of specialists Instead of application specialists doing the same work on different
projects, these specialists can develop reusable software that
encapsulate their knowledge.
(c) 2006, H. Gall ReuseBenefits.6
Reuse benefits 2
Standards compliance Some standards, such as user interface standards, can be
implemented as a set of standard reusable components. For
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.
Accelerated development Bringing a system to market as early as possible is o ften more
important than overall development costs. Reusing software can
speed up system production because both development and
validation time should be reduced.
(c) 2006, H. Gall ReuseBenefits.7
Reuse problems 1
Increased maintenance
costs
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.
Lack of tool support 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.
Not-invented-here
syndrome
Some software engineers sometimes prefer to re-write components as
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
people’s software.
(c) 2006, H. Gall ReuseBenefits.8
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.
Finding, understanding and
adapting reusable components
Software components have to be discovered in a library, understood and,
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.
(c) 2006, H. Gall ReuseBenefits.10
Reuse approaches 1
Design patterns Generic abstractions that occur across applications are
represented as design patterns that show abstract and concrete
objects and interactions.
Component-based
development
Systems are developed by integrating components
(collections of objects) that conform to component-model
standards. This is covered in Chapter 19.
Application
frameworks
Collections of abstract and concrete classes that can be
adapted and extended to create application systems.
Legacy system
wrapping
Legacy systems (see Chapter 2) that can be ‘wrapped’ by
defining a set of interfaces and providing access to these
legacy systems through these interfaces.
Service-oriented
systems
Systems are developed by linking shared services that may be
externally provided.
(c) 2006, H. Gall ReuseBenefits.11
Reuse approaches 2
Application product
lines
An application type is generalised around a common
architecture so that it can be adapted in different ways for
different customers.
COTS integration Systems are developed by integrating existing application
systems.
Configurable vertical
applications
A generic system is designed so that it can be configured to
the needs of specific system customers.
Program libraries Class and function libraries implementing commonly-used
abstractions are available for reuse.
Program generators A generator system embeds knowledge of a particular types
of application and can generate systems or system fragments
in that domain.
Aspect-oriented
software development
Shared components are woven into an application at different
places when the program is compiled.
(c) 2006, H. Gall ReuseBenefits.12
Moderne Reuse Ansätze
• High-Level Languages☞ Architecture Description Languages (ADLs)☞ reusable components (Java, C++, C#, Eiffel, Ada etc.)☞ application generators (e.g. compiler), CASE-Tools☞ Model-driven Architecture (MDA)
• Domain Analysis☞ Domain-Driven Design (DDD)☞ Domain-Specific Software Architectures (DSSA)
• Objektorientierte Techniken☞ Konzepte: ADTs, information hiding, Vererbung,
Abstraktion, Aggregation/Composition, Datenkapselung
(c) 2006, H. Gall ReuseBenefits.13
Software Reuse
• Reusability (IEEE Std. 610.12-1990)
Reusability (Wiederverwendbarkeit) ist derGrad zu dem ein Software-Modul oder einanderes Entwicklungs-dokument in mehr alseinem Computer Programm oder Software-System verwendet werden kann.
(c) 2006, H. Gall ReuseBenefits.14
Software Reuse /2
• Software Reuse (Prieto-Diaz, 1993)
Unter Software Reuse versteht man dieVerwendung existierender Software-Komponenten für die Erstellung neuerSoftware-Systeme.
(c) 2006, H. Gall ReuseBenefits.15
Software Reuse /3
• Software Reuse (Mili et al., 2002)“Software reuse is the process whereby anorganization defines a set of systematicoperating procedures to specify, produce,classify, retrieve, and adapt software artifactsfor the purpose of using them in itsdevelopment activities.”
(c) 2006, H. Gall ReuseBenefits.16
Software Reuse /4
• Reusable Software Engineering(Freeman, 1983)
Reusable Software Engineering beschäftigtsich mit der Entwicklung von Software unterWiederverwendung aller während derSoftware-Entwicklung generiertenInformationen.
(c) 2006, H. Gall ReuseBenefits.17
Arten von Software Reuse
Objekte, Text,Architekturen
SpezifikationProzeduren,Skills
Designwhite-box,modifiziert
generativad-hoc,opportunistisch
horizontalArtefakten,Komponenten
Source Codeblack-box,as-is
compositionalgeplant,systematisch
vertikalIdeen,Konzepte
ProduktAbsichtTechnikModusBereichSubstanz
aus [Prieto-Diaz 93]
(c) 2006, H. Gall ReuseBenefits.18
Reuse - Produkt
• Code☞ functional collections
☞ macro libraries
☞ code fragments☞ components
• Design☞ design patterns
☞ code templates☞ Ada generics
• Spezifikation☞ Prototypen
☞ application generators
☞ transformationalsystems
• Architektur☞ architectural patterns
☞ architectural styles
(c) 2006, H. Gall ReuseBenefits.19
Reuse - Technik
• compositional (building blocks)☞ code fragments (macros)☞ functional collections (mathem. Pakete)☞ generic code components (Ada packages, Smalltalk
classes)☞ abstractions (programming plans)☞ design templates (logische Strukturen)☞ Modelle (generische Architekturen, Domain-Modelle)
• generativ☞ Very high level languages (domain languages, dataflow
languages)
(c) 2006, H. Gall ReuseBenefits.20
Reuse - Bereich
• Vertikaler Reuse☞innerhalb desselben Anwendungsbereichs☞domänen-spezifische Komponenten
☞System-Familien
• Horizontaler Reuse☞allgemeine, generische Komponenten☞anwendbar über verschiedene
Anwendungsbereiche hinweg
(c) 2006, H. Gall ReuseBenefits.21
Reuse - Substanz
• Reuse von Ideen, Konzepten, Wissen☞wie in anderen Ingenieurdisziplinen☞teilweise informal
• Reuse von Artefakten, Komponenten☞Hardware: ICs, Transistoren, etc.☞Software: Prozeduren, Module, etc.
• Reuse von Prozeduren
Generische Algorithmen
Komponenten-Katalogedomänenspez. Kollektionen
Prozesse & Vorgangsweisen für
Reuse Programm
(c) 2006, H. Gall ReuseBenefits.22
Konzepte der Wiederverwendung
• Was soll wiederverwendet werden?☞nicht nur source code☞wiederverwendbare Information (Freeman, 1983)
☞alle Informationen, die in der SoftwareEntwicklung anfallen(= reusable software engineering)
☞Hierarchie von SoftwareEntwicklungsinformation
(c) 2006, H. Gall ReuseBenefits.23
Wiederverwendbare Information[Freeman83]
Generic Systems
Functional Collections
Software Architecture
Source Code
Tech-transferknowledge
Utilizationknowledge
Application-areaknowledge
Developmentknowledge
B cannot be realized without A
Environmental
External
Functional Architectures
Logical Structures
Code Fragments
(c) 2006, H. Gall ReuseBenefits.24
Aspekte von Software Reuse
• Organisatorische Aspekte☞ Operative und Technologische Infrastruktur☞ Reuse Einführung
• Technische Aspekte☞ Domain Engineering Aspects☞ Component Engineering Aspects☞ Application Engineering Aspects
• Wirtschaftliche Aspekte☞ Software Reuse Metrics☞ Software Reuse Cost Estimation
• Rechtliche Aspekte
(c) 2006, H. Gall ReuseBenefits.25
Technische Aspekte
• Generierung von Komponenten (Design for Reuse,Reverse Engineering, Neu-Entwicklung)
• Methodologie (welcher Prozeß ist erforderlich?)
• Domain Analysis (Standards)• Environment (Tools, Process Support, CASE)• Library (Komponenten-Speicherung, Retrieval, etc.)• Sprache (Abstraktion, Encapsulation, etc.)
(c) 2006, H. Gall ReuseBenefits.26
Organisatorische Aspekte
• Ausbildung des Personals in Hinblick aufReuse
• Einführung eines Reuse-Programms
• Reuse-Infrastruktur/Technologie
• Motivation• Installierung einer speziellen Reuse-Gruppe in
der Organisation
• Unterstützung durch das Management
(c) 2006, H. Gall ReuseBenefits.27
Wirtschaftliche Aspekte
• Kosten/Nutzen Relation abschätzen (return oninvestment)
• Installierung einer Bewertungsmetrik fürMessungen
(c) 2006, H. Gall ReuseBenefits.28
Rechtliche Aspekte
• Urheberrechtliche Aspekte von wiederverwendetenArtefakten (Komponenten, Design, etc.)
• Gewährleistung für verteilte/übernommeneArtefakte
• Probleme bei Reuse über Unternehmen hinweg• z.B. Open Source Software
☞ http://www.opensource.org/☞ ... „When programmers can read, redistribute, and modify the
source code for a piece of software, the software evolves.People improve it, people adapt it, people fix bugs.”
(c) 2006, H. Gall ReuseBenefits.29
Open Source Licenses
• The GNU General Public License (GPL)• The GNU Library or `Lesser' Public License (LGPL)• The BSD license• The Mozilla Public License (MPL)• The Apache Software License• The Sun Internet Standards Source License (SISSL)• The Intel Open Source License• The IBM Public License• The Python license• ...
(c) 2006, H. Gall ReuseBenefits.30
GNU General Public License (GPL)
☞ „GNU General Public License is intended to guarantee your freedomto share and change free software - to make sure the software is freefor all its users.“
☞ protect rights to (1) copyright the software, and (2) give legalpermission to copy, distribute and/or modify the software.
☞ „For example, if you distribute copies of such a program, whethergratis or for a fee, you must give the recipients all the rights that youhave. You must make sure that they, too, receive or can get the sourcecode. And you must show them these terms so they know theirrights.“
☞ „Each time you redistribute the Program (or any work based on theProgram), the recipient automatically receives a license from theoriginal licensor to copy, distribute or modify the Program subject tothese terms and conditions. You may not impose any furtherrestrictions on the recipients' exercise of the rights granted herein.“
http://www.opensource.org/licenses/gpl-license.html
(c) 2006, H. Gall ReuseBenefits.31
GNU Lesser General PublicLicense LGPL
☞ „Applies to some specially designated software packages - typicallylibraries“
☞ „You may modify your copy or copies of the Library or any portionof it, thus forming a work based on the Library, and copy anddistribute such modifications or work under the terms of Section 1above, provided that you also meet all of these conditions:
• a) The modified work must itself be a software library.• c) You must cause the whole of the work to be licensed at no charge
to all third parties under the terms of this License.“ [...]☞ „A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiledor linked with it, is called a "work that uses the Library". Such awork, in isolation, is not a derivative work of the Library, andtherefore falls outside the scope of this License.“
http://www.opensource.org/licenses/lgpl-license.html
Recommended