Chapter 12. Spring.NET
Menu
- Introducing Spring.NET
- Managing lifetime
- Working with multiple components
- Configuring difficult APIs
In the previous chapters, you saw how to map the principles and patterns from parts 1–3 to Castle Windsor and StructureMap. In this chapter, we’ll do the same with the Spring.NET DI CONTAINER.
Together with Castle Windsor and StructureMap, Spring.NET belongs to the set of “first generation” DI CONTAINERS on .NET. It appeared in 2006, and even today it still offers basic support for .NET 1.1. It’s a port of the Java version of the Spring Framework, which is a big and comprehensive application framework that addresses many different aspects of software—not only OBJECT COMPOSITION. The DI CONTAINER is one of the many components available in the framework, but it can perfectly well be used as a stand-alone component without the need to reference any of the other Spring.NET components.
In this chapter, we’ll focus on the Spring.NET DI CONTAINER while ignoring the rest of the application framework. As in the previous chapters and in those to follow, we’ll examine how Spring.NET can be used to apply the principles and patterns set out in parts 1–3. Figure 12.1 shows the structure of the chapter.