What are PhysicalDependencies?
A physical dependency exists when one deployable module has a compile time dependency on another deployable module. The most common form of deployable module in Java is the jar file. For instance, if A.jar requires B.jar in the classpath at compile time, then A.jar has a physical dependency on B.jar. This physical dependency usually requires that A.jar also be deployed with B.jar. There are many driving forces behind why we need to manage PhysicalDependencies.
- Complex dependencies hinder maintenance.
- Complex dependencies prevent extensibility.
- Complex dependencies inhibit reusability.
- Complex dependencies restrict testability.
Can Design Patterns help?
Many commonly used design patterns allow us to design flexible and resilient class structures. But for large software systems developed by large teams, it quickly becomes difficult to manage and enforce the logical dependency relationships among thousands of classes and packages. Dependency cycles inevitably and unexpectedly creep into your design, polluting your system structure. Over time, these complex dependencies cause system rot and degrade your system in many ways, often times before your first production release. Design patterns can help though. In addition to using patterns to create resilient logical designs within a deployable module, patterns can also be used to manage and enforce PhysicalDependencies between modules. A catalog of patterns can be found at Extensible Java.
How can PhysicalDependencies be managed?
One of the most challenging aspects of software development is managing and enforcing your design and architecture. An elegant conceptual design can quickly evolve into a tangled mess during implementation, where not one developer grasps the high level vision initially established. Attempting to manage your design and architecture by manually synchronizing your documentation with a constantly evolving code base is a lost cause. In conjunction with the patterns found at Extensible Java, JarAnalyzer helps you manage and enforce your PhysicalDependencies in an automated, repeatable, consistent and efficient way.