Tags » Inversion Of Control

Spring Bean Instantiation and Dependency Injection

What is Spring IOC/DI?

Spring IOC (Inversion of Control) or dependency Injection is a concept where objects define their dependencies (for example A define that it needs B to be injected), however actual injection of these properties is left to the container when it creates instances of those dependencies (for example, when instance of B is created it is injected into A). 399 more words

Arbitrary Method Replacement

Controller lifestyle with Sitecore MVC

Just a friendly reminder: controllers will need to have a transient lifestyle when working with Sitecore MVC and inversion of control containers!

In a regular MVC application controllers are generally defined with a PerWebRequest lifestyle. 91 more words


Dependency Injection and IoC Containers

In software engineering, dependency injection is a software design pattern that implements inversion of control for resolving dependencies. Dependency injection means giving an object its instance variables.

141 more words

Abusing dependency injection containers

What? You really want to abuse DI containers – one of the holy buzzwords of today’s software architecture?!

Yes, but please give me the time to explain the why and how. 2,142 more words


Coupling Design Patterns (Service Locator with a Factory)

Author: Cole Francis, Architect


My last editorial focused on building out a small application using a simple Service Locator Pattern, which exposed a number of cons whenever the pattern is used in isolation. 1,083 more words


Exploring the Service Locator Pattern

Author: Cole Francis, Architect


In object-oriented programming (OOP), the Dependency Inversion Principle, or DIP, stipulates that the conventional dependency relationships established from the high-level policy-setting modules, to the low-level dependency modules, are inverted (i.e. 1,854 more words


Building a Web API 2 project from scratch using OWIN/Katana .NET Part 5: adding an IoC


In the previous post we transformed the CustomersApi application a little bit. We added a customer repository and a customer service. We also transformed the Get action method of CustomersController into an asynchronous one. 1,014 more words