NOTE: To use the advanced features of this site you need javascript turned on.

Home Knowledge Base Software Migrators Re-engineering To Components

Re-engineering To Components

Software components represent an evolution of the object-oriented concepts. A software component is a set of objects that work together in offering a well-defined functionality. It includes source code and other resources, as follows:



Re-engineering a set of classes into software components means identifying all class groups that are homogeneous from a functional point of view.

The process begins from the class diagram, where all application's and the connections between them are included. Class connections are of several types: association, generalization, aggregation and composition. For simplicity, interfaces are assimilated to classes and all connection types are merged into one. Such an approach transforms the class diagram into a directed graph.

Graph theory provides the concept of strongly connected component. Given a directed graph, a strongly connected component is a subgraph with at least one path between all its nodes. When the graph has only one strongly connected component, the graph itself is called connected.



The simplified class diagram depicted above contains the classes of a small object-oriented application. Since connections between classes have been simplified, an initial analysis does not reveal enough information on class organization. By applying an algorithm for identifying strongly connected components, three such components are identified:



Each of these components contains classes that are heavily interconnected and which have minimal communication with classes outside the component. The communication between two components is unidirectional: component 2 → component 1, component 1 → component 3 and component 2 → component 3.

There are several algorithms for determining strongly connected components in a graph. The most suitable algorithm should be selected, taking into account the particularities of software development (e.g. average class number in small/medium/large software applications).

Strongly connected components identified by the algorithm require further analysis, because not all of them are suitable software component candidates. Reuse is the main feature of a software component a decisive factor in the final decision.

Related Topics