Tuesday, December 15, 2009 5:18 PM
Kazi Manzur Rashid
MVCTurbine and my response
As mentioned in my last post’s comment, Javier has posted his thoughts. Though I criticized his pet project in three different aspects, but in his response he has only discussed the first two, and skipped the last one completely. Please read his response first before continuing this post.
So, once again what is the correct way of implementing it.
I don’t think the documentation could do any help as I understand the ins and outs of the MVCTurbine codebase. The first thing that I think needs to be corrected as I mentioned in my last post not to come up with a Generic API for the all the IoC container’s service registration and this is one of the things that needs to be decided at the early stage of the development and the rest of the implementation will depend upon it. I am sure the initiators of Common Service Locator did face the same situation and they decided not to handle the registration part which I think was the correct and wise decision.
One of the goal of both MvcTurbine and my new extension is not to clutter your global.asax, instead it should have individual Blade(in MvcTurbine) or BootstrapperTask (which I first introduced in my another pet project KiGG) which would perform individual tasks. But, due to above mentioned limitation of MvcTurbine, you have to use the global.asax when setting up container in real life applications (Check the last example of Javier’s post). This is not a big issue for a tiny mvc application, but if you are developing a relatively large application with multi-module system, it is a show stopper as there is no way the individual module can register its isolated services in the container with the native features of that container.
At the end, due to those limitations of MvcTurbine I came up with my own version. So I would suggest you check both the projects and pick whatever you think suites your need.
[Edit: The intension of this post not to criticized Javier Lozano personally or his technical abilities, I do respect and love to work with him, at the end we are both trying to enrich the asp.net mvc ecosystem]
[Edit2: I got few feedbacks that my tone was bit arrogant and I am extremely sorry for that, I hope now it sounds reasonable.]
Filed under: Asp.net, MVC, ASPNETMVC, ASP.NET MVC, IoC/DI, Unity, Ninject, StructureMap, Autofac, Windsor