Inversion of Control Support

Feb 14, 2014 at 8:32 PM
Does the CODE framework support any form of dependency injection ?

In other words, is it possible to use an inversion of control container along with the controllers just like ASP.NET MVC.

Thank you
Coordinator
Feb 17, 2014 at 1:14 PM
You can use the same IoC techniques as in other WPF apps or in ASP.NET MVC. CODE Framework itself doesn't introduce any new IoC tech, since plenty of good IoC containers are already available, but you can certainly use those with CODE Framework.


Markus
Marked as answer by abnajjar on 2/21/2014 at 5:37 AM
Feb 17, 2014 at 2:06 PM
MarkusEgger wrote:
You can use the same IoC techniques as in other WPF apps or in ASP.NET MVC. CODE Framework itself doesn't introduce any new IoC tech, since plenty of good IoC containers are already available, but you can certainly use those with CODE Framework.


Markus
Thanks for the respone,

Can you elaborate more on that ?

In other words, is there any extension points provided by the framework to allow hooking IoC containers.

I would love if you can give an example of how you would inject a controller with a given dependency.

Sorry if I am asking for too much, but I really liked the framework and I won't to go serious with building apps using it.

Thank you Markus,
Regards
Coordinator
Feb 19, 2014 at 3:38 PM
Unfortunately, I don't have an example that is ready to go. But I have put it on our list of things to write about (which admittedly is lengthy at this point).

Generally speaking, CODE Framework WPF controllers tend to be very simple and the models tend to be more complex (when compared to ASP.NET MVC), so perhaps the biggest area people use dependency injection with in our framework is in the view-models.

Anyway: I'll see if we can put something together, but I can't promise a timeframe.


Markus
Feb 20, 2014 at 2:36 PM
MarkusEgger wrote:
Unfortunately, I don't have an example that is ready to go. But I have put it on our list of things to write about (which admittedly is lengthy at this point).

Generally speaking, CODE Framework WPF controllers tend to be very simple and the models tend to be more complex (when compared to ASP.NET MVC), so perhaps the biggest area people use dependency injection with in our framework is in the view-models.

Anyway: I'll see if we can put something together, but I can't promise a timeframe.


Markus
OK Markus, Thank you for the great effort.

Regards