Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based...

80
Component Component - - Based Software Based Software Engineering Engineering X LIU, School of Computing, Napier University TIP This chapter will present a complete picture of how to develop software systems with components and system integration.

Transcript of Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based...

Page 1: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

ComponentComponent--Based Software Based Software EngineeringEngineering

X LIU, School of Computing, Napier University

TIP This chapter will present

a complete picture of how to develop software systems with components

and system integration.

Page 2: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Reuse: Past and PresentReuse: Past and Present

•• reuse is both an old and a new idea. reuse is both an old and a new idea. Programmers have reused ideas, abstractions, Programmers have reused ideas, abstractions, and processes since the earliest days of and processes since the earliest days of computing.computing.

•• the early approach to reuse was ad hoc. the early approach to reuse was ad hoc.

•• Today, complex, high quality computerToday, complex, high quality computer--based based systems must be built in very short time systems must be built in very short time periods. This mitigates towards a more periods. This mitigates towards a more organized approach to reuse.organized approach to reuse.

Page 3: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

What is ComponentWhat is Component--Based Based Software Engineering (CBSE)Software Engineering (CBSE)

•• CBSE is a process that emphasizes the design CBSE is a process that emphasizes the design and construction of computerand construction of computer--based systems based systems using reusable software components. using reusable software components.

•• CBSE is changing the way large software CBSE is changing the way large software systems are developed. CBSE embodies the systems are developed. CBSE embodies the “buy, do not build” philosophy espoused by “buy, do not build” philosophy espoused by some software engineers.some software engineers.

•• CBSE shifts the emphasis from programming CBSE shifts the emphasis from programming software to composing software systems.software to composing software systems.

Page 4: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

What is ComponentWhat is Component--Based Based Software Engineering (CBSE)Software Engineering (CBSE)

•• Implementation has given way to integration as Implementation has given way to integration as the focus. the focus.

•• The foundation of CBSE is the assumption that The foundation of CBSE is the assumption that there is sufficient commonality in many large there is sufficient commonality in many large software systems to justify developing reusable software systems to justify developing reusable components to exploit and satisfy that components to exploit and satisfy that commonality.commonality.

Page 5: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Architectural design & Architectural design & identification of composition identification of composition candidatecandidate•• CSBE process begins with establishing CSBE process begins with establishing

requirements for the system using conventional requirements for the system using conventional requirements elicitation techniques. requirements elicitation techniques.

•• After architectural design established, rather After architectural design established, rather than moving immediately into detailed design than moving immediately into detailed design tasks, the team examines requirements to tasks, the team examines requirements to determine what subsets are directly amenable determine what subsets are directly amenable to to compositioncomposition, rather than construction, rather than construction

Page 6: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Architectural design & Architectural design & identification of composition identification of composition candidatecandidate•• The criteria are:The criteria are:

–– Are commercial offAre commercial off--thethe--shelf (COTS) shelf (COTS) components available to implement the components available to implement the requirement?requirement?

–– Are internallyAre internally--developed reusable developed reusable components available to implement the components available to implement the requirement?requirement?

–– Are the interfaces for available components Are the interfaces for available components compatible within the architecture of the compatible within the architecture of the system to be built?system to be built?

Page 7: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Architectural design & Architectural design & identification of composition identification of composition candidatecandidate•• The team attempts to modify or remove those The team attempts to modify or remove those

system requirements that cannot be system requirements that cannot be implemented with COTS or inimplemented with COTS or in--house house components. components.

•• If the requirement cannot be changed or If the requirement cannot be changed or deleted, conventional or objectdeleted, conventional or object--oriented oriented software engineering methods are applied to software engineering methods are applied to develop these new components that must be develop these new components that must be engineered to meet the requirement. engineered to meet the requirement.

Page 8: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component EngineeringComponent Engineering

For those requirements that are addressed with For those requirements that are addressed with available components, the following software available components, the following software engineering activities must be done:engineering activities must be done:

•• Component qualificationComponent qualification

•• Component adaptation.Component adaptation.

•• Component composition. Component composition.

•• Component update. Component update.

Page 9: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component qualificationComponent qualification

•• System requirements and architecture define System requirements and architecture define the components that will be required.the components that will be required.

•• Reusable components are normally identified by Reusable components are normally identified by the characteristics of their interfaces. That is, the characteristics of their interfaces. That is, “the services that are provided, and the means “the services that are provided, and the means by which consumers access these services”. by which consumers access these services”.

•• However, the interface does not provide the However, the interface does not provide the degree to which the component will fit the degree to which the component will fit the architecture and requirements.architecture and requirements.

Page 10: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component adaptationComponent adaptation

•• Software architecture represents design Software architecture represents design patterns that are composed of components patterns that are composed of components connections, and coordination. In some cases, connections, and coordination. In some cases, existing reusable components may be existing reusable components may be mismatched to the architecture’s design rules. mismatched to the architecture’s design rules. These components must be adapted to meet These components must be adapted to meet the needs of the architecture or discarded and the needs of the architecture or discarded and replaced by other more suitable components.replaced by other more suitable components.

•• For example, some components are For example, some components are configurable throughconfigurable through parameterisationparameterisation..

Page 11: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component compositionComponent composition

•• Architectural style again plays a key role in the Architectural style again plays a key role in the way in which software components are way in which software components are integrated to form a working system. integrated to form a working system.

•• By identifying connection and coordination By identifying connection and coordination mechanisms (e.g., runmechanisms (e.g., run--time properties of the time properties of the design), the architecture dictates the design), the architecture dictates the component of the endcomponent of the end--product.product.

Page 12: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component updateComponent update

•• When systems are implemented with COTS When systems are implemented with COTS components, update is complicated by the components, update is complicated by the imposition of a third party. Theimposition of a third party. The organisationorganisationthat developed the reusable component may be that developed the reusable component may be outside the immediate control of the software outside the immediate control of the software engineeringengineering organisationorganisation..

Page 13: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Classification of ComponentsClassification of Components

•• Software components can also beSoftware components can also be characterisedcharacterisedbased on their use in the CBSE process. In based on their use in the CBSE process. In addition to COTS components, the CBSE addition to COTS components, the CBSE process yields:process yields:

•• Qualified componentsQualified components——assessed by software assessed by software engineers to ensure that not only functionality, engineers to ensure that not only functionality, but also performance, reliability, usability, and but also performance, reliability, usability, and other quality factors conform to the other quality factors conform to the requirements of the system/product to be built.requirements of the system/product to be built.

Page 14: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Classification of ComponentsClassification of Components

•• Adapted componentsAdapted components——adapted to modify adapted to modify (wrapping) unwanted or undesired characteristics.(wrapping) unwanted or undesired characteristics.

•• Assembled componentsAssembled components——integrated into an integrated into an architectural style and interconnected with an architectural style and interconnected with an appropriate component infrastructure that allows appropriate component infrastructure that allows the components to be coordinated and managed the components to be coordinated and managed effectively.effectively.

•• Updated componentsUpdated components——replacing existing software replacing existing software as new versions of components become available.as new versions of components become available.

Page 15: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

The CBSE processThe CBSE process

•• The CBSE process includes to identify candidate The CBSE process includes to identify candidate components, to qualify each component’s interface, components, to qualify each component’s interface, to adapt components to remove architectural to adapt components to remove architectural mismatches, to assembly components into a mismatches, to assembly components into a selected architectural style, and to update selected architectural style, and to update components as requirements for the system components as requirements for the system change.change.

•• The process model for componentThe process model for component--based software based software engineering emphasizes parallel tracks in which engineering emphasizes parallel tracks in which domain engineering occurs concurrently with domain engineering occurs concurrently with componentcomponent--based development.based development.

Page 16: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

The CBSE processThe CBSE processDomain Engineering

Component-BasedDevelopment

DomainAnalysis

TestingComponentEngineering

ArchitecturalDesignAnalysis

ReusableComponent

Development

SoftwareArchitectureDevelopment

DomainModel

StructuralModel

ComponentQualification

ComponentAdaptation

ComponentComposition

ComponentUpdate

RepositoryReusableArtifacts/

Components

ApplicationSoftware

Page 17: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Domain EngineeringDomain Engineering

•• The intent of domain engineering is to identify, The intent of domain engineering is to identify, construct, catalogue, and disseminate a set of construct, catalogue, and disseminate a set of software components that have applicability to software components that have applicability to existing and future software in a particular existing and future software in a particular application domain. application domain.

•• The overall goal is to establish mechanisms that The overall goal is to establish mechanisms that enable software engineers to share these enable software engineers to share these componentscomponents——to reuse them.to reuse them.

Page 18: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Domain EngineeringDomain Engineering

•• Domain engineering includes three major Domain engineering includes three major activities: activities:

–– analysisanalysis

–– construction, and construction, and

–– dissemination.dissemination.

Page 19: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

The domain analysis processThe domain analysis process•• An 8 step approach to the identification andAn 8 step approach to the identification and

categorisationcategorisation of reusable componentsof reusable components

–– select specific functions/objectsselect specific functions/objects

–– abstract functions/objectsabstract functions/objects

–– define a taxonomydefine a taxonomy

–– identify common featuresidentify common features

–– identify specific relationshipsidentify specific relationships

–– abstract the relationshipsabstract the relationships

–– derive a functional modelderive a functional model

–– define a domain languagedefine a domain language

Page 20: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

A guide for identifying A guide for identifying reusable componentsreusable components

•• Is the component functionality required on Is the component functionality required on future implementation?future implementation?

•• How common is the component’s function How common is the component’s function within the domain?within the domain?

•• Is there duplication of the component’s function Is there duplication of the component’s function within the domain?within the domain?

•• Is the component hardwareIs the component hardware--dependent?dependent?

Page 21: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

A guide for identifying A guide for identifying reusable componentsreusable components

•• Does the hardware remain unchanged between Does the hardware remain unchanged between implementations?implementations?

•• Can the hardware specifics be removed to Can the hardware specifics be removed to another components?another components?

•• Is the design optimized enough for the next Is the design optimized enough for the next implementation?implementation?

•• Can we parameterize a nonCan we parameterize a non--reusable reusable components so that it becomes reusable?components so that it becomes reusable?

Page 22: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

A guide for identifying A guide for identifying reusable componentsreusable components

•• Is the component reusable in many Is the component reusable in many implementations with only minor changes?implementations with only minor changes?

•• Is reuse through modification feasible?Is reuse through modification feasible?

•• Can a nonCan a non--reusable component be decomposed reusable component be decomposed to yield reusable components?to yield reusable components?

Page 23: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Domain CharacteristicsDomain Characteristics•• It is sometimes difficult to determine whether a It is sometimes difficult to determine whether a

potentially reusable component is applicable in potentially reusable component is applicable in a particular situation. A set of domain a particular situation. A set of domain characteristics may be defined to make this characteristics may be defined to make this determination. determination.

•• A domain characteristic is shared by all A domain characteristic is shared by all software within a domain. It defines generic software within a domain. It defines generic attribute of all products that exist within the attribute of all products that exist within the domain. E.g., generic characteristics might domain. E.g., generic characteristics might include: the importance of safety/reliability, include: the importance of safety/reliability, programming language, concurrency in programming language, concurrency in processing. processing.

Page 24: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component qualificationComponent qualification----DefinitionDefinition

•• Component qualification ensures that a Component qualification ensures that a candidate component candidate component

–– will perform the function required, will perform the function required,

–– will properly fit into the architectural style will properly fit into the architectural style specified for the system, and specified for the system, and

–– will exhibit the quality characteristics (e.g., will exhibit the quality characteristics (e.g., performance, reliability, usability) required performance, reliability, usability) required for the application.for the application.

Page 25: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component qualificationComponent qualification----Factors to be consideredFactors to be considered

•• The interface description provides useful The interface description provides useful information about the operation and use of a information about the operation and use of a software component, but it does not provide all software component, but it does not provide all of the information required to determine if a of the information required to determine if a proposed component can be reused effectively proposed component can be reused effectively in a new application.in a new application.

•• Among the many factors considered during Among the many factors considered during component qualification are:component qualification are:–– Application programming interface (API)Application programming interface (API)

Page 26: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component qualificationComponent qualification----Factors to be consideredFactors to be considered

–– Development and integration tools required Development and integration tools required by the componentby the component

–– RunRun--time requirements including resource time requirements including resource usage, e.g., memory or storage, timing or usage, e.g., memory or storage, timing or speed, and network protocolspeed, and network protocol

–– Service requirements including operating Service requirements including operating system interfaces and support from other system interfaces and support from other componentscomponents

Page 27: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component qualificationComponent qualification----Factors to be consideredFactors to be considered

–– Security features including access controls Security features including access controls and authentication protocoland authentication protocol

–– Embedded design assumptions including the Embedded design assumptions including the use of specific numerical or nonuse of specific numerical or non--numerical numerical algorithmsalgorithms

–– Exception handlingException handling

Page 28: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component adaptationComponent adaptation----ideal ideal situationsituation•• In an ideal setting, domain engineering creates In an ideal setting, domain engineering creates

a library of components that can be easily a library of components that can be easily integrated into application architecture. The integrated into application architecture. The implication of “easy integration” is: implication of “easy integration” is:

–– that consistent methods of resource that consistent methods of resource management have been implemented for all management have been implemented for all components in the library;components in the library;

–– that common activities such as data that common activities such as data management exist for all components, andmanagement exist for all components, and

–– that interfaces within the architecture and with that interfaces within the architecture and with the external environment have been the external environment have been implemented in a consistent manner.implemented in a consistent manner.

Page 29: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component adaptationComponent adaptation----wrappingwrapping

•• In reality, even after a component has been In reality, even after a component has been qualified for use in an application architecture, qualified for use in an application architecture, it may exhibit conflicts in one or more of the it may exhibit conflicts in one or more of the areas. areas.

•• To mitigate these conflicts, an adaptation To mitigate these conflicts, an adaptation technique called “component wrapping” is often technique called “component wrapping” is often used. used.

Page 30: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component adaptationComponent adaptation----wrappingwrapping

•• When a software team has full access to the When a software team has full access to the internal design and code for a component, internal design and code for a component, whitewhite--box wrapping is applied. This wrapping box wrapping is applied. This wrapping examines the internal processing details and examines the internal processing details and makes codemakes code--level modifications to remove any level modifications to remove any conflicts. conflicts.

•• GreyGrey--box wrapping is applied when the box wrapping is applied when the component library provides a component component library provides a component extension language or API that enables conflicts extension language or API that enables conflicts to be removed or masked.to be removed or masked.

Page 31: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component adaptationComponent adaptation----wrappingwrapping

•• BlackBlack--box wrapping requires the introduction of box wrapping requires the introduction of prepre-- and postand post--processing at the component processing at the component interface to remove or mask conflicts.interface to remove or mask conflicts.

•• The software team must determine whether the The software team must determine whether the effort required to adequately wrap a effort required to adequately wrap a component is justified or whether a custom component is justified or whether a custom component should be engineered instead.component should be engineered instead.

Page 32: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component compositionComponent composition

•• The component composition task assembles The component composition task assembles qualified, adapted, and engineered components qualified, adapted, and engineered components to populate the architecture established for an to populate the architecture established for an application. application.

•• To accomplish this, an infrastructure (usually a To accomplish this, an infrastructure (usually a library of specialized components) provides a library of specialized components) provides a model for coordination of components and model for coordination of components and specific services that enable components to specific services that enable components to coordinate with each other and perform coordinate with each other and perform common tasks.common tasks.

Page 33: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component compositionComponent composition

Among the many mechanisms for creating an Among the many mechanisms for creating an effective infrastructure is a set of four effective infrastructure is a set of four “architectural ingredients” that should be “architectural ingredients” that should be present to achieve component composition:present to achieve component composition:

•• Data exchange model. Mechanisms that enable Data exchange model. Mechanisms that enable users and applications to interact and transfer users and applications to interact and transfer data (e.g., drag and drop, cut and paste) data (e.g., drag and drop, cut and paste) should be defined for all reusable components. should be defined for all reusable components. The mechanism should cover: The mechanism should cover:

Page 34: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component compositionComponent composition

–– humanhuman--toto--software data transfersoftware data transfer

–– componentcomponent--toto--component data transfer, andcomponent data transfer, and

–– data transfer among system resources (e.g., data transfer among system resources (e.g., dragging a file to a printer icon for output).dragging a file to a printer icon for output).

•• Automation. A variety of tools, macros, and Automation. A variety of tools, macros, and scripts should be implemented to facilitate scripts should be implemented to facilitate interaction between reusable components.interaction between reusable components.

Page 35: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component compositionComponent composition

•• Structured storage. Heterogeneous data Structured storage. Heterogeneous data contained in a compound document should be contained in a compound document should be organized and accessed as a single data organized and accessed as a single data structure. structure.

•• Underlying object model. The object model Underlying object model. The object model ensures that components developed in different ensures that components developed in different programming languages that reside on different programming languages that reside on different platforms can be interoperable. I.e., objects platforms can be interoperable. I.e., objects must be capable of communicating across must be capable of communicating across network.network.

Page 36: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component compositionComponent composition

•• Most popular existing industrial standards for Most popular existing industrial standards for component software include:component software include:–– OMG/CORBAOMG/CORBA

–– Microsoft COMMicrosoft COM

–– Sun Sun javaBeanjavaBean

Page 37: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component engineeringComponent engineering

•• Component engineering focuses on how to Component engineering focuses on how to build quality reusable software components. build quality reusable software components.

•• Though CBSE encourages the use of existing Though CBSE encourages the use of existing components, in many cases building new components, in many cases building new components becomes a must to enhance the components becomes a must to enhance the component library. component library.

•• To create software components involves the To create software components involves the integration of the following techniquesintegration of the following techniques

Page 38: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Component engineeringComponent engineering

–– AbstractionAbstraction

–– HidingHiding

–– Functional independenceFunctional independence

–– RefinementRefinement

–– Structured programmingStructured programming

–– ObjectObject--oriented methodsoriented methods

–– TestingTesting

–– SQA and correctness verificationSQA and correctness verification

Page 39: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Analysis and design for reuseAnalysis and design for reuse

•• Automatic tools may be used to browse a Automatic tools may be used to browse a repository in an attempt to match the repository in an attempt to match the requirement noted in the current specification requirement noted in the current specification with those described for existing reusable with those described for existing reusable components. components.

•• Characterization functions and keywords are Characterization functions and keywords are used to help find potentially reusable used to help find potentially reusable components.components.

Page 40: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Analysis and design for reuseAnalysis and design for reuse

•• If specification matching yields components If specification matching yields components that fit the needs for the current application, that fit the needs for the current application, the designer can extract these components the designer can extract these components from the repository and integrate them in the from the repository and integrate them in the design of new system. design of new system.

•• If no suitable component can be found, If no suitable component can be found, component engineering must be applied to component engineering must be applied to create them.create them.

Page 41: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Analysis and design for reuseAnalysis and design for reuse

•• To create a reusable component, the following To create a reusable component, the following key issues need to be considered:key issues need to be considered:

–– Standard data. The application domain should Standard data. The application domain should be investigated and standard global data be investigated and standard global data structures (e.g., file structures or database) structures (e.g., file structures or database) should be identified. All design components can should be identified. All design components can be characterized to make use of these standard be characterized to make use of these standard data structures.data structures.

Page 42: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Analysis and design for reuseAnalysis and design for reuse

–– Standard interface protocols. Three levels of Standard interface protocols. Three levels of interface protocol should be established: the interface protocol should be established: the nature of intranature of intra--modular interfaces, the design of modular interfaces, the design of external technical (nonexternal technical (non--human) interfaces, and human) interfaces, and the humanthe human--machine interface.machine interface.

–– Program templates. The structure model can Program templates. The structure model can serve as a template for the architectural design serve as a template for the architectural design of a new program.of a new program.

Page 43: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

What is an interfaceWhat is an interface

•• Interfaces are the means by which components Interfaces are the means by which components connect. connect.

•• Technically, an interface is a set of named Technically, an interface is a set of named operations that can be invoked by clients. operations that can be invoked by clients.

•• Each operation’s semantics is specified, and this Each operation’s semantics is specified, and this specification plays a dual role:specification plays a dual role:It serves both providers implementing the It serves both providers implementing the interface and clients using the interfaceinterface and clients using the interface

Page 44: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

What is an interfaceWhat is an interface

•• Viewing a component as a service provider, Viewing a component as a service provider, components are defined by their interfacescomponents are defined by their interfaces

•• This interface can be thought of as having two This interface can be thought of as having two related interfaces as shown below:related interfaces as shown below:

–– A A providesprovides interface defines the services interface defines the services provided by the component.provided by the component.

–– A A requiresrequires interface specifies what services interface specifies what services must be available from the system that is must be available from the system that is using the component.using the component.

Page 45: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

What is an interfaceWhat is an interface

Page 46: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

What is an interfaceWhat is an interface----exampleexample

Page 47: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Direct and indirect interfacesDirect and indirect interfaces

•• A component may directly provide an interface, A component may directly provide an interface, which is normally a procedural interface of which is normally a procedural interface of traditional libraries. traditional libraries.

•• A component may provide an indirect interface A component may provide an indirect interface by implementing objects available to clients.by implementing objects available to clients.

Page 48: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Direct and indirect interfacesDirect and indirect interfaces

•• Modeling all component interfaces as object Modeling all component interfaces as object interfaces, in which a single component may interfaces, in which a single component may provide multiple object interfaces, is suitable for provide multiple object interfaces, is suitable for modern objectmodern object--oriented systems.oriented systems.

•• Procedural interfaces have provided important Procedural interfaces have provided important services in structural programming age, and services in structural programming age, and still have strong influence.still have strong influence.

Page 49: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

VersionsVersions

•• In a component world, versions of components In a component world, versions of components can be prolific. Many vendors may provide can be prolific. Many vendors may provide various “upwards compatible” enhanced various “upwards compatible” enhanced versions of a successful component.versions of a successful component.

•• Traditional version management, often based Traditional version management, often based on the assignment of major and minor version on the assignment of major and minor version numbers, assumes that the versions of a numbers, assumes that the versions of a component evolve at a single source. component evolve at a single source.

•• However, in a free market, the evolution of However, in a free market, the evolution of versions is more complex.versions is more complex.

Page 50: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

VersionsVersions

•• A subtle aspect of versioning arises when A subtle aspect of versioning arises when moving from direct to indirect interfaces. moving from direct to indirect interfaces.

•• With direct interfaces, it suffices to check With direct interfaces, it suffices to check versions at bind time. Indirect interfaces may versions at bind time. Indirect interfaces may couple arbitrary third parties.couple arbitrary third parties.

•• Very few component infrastructures proposed Very few component infrastructures proposed so far address versioning problem properly.so far address versioning problem properly.

Page 51: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

VersionsVersions

•• One possible approach is to insist on immutable One possible approach is to insist on immutable interface specification. Instead of trying to interface specification. Instead of trying to maintain the complex compatibility relation maintain the complex compatibility relation among various versions of interfaces, each among various versions of interfaces, each interface, once published, is frozen. Supporting interface, once published, is frozen. Supporting multiple versions is then equivalent to multiple versions is then equivalent to supporting multiple interfaces. This is supporting multiple interfaces. This is essentially the COM approach.essentially the COM approach.

Page 52: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Interface as contractsInterface as contracts

•• A useful way to view interface specifications is A useful way to view interface specifications is as contracts between a client of an interface as contracts between a client of an interface and a provider of an implementation of the and a provider of an implementation of the interface.interface.

•• The contract states what the client needs to do The contract states what the client needs to do to use the interfaceto use the interface

•• The contract also states what the provider has The contract also states what the provider has to implement to meet the services promised by to implement to meet the services promised by the interface. the interface.

Page 53: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Interface as contractsInterface as contracts

•• PrePre-- and postand post--conditions could be used to conditions could be used to specify the contract. For each operation in the specify the contract. For each operation in the contract, the client has to establish the contract, the client has to establish the precondition before calling the operation, and precondition before calling the operation, and the provider can rely on the precondition being the provider can rely on the precondition being met whenever the operation is called. The met whenever the operation is called. The provider has to establish theprovider has to establish the postconditionpostconditionbefore returning to the client and the client can before returning to the client and the client can rely on therely on the postconditionpostcondition being met whenever being met whenever the call to the operation returns. the call to the operation returns.

Page 54: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Contracts and nonContracts and non--functional functional requirementsrequirements

•• Besides the functional requirements, a Besides the functional requirements, a contract needs to consider noncontract needs to consider non--functional functional requirements. For example, response requirements. For example, response time, and environment.time, and environment.

Page 55: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

What belongs to a contractWhat belongs to a contract

•• Service interfaceService interface----also called progress also called progress condition. States the functionality provided and condition. States the functionality provided and services required by the contract. services required by the contract.

•• Safety conditionSafety condition

•• Time requirementTime requirement

•• Space requirementSpace requirement

•• Other resource requirementOther resource requirement

Page 56: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Contract: formal or informalContract: formal or informal

•• Theoretically, interface contracts should be as Theoretically, interface contracts should be as formal as possible to derive all necessary formal as possible to derive all necessary information and to enable formal verification. information and to enable formal verification.

•• Formal description has the advantage ofFormal description has the advantage ofrigornessrigorness,, unambiguityunambiguity and support for and support for automation. automation.

•• However, in practice finding the formal However, in practice finding the formal description of an interface may be too difficult, description of an interface may be too difficult, too highlytoo highly--cost.cost.

Page 57: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Contract: formal or informalContract: formal or informal

•• As a tradeAs a trade--off, semioff, semi--formal style is often used. formal style is often used. For example, using preFor example, using pre--and postand post--condition andcondition andinvariants as a formal invariants as a formal frame, frame, but for part of the but for part of the prepre-- and postand post--conditions and invariant plain conditions and invariant plain English is used to describe them. English is used to describe them.

Page 58: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

VB componentsVB components

•• Consider the special features of VB, the Consider the special features of VB, the interface of components implemented in VB can interface of components implemented in VB can include the following extra elementsinclude the following extra elements

–– PropertiesProperties

–– EventsEvents

Page 59: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Describing reuse componentsDescribing reuse components

•• Reusable component description: 3C modelReusable component description: 3C model------concept, content and context.concept, content and context.

•• The The conceptconcept of a component is a description of of a component is a description of what the component does. The interface to the what the component does. The interface to the component is fully described and the semantics, component is fully described and the semantics, represented within the context of prerepresented within the context of pre-- and and postpost--conditions, is defined. The intent of the conditions, is defined. The intent of the component should be included in the concept.component should be included in the concept.

Page 60: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Describing reuse componentsDescribing reuse components

•• The The contentcontent describes how the concept is describes how the concept is realized. In essence, the content is information realized. In essence, the content is information hidden from casual users and needs be known hidden from casual users and needs be known only to those who intend to modify the only to those who intend to modify the component.component.

•• The The contextcontext places a component within its places a component within its domain of applicability. By specifying conceptual, domain of applicability. By specifying conceptual, operational, and implementation features, the operational, and implementation features, the context enables a software engineer to find the context enables a software engineer to find the appropriate component to meet application appropriate component to meet application requirements.requirements.

Page 61: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Transfer the 3C model into a Transfer the 3C model into a concrete schemeconcrete scheme

•• Library and information science methodsLibrary and information science methods

–– Enumerated classificationEnumerated classification

–– Faceted classificationFaceted classification

–– AttributeAttribute--value classificationvalue classification

•• Artificial intelligence methodsArtificial intelligence methods

•• Hypertext systemsHypertext systems

Page 62: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Enumerated classificationEnumerated classification

•• Components are described by a defined Components are described by a defined hierarchical structure in which classes and hierarchical structure in which classes and varying levels of subclasses are defined. Actual varying levels of subclasses are defined. Actual components are at the leaf level. components are at the leaf level.

•• E.g., an enumerated hierarchy for window E.g., an enumerated hierarchy for window operations.operations.

•• The hierarchical structure is easy to understand The hierarchical structure is easy to understand and to use, but it lacks of flexibilityand to use, but it lacks of flexibility

Page 63: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Enumerated classificationEnumerated classification----exampleexample

Window operationsDisplay

OpenMenu-based

OpenWindowSystem-based

SysWindowClose

Via pointer...

Resizevia command

setWindowSize,stdResize,shinkWindowvia drag

pullWindow,stretchWindowUp/down shuffle

...Move

...Close

...

Page 64: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Faceted classificationFaceted classification

•• A domain area is analyzed and a set of basic A domain area is analyzed and a set of basic descriptive features is identified. These descriptive features is identified. These features, named facets, are then prioritized by features, named facets, are then prioritized by importance and connected to a component. importance and connected to a component.

•• A facet can describe A facet can describe

–– the function of a componentthe function of a component

–– the data manipulatedthe data manipulated

–– the context in which components appliedthe context in which components applied

Page 65: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Faceted classificationFaceted classification

•• The set of facets describing a component is The set of facets describing a component is called the called the facet descriptorfacet descriptor. .

•• E.g., E.g., {function, object type, system type}{function, object type, system type}

•• Keywords Keywords (values) are assigned to the set of (values) are assigned to the set of facets for each component in a reuse facets for each component in a reuse repository. Software engineers use keywords to repository. Software engineers use keywords to search for possible components. Automated search for possible components. Automated tools can be used to facilitate the search.tools can be used to facilitate the search.

Page 66: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Faceted classificationFaceted classification

•• The advantage of faceted classification is The advantage of faceted classification is flexibility. The facets and linked value can be flexibility. The facets and linked value can be added, deleted or modified easily.added, deleted or modified easily.

Page 67: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

AttributeAttribute--value classificationvalue classification

•• A set of attributes is defined for all components A set of attributes is defined for all components in domain area. in domain area.

•• Values are then assigned to these attributes in Values are then assigned to these attributes in much the same way a faceted classification. much the same way a faceted classification.

•• Attribute value classification is similar to faceted Attribute value classification is similar to faceted classification with the following exception: classification with the following exception:

–– there is no limit on the number of attributes there is no limit on the number of attributes that can be usedthat can be used

–– attributes are not assigned prioritiesattributes are not assigned priorities

–– the thesaurus functions are not usedthe thesaurus functions are not used

Page 68: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

The reuse environmentThe reuse environment

•• A component database capable of storing software A component database capable of storing software components and the classification information components and the classification information necessary to retrieve them.necessary to retrieve them.

•• A library management system that provides access A library management system that provides access to the database.to the database.

•• A software component retrieval system that enables A software component retrieval system that enables a client application to retrieve components and a client application to retrieve components and services from the library server. E.g., object request services from the library server. E.g., object request broker.broker.

•• CBSE tools that support the integration of reused CBSE tools that support the integration of reused components into a new design or implementation.components into a new design or implementation.

Page 69: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

COTS Product ReuseCOTS Product Reuse

•• The term COTS (CommercialThe term COTS (Commercial--OffOff--TheThe--Shelf) Shelf) products can apply to any component that is products can apply to any component that is offered by a thirdoffered by a third--party vendor.party vendor.

•• Large systems, such as eLarge systems, such as e--commerce systems, can commerce systems, can be created by integrating a range of COTS be created by integrating a range of COTS systems.systems.

•• It is possible to reduce costs and delivery times It is possible to reduce costs and delivery times by orders of magnitude compared to the by orders of magnitude compared to the development of new software.development of new software.

•• Furthermore, risks may be reduced as the Furthermore, risks may be reduced as the product is already available and managers can product is already available and managers can see if it meets their requirements.see if it meets their requirements.

Page 70: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Problems with COTS system Problems with COTS system integrationintegration•• The fact that COTS products are usually large The fact that COTS products are usually large

systems or components in their own right and are systems or components in their own right and are often sold as separate standoften sold as separate stand--alone systems introduces alone systems introduces additional problems.additional problems.

•• Lack of control over functionality and performance. Lack of control over functionality and performance.

–– Although the published interface of a product may Although the published interface of a product may appear to offer the required facilitates, these may appear to offer the required facilitates, these may not be properly implemented or may perform not be properly implemented or may perform poorly. poorly.

–– The product may have hidden operations that The product may have hidden operations that interfere with its operation.interfere with its operation.

–– User may simply have to find workUser may simply have to find work--aroundsarounds to to problems if they wish to reuse the COTS products.problems if they wish to reuse the COTS products.

Page 71: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Problems with COTS system Problems with COTS system integrationintegration——ContCont……

•• Problem with COTS system interoperability. It is Problem with COTS system interoperability. It is sometimes difficult to get COTS products to work sometimes difficult to get COTS products to work together because each product embeds different together because each product embeds different assumptions about how it will be used. assumptions about how it will be used.

•• No control over system evolutionNo control over system evolution

ØØVendors of COTS products make their own Vendors of COTS products make their own decisions on system changes in response to decisions on system changes in response to market pressures.market pressures.

ØØNew versions are often produced very frequently New versions are often produced very frequently with unwanted functionality, and previous with unwanted functionality, and previous versions become unavailable and unsupported.versions become unavailable and unsupported.

Page 72: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Problems with COTS system Problems with COTS system integrationintegration----ContCont……

•• Support from COTS vendor. Support from COTS vendor. –– The level of support that is available from The level of support that is available from

COTS vendors varies widely. COTS vendors varies widely.

–– These supports are particularly important These supports are particularly important because developers do not have access to because developers do not have access to the source code and detailed documents.the source code and detailed documents.

Page 73: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Economics of CBSEEconomics of CBSE

•• CBSE should provide a softwareCBSE should provide a software organisationorganisationwith advantages in quality and timeliness.with advantages in quality and timeliness.

•• Impact on quality, productivity and costImpact on quality, productivity and cost

•• Reuse MetricsReuse Metrics

Page 74: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

QualityQuality

•• Ideal setting, components for reuse would be Ideal setting, components for reuse would be verified and defectverified and defect--freefree

•• In reality, formal verification is not carried out In reality, formal verification is not carried out routinely. But, withroutinely. But, with resueresue, defects are found , defects are found and eliminated. Over time, the component and eliminated. Over time, the component becomes defect free.becomes defect free.

•• In a HP study, the defect rate for reused code In a HP study, the defect rate for reused code is 0.9 defects per KLOC, while for newly is 0.9 defects per KLOC, while for newly developed software is 4.1 per KLOC.developed software is 4.1 per KLOC.

Page 75: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

ProductivityProductivity

•• Hard to estimate a figureHard to estimate a figure

•• Less time spent in creating plans, models, Less time spent in creating plans, models, documents, code and datadocuments, code and data

•• It appears that 30It appears that 30--50% reuse can result in 2550% reuse can result in 25--40% productivity improvement40% productivity improvement

Page 76: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

CostCost

•• Net cost saving for reuse = cost if developed Net cost saving for reuse = cost if developed fromfrom scatchscatch –– cost associated with reusecost associated with reuse

•• The costs associated with reuse include:The costs associated with reuse include:

–– Domain analysis and Domain analysis and modellingmodelling

–– Domain architecture developmentDomain architecture development

–– Increased documentation to facilitate reuseIncreased documentation to facilitate reuse

–– Support and enhancement of reuse Support and enhancement of reuse componentscomponents

Page 77: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

CostCost

–– RoyalitiesRoyalities and licenses for externally and licenses for externally acquired componentsacquired components

–– Creation or acquisition and operation of a Creation or acquisition and operation of a reuse repositoryreuse repository

–– Training of personnel in design and Training of personnel in design and construction for reuseconstruction for reuse

Page 78: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Benefits of ReuseBenefits of Reuse

The benefit associated with reuse within a system S can beexpressed as a ration:

noreusereusenoreuseb CCCSR /][)( −=

where noreuseC is the cost of developing S with no reuse, and reuseC is the cost of developing S with reuse.So, 1)(0 ≤≤ SRb

Page 79: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Benefits of ReuseBenefits of Reuse

•• RRbb(S)(S) will be affected by the design of the will be affected by the design of the systemsystem

•• it is important to make a part of an it is important to make a part of an assessment of design alternativesassessment of design alternatives

•• the benefit associated with reuse is closely the benefit associated with reuse is closely aligned to the cost benefit of each individual aligned to the cost benefit of each individual reusable component.reusable component.

Page 80: Component-Based Software Engineeringxiaodong/teaching/VCSI/ch2slides.pdf · What is Component-Based Software Engineering (CBSE) • CBSE is a process that emphasizes the design and

Reuse measure for OO Reuse measure for OO systemssystems

builtreusedlev OBJOBJR /=

where reusedOBJ is the number of objects reused in a system, and builtOBJ is the cnumber of objects built for a system.