Component-Based Software David S. Rosenblum (ed. By Richard N. - - PowerPoint PPT Presentation

component based software
SMART_READER_LITE
LIVE PREVIEW

Component-Based Software David S. Rosenblum (ed. By Richard N. - - PowerPoint PPT Presentation

Component-Based Software David S. Rosenblum (ed. By Richard N. Taylor) ICS 221 Fall 2002 Components and Reuse n Develop systems of components of a reasonable size and reuse them n Repeated use of a component n Adapting components for use


slide-1
SLIDE 1

Component-Based Software

David S. Rosenblum (ed. By Richard N. Taylor) ICS 221 Fall 2002

slide-2
SLIDE 2

Components and Reuse

n Develop systems of components of a

reasonable size and reuse them

n Repeated use of a component n Adapting components for use outside their

  • riginal context

n Extend the idea beyond code to other

development artifacts

slide-3
SLIDE 3

Goals of Reuse

n Goals of reuse are primarily economic

n Save cost/time/effort of redundant work, increase

productivity

n Decrease time to market n Improve systems by reusing both the artifact and

the underlying engineering experience

n Economic goals achieved only when units of

reuse reach critical mass in size, capability and uniformity

n But quality is another motivation

slide-4
SLIDE 4

Historical Origins

n Idea originally due to Doug McIlroy

“Mass Produced Software Components”, 1968 NATO Conference on Software Engineering

n Reusable components, component libraries

n Named as a potential “silver bullet” by Fred

Brooks (1987)

n Much research interest in the ’80s and ’90s n Technical and managerial barriers have

prevented widespread success

n This led McIlroy to believe he had been wrong!

slide-5
SLIDE 5

Musings on McIlroy…

n Granularity n Degrees of variation n Means of achieving specialization n Means of composition, and reasoning

about composed systems

slide-6
SLIDE 6

From Reuse to Component- Based Development

n The term reuse is a misnomer

n No other engineering discipline uses the term n Systematic design and use of standard

components is accepted practice in other engineering disciplines

n The term will (eventually) become obsolete

n The important ideas behind reuse are

centered on the notion of components

n Design of components for use in multiple contexts n Design of families of related components n Design of components with standardized

packaging

slide-7
SLIDE 7

Different Flavors of Components

n (Reusable) Third-Party Software Pieces n Plug-ins/Add-ins n Applets n Frameworks n Open Systems n Distributed Object Infrastructures n Compound Documents n Legacy Systems

slide-8
SLIDE 8

Software Engineering Implications

n Traditional software systems

n are developed by a single organization n undergo a phased development process n have a synchronized release schedule n have a proprietary design and proprietary

component interfaces

n have a monolithic code base n go through a painful evolution

slide-9
SLIDE 9

Lifecycle Model of Traditional Systems

Requirements Requirements Design Design Implementation Implementation Deployment Deployment Validation Validation Integration Integration

slide-10
SLIDE 10

Component-Based Development

slide-11
SLIDE 11

A Possible Lifecycle Model for Component-Based Software

System Requirements System Requirements System Design System Design System Integration System Integration

Component Validation Component Validation … …

“Integrate-Then-Deploy”

System Validation System Validation System Deployment System Deployment

slide-12
SLIDE 12

Another Possible Lifecycle Model

System Requirements System Requirements System Design System Design System Integration System Integration

Component Deployment Component Deployment … …

“Deploy-Then-Integrate”

slide-13
SLIDE 13

Implications of the Lifecycle Models

slide-14
SLIDE 14

A Challenge for Component- Based Software: Testing

Unit testing alone won’t cut it Nor will static analysis techniques New dynamic analysis methods are needed

slide-15
SLIDE 15

Another View of the Problem

n Single vendor n White-box artifacts

n code, specs, test cases,

analysis support, docs

n Multiple vendors n Many black-box artifacts

n code, internal specs, test

cases, analysis support

Old-Style Development Component-Based Development

slide-16
SLIDE 16

A (Partial) Solution: Component Metadata

n Metadata = “data about data”

n Abstracted information about component internals and

development history

n Can be accessed via metamethods

n Component developer supplies metadata n Application builder exploits metadata

n Design time and runtime

+ Component Developer Application Builder

Development Tools

slide-17
SLIDE 17

Kinds of Metadata for SE Tasks (I)

n Information on customizing the component

n Component properties n Constraints on properties

n Information to integrate the component

n Interface syntax

n Java reflection, COM QueryInterface, CORBA DII n Generated and consumed events

n Interface semantics

n Pre/post conditions and invariants n Protocol specs

Many of these are “traditional” kinds of component metadata

slide-18
SLIDE 18

Kinds of Metadata for SE Tasks (II)

n Information to evaluate the component

n Static and dynamic metrics

n Cyclomatic complexity n Test coverage achieved by developer

n QoS information n Pricing/leasing information

n Information to test and debug the component

n Exported state machine representation n Embedded test suite with coverage information n Input/output dependencies at interface n Dynamically computed coverage information

slide-19
SLIDE 19

Kinds of Metadata for SE Tasks (III)

n Information to analyze the component

n Summary flow information

n Control dependencies n Data dependencies

n Graph models

n Call graph n Control-flow graph

n Other information to support software

engineering tasks

slide-20
SLIDE 20

An Example: Program Slicing

n Suppose we want backward slice w.r.t. total at B

n Do saving, amount, and/or state of checking

influence balance at A?

n Dependency metadata for BankingAccount could tell us!

public boolean checkingToSavings (String cAccountCode String sAccountCode, float amount) { BankingAccount checking(cAccountCode); BankingAccount saving(sAccountCode); float balance, total; . . . checking.open(); saving.open(); . . . balance = checking.moveFunds(saving, amount); // A . . . total = balance + additionalFunds; // B . . . }

slide-21
SLIDE 21

Implementation Issues: Metadata Format and Naming

n Need uniform format for text and non-text

metadata

n XML

n DTDs specify format

n Need uniform way of identifying purpose of

metadata to users

n MIME-like tags describe purpose

n Example: analysis/data-dependency for data flow

information

n Who establishes naming scheme? n How do new metadata get established?

slide-22
SLIDE 22

Implementation Issues: Metadata Addition & Retrieval

n Need uniform way for a component to expose

its particular collection of metadata

n Two metamethods

n QueryMetadata n Like QueryInterface in COM n GetMetadata(tag, parameters) n Selects metadata according to “tag” n Returns statically-embedded or dynamically computed

value

n Could operate as an iterator for complex piecewise

metadata

slide-23
SLIDE 23

Metadata and Testing of Distributed Components

n Metadata can be used to aid application of

existing testing techniques in distributed

  • bject systems

n But how should existing testing techniques be

changed for distributed components and distributed object systems (and how can metadata help)?

n Coverage criteria, reliability models n Testing infrastructure n Test monitoring and oracles

slide-24
SLIDE 24

Conclusion

n Component-based software is the wave

  • f the future

n But there are many software

engineering challenges to address

n Metadata may provide a solution