Before moving to Component Based Software Engineering , We must have some ideas on the components and the component interfaces.
A component is an independent executable entity that can be made up of one or more executable objects.
- Standardized: Component standardization means that a component that is used in a CBSE process has to conform to some standardized component model.
- Independent: A component should be independent – it should be possible to compose and deploy it without having to use other specific components.
- Composable: For a component to be composable, all external interactions must take place through publicly defined interfaces.
- Deployable: To be deployable, a component has to be self-contained and must be able to operate as a stand-alone entity on some component platform that implements the component model.
- Documented: Components have to be fully documented so that potential users of the component can decide whether or not they meet their needs.
Component has two related interfaces. They are:
Fig: Component interfaces
- Provides interface: Defines the services that are provided by the component to other components.
- Requires interface: Defines the services that specifies what services must be made available for the component to execute as specified.
Fig: A model of a data collector component
A component model is a definition of standards for component implementation, documentation and deployment.
- It specifies how interfaces should be defined and the elements that should be included in an interface definition.
Examples of component models
- EJB model (Enterprise Java Beans)
- COM+ model (.NET model)
- Corba Component Model
Elements of a component model
Components are defined by specifying their interfaces. The component model specifies how the interfaces should be defined and the elements, such as operation names, parameters and exceptions, which should be included in the interface definition.
In order for components to be distributed and accessed remotely, they need to have a unique name or handle associated with them. This has to be globally unique.
The component model includes a specification of how components should be packaged for deployment as independent, executable entities.
Fig: Basic elements of a component model
The Component Based Software Engineering CBSE Process
Component based software engineering (CBSE) is an approach to software development emerged from the failure of object-oriented development that relies on the effective reuse of software.
Fig: CBSE processes
Types of Component Based Software Engineering CBSE processes
- CBSE for reuse
This process is concerned with developing components or services that will be reused in other applications.
- CBSE with reuse
This process is the process of developing new applications using existing components and services. This involves:
- Developing outline requirements.
- Searching for components then modifying requirements according to available functionality.
- Searching again to find if there are better components that meet the revised requirements.
- Composing components to create the system.
The process of assembling components to create a system is known as Component composition.
- Composition involves integrating components with each other and with the component infrastructure.
- Normally you have to write ‘glue code’ to integrate components.
Types of composition
- Sequential composition: where the composed components are executed in sequence. This involves composing the provides interfaces of each component.
- Hierarchical composition: where one component calls on the services of another. The provides interface of one component is composed with the requires interface of another.
- Additive composition: where the interfaces of two components are put together to create a new component. Provides and requires interfaces of integrated component is a combination of interfaces of constituent components.
The code that allows components to work together is known as glue code. Glue code may be used to resolve interface incompatibilities.
If A and B are composed sequentially, then glue code has to call A, collect its results then call B using these results, transforming them into the format required by B.
87 total views, 0 views today