component development taciana amorim vanderlei tav@cin.ufpe.br

Post on 20-Dec-2015

214 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Component Development

Taciana Amorim Vanderlei

tav@cin.ufpe.br

Contents

The methodology Problems of asynchrony Multithreading Learning from circuit design Living without implementation inheritance Nutshell classes Language support Caller encapsulation The enviroment The tools

The methodology

Requires support for component-oriented programming: polymorphism modular encapsulation late binding and loading safety

Problems of asynchrony

Multicasting Event object recipients are themselves free to

post new events. The set of recipients could change while a

multicasting is in progress. Some of the recipients might raise exceptions

while handling received event objects and the multicast is in progress.

Multithreading

Concept of supporting multiple sequential activities concurrently over the same state space.

Problems: Conflits from concurrent writes; Deadlocks; Degradation of performance with synchronization; Prolonged locking of frequently shared resources; Propagation of exceptions across thread boundaries; Difficult to debug code that uses multiple threads and

complex interlocking patterns.

Multithreading

A concept that would help to reduce complexity in many such cases is transactional programming.

Application server technologies that are increasing availability of transactional infrastructure support for components: COM+ EJB CCM CLR

Learning from circuit design

Fully asynchronous circuits Best performance Complex to design

Synchronous circuits Synchronize all activities of component boundaries to clock

signals. Require asynchrounous communication at the boundary. Synchronous communication at the boundary requires

asynchronous circuit. Introdution of remote procedure calls in the software

Tendency to support synchronous communication, forcing the introdution of asynchronous computation.

Living without implementation inheritance Subclass a class introduces implementation

overhead and runtime overhead. COM-style aggregation helps to avoid the

performance implications of forwarding. The implementation cost can be hidden by using

various forms of automation. Generate the code of a forwarder´s class; Use a template mechanism.

Nutshell classes

It has the same interface as the object it is forwarding to, and all methods are implemented as plain forwards to the target object.

Nutshell classes are themselves abstract. Recently added to Java in the form of the

proxy. CLR offers a similar mechanism via its

RealProxy class.

Language support

The programming overhead is minimal and the runtime overhead in time and space is equal of implementation inheritance schemes.

Objective-C – support dynamic inheritance from an object.

Caller encapsulation

Need to encapsule the caller rather than the callee.

Caller encapsulation is put to good use in several places in the BlackBox component framework.

The enviroment – selecting target framework A component object cannot function

outside a defined enviroment. A component object can be design to

operate in multiple such enviroments simutaneously.

Danger to investing heavily in solutions based on a single framework.

The tools – selecting programming languages Requirements to component programming selecting

language: Polymorphism Late binding Encapsulation Safety Explicity state dependencies

Language paradigm level Object-oriented

Java and C++ Functional

Component distribution and acquisition

Contents

Building what sells Product cataloging and description Component location and selection Superdistribution Intermediaries

Building what sells

In the past was a lack of business models. Slowly changing with the growth of

specialized markers of software components and intermediaries.

Software services are becoming increasingly popular.

Product cataloging and description

It is not clear how to specify a software component.

Component specification need to be placed in an architectural context that includes: Possible embedding in component framework; Platform assumptions; Requirements; Styles of composition.

Component location and selection

How can component services be described to allow for efficient retrievel and hight

precision?

Ontolological approaches

Component location and selection

KIF, developed at standford, proposes a standard (logic.standford.edu/kif).

Project called Reuse Center in Corinto, Italy (www.corinto.it).

Computer Industry Project (SCIP), project at Standford (www.standford.edu/group/scip).

Superdistribution

Pay-per-useSend a component to everyone who might at

all benefit. Works by encouraging users of a

component to send it to friends.

Intermediaries

Represent bundled interests of one side to the other.

Intermediary servicesQuality control Integration services across productsApplication service provider (APS)

Component assembly

Contents

Systematic initialization and wiring Visual component assembly Compound documents to supersede visual

assembly Componente beyond graphical user interface

environmetns Managed and “self-guided” component

assembly End-user assembly Component evolution

Systematic initialization and wiring

Composition Selecting components and interconnecting

those using selected connectors. BML (bean markup language) is a

JavaBeans composition language.

Visual component assembly

One way of simplifying the assembly process.

JavaBeans and COM support general connection paradigms.

Compound documents to supersede visual assembly Documents are applications and document

editing is component (instance) assembly.

Integration of build and use enviroments, especially in the context of compound documents.Strong and produtive case for application

development.

Components beyond graphical user interface environments

Server-based solutions in particular have inspired many of the current components software approaches.

Server-side solutions: Sun´s EJB Microsoft´s COM+ Sun´s servlets Microsoft´s VB Microsoft .NET

Modern graphical user interfaces

Modern graphical user interfaces

Relative regularity of user interfaces

Relative regularity of user interfaces+ =

Reusable components valuable assets

Reusable components valuable assets

Managed and “self-guided” component assembly Managed assembly

Automated assembly component that implements the policies that govern the dynamic assembly of instances.

Self-guided assembly Similar as above, but uses rules that are carried by

the component instances themselves.

End-user assembly

Enable end users to assemble custom solutions. Anders Morch termed this feature distinguished

three levels: Customization Integration Extension

Robert Slagter and Henri ter Hofte show an application with computer-suported collaboration. Groove Transceiver (www.groove.net)

Component evolution

Potential components increases with deferral of assembly => Fragility increases

Problems of version conflits Upgrading of operacional instances to newer versions

is of active research. COM – robust approach to supporting version

coexistence. Java does not have a special version control

mechanism.

Questions?

top related