I am going to use it in a project with less-experienced developers so a complex framework such as Spring.NET is not an option. I was thinking about:
Ninject
Castle Windsor
StructureMap
Which would present a moderate learning curve without losing flexibility?
and another question - where is the correct place to put the configuration?...
I was reading an InfoQ article on Composite Oriented Programming earlier on:
http://www.infoq.com/articles/Composite-Programming-Qi4j
I was interested in finding out whether anybody is currently using (or has used) the Qi4j framework at all?
How does it compares to using a traditional dependency injection framework such as Spring for ...
We're using constructor-based dependency injection, AutoMapper and Unity on a codebase.
We have wrapped AutoMapper with a generic interface...
public interface IMapper<TSource, TDestination>
{
TDestination Map(TSource source);
}
And a class that implements this interface...
public class AutomaticMapper<TSource, TDestination> : I...
How to solve the problem of composing a Controller class in PHP, which should be:
easily testable by employing Dependency Injection,
provide shared objects for end programmer
provide a way to load new user libraries
Look down, for controller instantiation with a Dependency injection framework
The problem is, that derived Controll...
I am trying to evaluate Quartz.Net.
I tested it with adding a class which implemented IJob in the executing assembly and it worked.
Now I want to develop an Job Scheduler in which I can add jobs at runtime.
How to proceed.
Edit:
If it seems subjective I have following specific question.
How to add external class/dll which are unkno...
In a follow up to Krzysztof’s statement that Windsor does a lot more than other IoC’s, I wanted to understand how these IoC’s stack up against each other and the benefits/additional facilities that castle Windsor provides.
Are there any comparisons? Can someone help me understand the additional features that Castle Windsor provides ov...
Several people (eg at serverside http://www.theserverside.com/news/thread.tss?thread_id=41473) suggest that using ThreadLocal objects is as bad as using global variables.
I imagine this is true if you make them public static variables.
The problem then is that it can be hard to tell where it is used, where it's changed, etc.
In my sprin...
Does anyone have an example of using LightSpeed with the Repository Pattern using interfaces and dependency injection?
...
I followed Jason Dollinger's MVVM sample from Lab49 to learn the basics of using Unity with an MVVM WPF application. I constructed a simple sample following his basic architecture, using property injection and the Dependency attribute to inject viewmodels into the views. My sample has a main window with a child user control created in ...
Usually when using dependency injection, unit (and other) tests are responsible for creating/mocking dependencies of the system-under-test and injecting them.
However, sometimes the test itself has dependencies, or needs to inject dependencies into the SUT that it can't itself create. For example, when testing classes which interact wit...
I have been using Prism for a while now and enjoy how much easier it is to decouple my modules.
This works especially great for views and view models since you can inject the view models via interfaces and the views via the region manager.
Unfortunately this only works when my views are full blown user controls unless I'm missing somet...
I am looking for suggestions on how to map a single DTO class with a type discriminator to multiple domain classes.
I have my DTO:
public class FooData
{
public Guid Id { get; set; }
public string Name { get; set; }
public string TypeDiscrim { get; set; }
}
public class FooDataRepository
{
public List<FooData> GetAll()...
Hello,
i am using:-
asp.net mvc rc 2
Ninject and ninject asp.net mvc extension (http://github.com/enkari/ninject.web.mvc)
i keep getting the 'No parameterless constructor defined for this object.' for my AccountController. The AccountController is injected with Services. The bindings for these services are defined in the ServiceModu...
I hear people talking about dependency injection and the benefit of it all the time, but I don't really understand it.
I'm wondering if it's a solution to the "I pass database connections as arguments all the time" problem.
I tried reading wikipedia's entry on it, but the example is written in Java so I don't solidly understand the dif...
How is it done?
I have a Model class that is the parent to many sub-classes, and that Model depends on a database connection and a caching mechanism.
Now, this is where it starts getting troublesome: I have no control over how each object gets instantiated or used, but I have control over methods that get used by the sub-classes.
Curr...
I am writing a small utility for myself so whilst I am using Unity currently, I can change to a different IoC container if it will allow me to get around this problem.
I want to create a class that is given some data when it is created, but is immutable after that, normally I would do this with:
class SomeItem
{
public SomeItem(str...
Hello guys,
Thanks for reading.
I'm using Unity framework to implement dependency injection in my app (ASP.Net MVC).
Sometimes there are some cyclic dependencies among services that I want to avoid.
So I'm looking for solutions : )
My case
well lets imagine 3 services ServiceSally, ServiceJoe, ServiceJudy
ServiceSally depends on S...
Suppose you have a class Foo with private member of type Bar. You don't want users to know that Foo's implementation contains a Bar and you don't want users to be able to create their own Bar and pass it through Foo's constructor, any other method, or a configuration file.
Edit: Bar is also problematic in that it accesses resources ...
Hi,
My situation is essentially this: I have a class called Foo which has dependencies A and B, all of which are internal to a library. Instances of Foo will be created by user of the library, and they should not require knowledge of the dependencies.
Internally of course I would like Foo to remain decoupled from the concrete implement...
I have a class with a constructor that looks like this:
public TimedWorker(int timerInterval, Action execute, ILogger logger)
I am using the Castle Windsor fluent configuration and whilst the config below works, I am concerned about the way I am resolving Action. Is there a better way so that I am not always resolving the action deleg...