Inversion of Control and AOP
Get flash to fully experience Pearltrees
AOP - Aspect Oriented Programming
I started doing some compare and contrast code on well-known .Net Inversion Of Control containers some time in 2009, in order to better convince my colleagues that they should be using a good one. I haven't succeeded yet, but I have reworked the code into a simple and practical survey that may be of use to anyone interested in picking an Inversion of Control Container for .Net code. In general I'm only looking at basic features, and the syntax used to access them, but I hope it's enough to get a feel for each one's strengths and weaknesses. This article isn't aimed at teaching what an IoC container is or why you would want one; but in brief, Dependency Injection is the pattern of supplying an object's dependencies to it, usually via the constructor.
Sep IoC is not a new concept, however. It has been around for several years now. Using object-oriented design principles and features such as interface, inheritance, and polymorphism, the IoC pattern enables better software design that facilitates reuse, loose coupling, and easy testing of software components. This article discusses IoC and demonstrates how to use this pattern in your software design without having to implement any of the open source frameworks. Inversion of Control is not a new term in computer science.
In this post I will do a performance comparison of the most popular IoC containers. Of course performance is not the only criteria when choosing a container for a project. Perhaps you need features like interception , then not all containers are suited. But if the container is "only" used for wiring up dependencies, why not choose the fastest one? The test setup The contestants
Introduction The Simple Injector is an easy-to-use Inversion of Control (IoC) library for .NET and Silverlight. It solely supports code-based configuration, and is an ideal starting point for both developers unfamiliar with larger IoC / DI libraries and for developers who seek to apply the SOLID design principles to their applications. Many development teams are already using Simple Injector in their production environments today with great satisfaction.
Introduction Spring.Net is a framework aimed at providing comprehensive infrastructural support for .Net enterprise applications. At the core of Spring.Net is the concept of Dependency Injection, otherwise known as Inversion of Control. With the example code provided, you can follow along as you take a look at Spring.Net and how it implements this powerful concept.
Version 1.1.3 is released! Grab it here: 1.1.3 - It comes with initializer method support (many thanks to Graham Nash ) and object configuration inheritance (many thanks to Maxim Klyuchnikov ) Contribution Feedback and even contribution are both very much welcome, as they are the only way to make Recoil better. If you have ideas, objections or comments, feel free to stop by at the Discussion .
Fluent API for Spring.Net is an extension to the Spring.Net framework. This extension allows you to configure your dependency injects from within code instead of XML files. This library is an extension, and thus it supports both XML and code base configuration. To get yourself up and running when using this library: Getting Started To view the list of changes made to FluentSpring between version:
Inversion of Control (IoC) is a software design principle that describes inverting the flow of control in a system, so execution flow is not controlled by a central piece of code. This means that components should only depend on abstractions of other components and are not be responsible for handling the creation of dependent objects. Instead, object instances are supplied at runtime by an IoC container through Dependency Injection (DI). IoC enables better software design that facilitates reuse, loose coupling, and easy testing of software components.