Google

Locations of visitors to this page

Dependencies

Dependencies between subsystems

Modularization would be much more easier if there weren't those dependencies. Even coarse grained subsystems depend on each other to work. By choosing the size of subsystems carefully we can reduce the number of cross-subsystem-dependencies, but they cannot be avoided at all.

Assuming we use a set of interfaces to define the services that are available in a subsystem, we get two types of dependencies that must be managed: compile and runtime dependencies.

The following pictures show a simple dependency between two subsystems (bl2 and bl3). On a higher level, bl2 depends on services exposed by bl3. The closer look shows the compile time dependency to the published interfaces and the runtime dependency to the implementation.

Compile time dependencies

Compile time dependencies can be managed by the development environment easily: adding the libraries (jars) with the required interfaces to the project build path makes them available for the compiletime.

It gets harder to manage those dependencies when a system grows and the number of subsystems increases. For this reason Antidoto recommends the use of maven2, especially for managing dependencies.

Runtime dependencies

Having the interfaces at compiletime is not enough. When running the system, those components compiled against interfaces will need concrete implementations. This is where Antidoto uses Spring.