What is Inversion of Control?
Inversion of Control (or IoC) can be quite confusing when it is first encountered. What is it? What problems does it solve? When is it appropriate and when not?...
Inversion of Control (or IoC) can be quite confusing when it is first encountered. What is it? What problems does it solve? When is it appropriate and when not?...
I am about to dip my toe into DI/IoC for the first time with part of an app we have in production. I've spent the last month or so researching DI/IoC and will most likely use the Castle Windsor Container although NInject may be an option. Any of you folks out there got any advice & guidance on best practices, typical pinch/pain points, g...
Which C#/.NET Dependency Injection frameworks are worth looking into? And what can you say about their complexity and speed. ...
I'm using Castle Windsor to do some dependency injection, specifically I've abstracted the DAL layer to interfaces that are now being loaded by DI. Once the project is developed & deployed all the .bin files will be in the same location, but for while I'm developing in Visual Studio, the only ways I can see of getting the dependency inj...
I am designing a new system and I want to know IoC and more important when to use it. Does it have to be implemented with interfaces or can be done with classes? Thanks ...
I absolutely need to use an IoC container for decoupling dependencies in an ever increasingly complex system of enterprise services. The issue I am facing is one related to configuration (a.k.a. registration). We currently have 4 different environments -- development to production and in between. These environments have numerous confi...
After attending a recent Alt.NET group on IoC I got to thinking about the tools available and how they might work. StructureMap in particular uses both attributes and bootstrapper concepts to map requests for IThing to ConcreteThing. Attributes automatically throw up flags for me that either reflection or IL injection is going on. Doe...
Does anyone have any good suggestions around IoC/DI frameworks? I'm looking into them a bit, but since IoC is new to me I'm looking for pointers on what to check out first. ...
I know how to tell Castle Windsor to resolve a reference from a factory's method using XML, but can I do it programmatically via the Container.AddComponent() interface? If not is there any other way to do it from code? EDIT: There seems to be some confusion so let me clarify, I am looking for a way to do the following in code: <facil...
Background: At my company we are developing a bunch applications that are using the same core dll's. These dll's are using Spring.net's IoC-container to wire things up (auto-wiring). All applications are using the same spring configuration file, and this configuration file points to many classes in many different dll's. But not all appli...
I'm asking this question because it's a good way to gauge how the community at large feels about the various containers/frameworks and why. Also, whilst my expertise may lie in .Net development, I am very interested in which frameworks are popular (and why) in other languages. If I feel the need to start digging into Java for instance, t...
I miss dependency injection more than all the raindrops in the ocean. ...
I've got a solution with several different projects in it, some are pure class libraries and some are web app projects. If I want my default types to be available to all projects, where should I put the config file for the container? ...
I have an object that implements IDisposable that is registered with the Windsor Container and I would like to dispose of it so it's Dispose method is called and next time Resolve is called it fetches a new instance. Does container.Release(obj); automatically call Dispose() immediately? Or do I need to do obj.Dispose(); container....
In the Windsor IOC container is it possible to register a type that I've already got an instance for, instead of having the container create it? ...
From what I've read about Windsor/Microkernel it is in theory possible to do everything that you can do using xml files with code. As a matter of fact - and please correct me if I'm wrong - it seems like the major contribution of the Windsor layer is to add xml configuration for things Microkernel can already do. However, I have been ...
Which is the best IoC among StructureMap and Ninject? This should be merged with: Best injections frameworks ...
Can someone explain to me the advantages of using an IOC container over simply hardcoding the default implementation into a default constructor? In other words, what is wrong about this code? public class MyClass { private IMyInterface _myInterface; public MyClass() { _myInterface = new DefaultMyInterface(); } ...
I have been using IoC for a little while now and I am curious if I should use Microsoft's Unity framework (official name "Unity Application Block"). Does anyone have experience using it? So for I have been copying my IoC container code from project to project, but I think it would be better to using something standard. I think IoC can...
What problems does MEF (Managed Extensibility Framework) solves that cannot be solved by existing IoC/DI containers? ...