Overview of issue
We
have two software components A and B. A sub module of component A has a
dependecy from a submodule of B and another submodule of B has another
dependency from a submodule of A. The following diagram illustrates a
scenario just described:
In this scenario, do you compile A before B? or B before A? It is as the paradox about the "chicken or egg".
In this scenario, do you compile A before B? or B before A? It is as the paradox about the "chicken or egg".
Possible solutions
The following possible solutions resolve the issue about circular dependecy.- Move the submodule 2 of Component A in B. In this cas you can build the component B without dipendency from A and then you build the component A. Probably the migration of submodule 2 into the component B is not valid solution from the point of view of Functional Analisys.
- Change the build strategy without impact on component structure. Almost always the granularity of building is per component, but you change the granularity per submodule, you can build the submodules with this order: submodule 2 of A, submodule Y of B, submodule X of B and at last submodule 1 of A. Changes of build strategy can may have big impacts especially for large projects not in the initial stages.
- Split the component A in two components. The figure below illustrates this solution.
- You don't have to change the current build strategy. Indeed the sequence build for components is: C, B and A.
- The split of a component refers only technical point of view and not of functional.
No comments:
Post a Comment