List of Figures

 

Chapter 1. Modular development with Spring and OSGi

Figure 1.1. Introducing an interface helps in moving from a tightly to a loosely coupled solution. The question now is how can we get the right implementation and stay loosely coupled?

Figure 1.2. When using dependency injection, application classes don’t need to look up their own dependencies—the lightweight container is in charge of assembling the components.

Figure 1.3. With a completely object-oriented solution, business code becomes tangled and cross-cutting concerns are scattered all through the application. AOP helps modularize cross-cutting concerns in their own programming units, allowing for cleaner business code.

Figure 1.4. In addition to supplying the lightweight container, Spring provides support for classic enterprise application scenarios and supports many Java frameworks in a consistent way.

Figure 1.5. An OSGi environment builds on top of Java and is divided into three layers, each of which provides a strong foundation for modularity.

Figure 1.6. Thanks to the service registry, modules can publish and consume services. They can then communicate in a loosely coupled manner, which enforces modularity.

Figure 1.7. Spring DM is composed of a set of OSGi bundles that become part of the infrastructure when installed in an OSGi container. They can then manage a Spring application context for bundles or even start a web container inside the OSGi container.