Professional Documents
Culture Documents
SOFTWARE COMPONENTS:
Definitions:
“Components are units that are implemented already to enhance the programming
constructs”.
-Ivar Jacobson , 1993.
“Reusable software components are self contained ,clearly identifiable pieces that
describe and perform specific functions , have clear interfaces appropriate documentation
and a defined reuse status”.
-Johannes Sametinger, 1997.
Properties of Components:
A component needs to be well separated from its environment and other components.
2
Example:
OBJECT:
Definition:
Objects are real time entities that comes along with the associated information and set of
specific functions or operations.
Properties of objects :
Object has a unique identity to identify it despite the state changes for its entire life
time.
A construction plan describing the state space, initial state and behavior of new object
is needed.
Such a plan can be explicitly available as a class or it can be implicitly available in the
form of objects that exist previously.
A component act through object and it normally consists of one or more classes or
prototype objects.
There is no need for a component to contain classes only or even to contain classes at
all.
A component that does not maintain observable state cannot maintain references even
to the objects it created.
A component may contain multiple classes , but a class is not confined to being part of
a single component.
The super class of a class do not necessarily need to reside in the same component as
class itself. It can be in another component .Hence the inheritance relationship exists
between the two components.
3. The module development and testing followed by systems integration and testing
leaves room for errors that are merely a result of composition and which are not
apparent at the level of individual components.
4. The reason for the above failure is the late integration.Hence integration testing is
no longer feasible.
5. Version checks are useful and essential at the stage of late integration.
4
MODULES:
• The most popular modular languages are Ada, Modula-2, Modula-3,Pascal and
C#. In Ada ,Modules are packages.
COMPONENT ARCHITECTURE:
To build any system that is complex , it is necessary to have rules for design and
implementation .Hence architecture is needed.
Architecture needs to create simultaneously the basis for independence and co-operation.
Properties of an Architecture:
1. Functionality
2. Performance
3. Reliability
4. Security
A platform is the base for the installation of components and component framework. A
platform can be concrete or virtual.Concrete platforms provide direct physical support
(hardware) .Virtual platforms emulate a platform on the top of the other.
An interoperation design for the component frameworks comprises the rules of the
interoperations among all the frameworks joined by the system architecture.
To handle the complexity of larger components , the architecture itself must be layered .It
is called as a meta architecture.
6
Tiers Layers
1.Tiers are seen from top-down. 1.Layers are seen from bottom-up.
2.It increases the structured relevance. 2.It increases the abstract nature.
3.It decreases the application-specific 3.It increased the application specific
nature. nature.
4.It has decreasing performance. 4.It has increasing performance and
resource relevance.
The higher tiers provide shared lower layers to accept lower tiers.Tiers are existing side
by side while layers sit on top of the each other.
The lower layer starts with components.Above this is the component system which is the
framework of component frameworks.But the components themselves have the objects
and class frameworks.
A component instance can be specified as CI.CI can communicate with other component
instance either directly by CORBA or JAVA Beans events or indirectly through a
component framework that mediates and regulates component interaction.
• Components and middleware are closely related since components resided in any
OS in a distributed system. By means of middleware bus components can be
accessed and communicate with one another. Components can also reuse
middleware components.
1. Identifiers
2. Authentication
3. Directories
4. Certificates and public-key infrastructures
5. Location transparency
6. Object Invocation
7. Passing messages.
8. Remote calls etc.,
TYPES:
• In MOM, messages are generally untyped and the internal structure of messages
is the responsibility of the application.
INTERFACES:
An interface must define the components access points.These points allow clients of a
component to access the services provided by a component.
Interface specification must be contractual because, the component and its clients are
developed in mutual ignorance (they do not know about each other).Therefore it forms a
middle ground for successful interactions.
The following are the non-technical aspects that are to be obeyed by a contractual
interface.
• The economy of scale must be kept in mind.
• Redundant introductions of similar interfaces must be minimized.
• A common media is needed to publish and advertise interfaces and components.
9
Example: International standard book number which will reveal the publisher author and
country code without revealing the books contents.It is also a need to have abstract names
to refer the interfaces.
Component model:
A component is said to be useful if it offers right set of interfaces and it can function in
all component worlds without requiring any interface beyond the availability of interfaces
provided by different component worlds.
Reason: Java uses “ write once use everywhere” concept.A java file is converted into
class files which are collection of byte cores allowing a component to run everywhere.
Instead of constructing a component with everything built in, it is wise to use the reuse
concept.
Disadvantage :
Justification:
Increasing the reuse increase the context dependencies and increase the leanness and
components .It also makes smaller markets.
10
• It acts a middleman between client and the component since they do not know
each other.
Types of interfaces:
1. Direct interface
2. Indirect interface.
Direct interface:
Indirect interface:
• The direct and the indirect interfaces can be grouped into a single concept.This
concept is achieved using static objects that can be a part of component.
• The targets object class is retrieved and the method call is directed to the method
call is directed to the method definition in that class.
• The client and component do not know about the third party.
Example:
11
Therefore a client asking for a grammar checker might get the one that is implemented
outside TextServices.
Versions:
• Some problem regarding versioning arises when moving from direct to indirect
interfaces because indirect interfaces involve third parties.
• It is advisable to avoid indirect coupling of parties that are of invompatible
versions.
• It is necessary to ensure that older and newer components are either compatible or
clearly detected as incompatible.
Interfaces as contracts:
Safety:
• Separation of pre and the post condition from the concrete operations is needed.
• A common “leads to “ operator can be used to represent the progress conditions
in a contract.
• This style is introduced by Helm.
• Another approach is to use abstract non-deterministic statement sequences to
specify safety and progress implicitely as abstract programs.(eg ADT’s)
• The above approaches like conditions, abstract statement sequences ,state what is
done under which provisions.
• They do not state how long it would take , what resources are utilized or
consumed.
• If a provider is extremely slow in performing a function , the client will also
slowdown its duty and hence the entire systems will fail to function properly.
• If a provider uses excessive heap storage , it affects the entire system.
• They should be regulated by contracts,Else it is not easy to pinpoint
underperforming and misbehaving components.Hence there will not be any
wastage of time and system resources.
• The specification of both average and worst time and space requirements or
bounds in a contract could add some practical value of that component.
• A contract remains successfully and sufficiently universal where reference to
platform specific bounds is avoided.
• To fill this gap, a component must come with the additional information required
to determine absolute bounds.