concept module in category dependency injection

appears as: module, modules, modules, module, A module
Dependency Injection

This is an excerpt from Manning's book Dependency Injection.

In object-oriented software design, a module is a group of logically related classes (or components), where a module is independent of and interchangeable with other modules. Typically, you’ll see that a layer consists of one or more modules.

More often than not, however, it can be more challenging to see whether a class has multiple reasons to change. What often helps is to look at the SRP from the perspective of code cohesion. Cohesion is defined as the functional relatedness of the elements of a class or module. The lower the relatedness, the lower the cohesion, and the higher the risk a class violates the SRP.

When working with solutions in Visual Studio, it’s easy to lose track of the important Dependencies. This is because Visual Studio displays them together with all the other project references that may point to assemblies in the .NET Base Class Library (BCL). To understand how the modules in Mary’s application relate to each other, we can draw a graph of the dependencies (see figure 2.6).

Figure 2.6 The dependency graph for Mary’s application, showing how the modules depend on each other. The arrows point towards a module’s dependency.

02-06.eps
Dependency Injection: Design Patterns Using Spring and Guice

This is an excerpt from Manning's book Dependency Injection: Design Patterns Using Spring and Guice.

Spring Framework is a groundbreaking and cornerstone dependency injection library of the Java world. It is largely responsible for the popularity and evolution of the DI idiom and for a long time was almost synonymous with dependency injection. Spring was created by Rod Johnson and others and was initially meant to solve specific pains in enterprise projects. It was established as an open source project in 2003 and grew rapidly in scope and adoption. Spring provides a vast set of abstractions, modules, and points of integration for enterprise, open source, and commercial libraries. It consists of much more than dependency injection, though DI is its core competency. It primarily supports setter and constructor injection and has a variety of options for managing objects created by its dependency injector. For example, it provides support for both the AspectJ and AopAlliance AOP paradigms.

A class can itself be a member of a larger unit of collective responsibilities called a module. A module is an independent, contractually sound unit that is focused on a broad part of business responsibility. For example, a persistence module may be responsible for storing and retrieving data from a database.

Figure 4.6. Architecture of modules brought together by dependency injection