Component-based Software Engineering
Due to the need of developing complex software systems, with low cost and in a short period of time, code reusability has become one of the biggest requirements in the software developing industry today. While object-oriented development failed to support effective reuse because single object classes are too detailed and specific, a new paradigm became popular called Component-based Software Engineering.
What is Component-Based Software Engineering?
Component-based software engineering (CBSE) can be defined as an approach to software development that relies on software reuse. It aims at reducing costs of building software through developing different components and integrating them to a well-defined software architecture. These components are language independent and can be developed by different team of programmers. Each of them should be independent of the whole system and should have some clearly defined functionality. Moreover, they should be assembled in context of well-defined architecture and communicate with each other using interfaces. Although components are shared, their implementations are hidden.
The principles of component-based software development approach
But what are some of the principles followed while building these components?
- Reusable: The components should be designed in a way that enables them to be used in different applications and different scenarios. This way, we can reduce cost and become much more productive since we will spend time only on customizing an already existing component.
- Replaceable: Each component should be able to be replaced by a similar one in case it is no longer suitable, different functionality is required or the current component is obsolete.
- Lack of context specification: Components should lack context specification. This way, they can be integrated into different environments and contexts.
- Extensible: Each of the components can be further adjusted to provide additional functionality.
- Encapsulation: Components hide their local details such as processes and variables and interact with each other through their interfaces.
- Independence: Each component should possess minimal dependencies related to others. This way we are sure that the system is not affected by the deployment of a particular component.
Taking the above principles into consideration, there are many advantages of using this approach compared to the traditional approach of building the system from the scratch.
First of all, this approach increases productivity and reduces cost. This happens because we can reuse these components and adjust them to the particular scenario through saving time and money. What is more, these components can be developed by different teams of developers which is also a reduction of cost. In addition, if you need to change something in the way a component works, you don’t have to make changes to the whole system, but only to the component affected and than deploy back. This can reduce a lot of time and effort. This development approach can also be seen through the ease of development process, since the programmers can work independently in smaller teams. Finally, by using component-based software engineering, specific roles can be assigned to developers more efficiently through isolating them from unrelated tasks and allowing them to focus on tasks that they are experts with. This way, the complexity of building a system is significantly decreased.
Disadvantages of Component Based Software Development
As everything else, using component-based software development has its own disadvantages too. Some of its problems include
- Component trustworthiness: How can we trust a component if there is no source code available?
- Component certification: Who will certify the components for its quality?
- Emergent property prediction: How can we predict the emergent component composition properties?
- Requirements trade-offs: How do we analyze and compare components?
- Standardize: With component standardization, we mean that a component that is used in a CBSE process, has to conform to some standardized component model. This model has some meta-data, documentation, interfaces and deployment.
- Independent: A component should be independent, so that it can be possible to compose and deploy it without having to use other specific components. If the component needs externally provided services, you should specify these services as ‘requires’ on its interface.
- Composed: They use public defined interfaces to make external interactions. In addition, they must provide external access to its methods and attributes.
- Deployable: A component should be self-contained, which means that it must be able to operate as a stand-alone entity on some component platform that its model is used. This usually means that the component does not have to be compiled before it is deployed.
- Documented: Components have to be fully documented so that potential users of the component can decide whether or not they meet their needs. Components interface syntax and semantics have to be specified.
A component model defines standards for component documentation, implementation and deployment. It also specifies the elements included in the interface definition. Some component model examples include:
- EJB model (Enterprise Java Beans)
- COM+ model (.NET model)
- Corba Component Model
These models are used from middleware that provides support for executing components. Component model implementations provide:
- Platform services which allow components to communicate.
- Horizontal services which are independent services used by different components.
Components are deployed in a container so that they can use these services.
To conclude, in this article, I tried to analyze a new way of building complexed software systems and the difference of this approach with traditional software engineering. This paradigm increases developer’s productivity, reduces costs and time needed to develop software. Although there are some problems using it, these are the main reasons that will make component-based software engineering widely spread in software development industry.
1. Cai Xia, Michael R. Lyu, Kam-fai Wong, Ada Fu, “Component-Based Software Engineering: Technologies, Quality Assurance Schemes”
2. Microsoft Developer Network, “Chapter 3: Architectural Patterns and Styles”