Scott Hanselman

Hanselminutes Podcast 217 - MVC Turbine and IoC made easy with Javier Lozano

June 11, 2010 Comment on this post [6] Posted in ASP.NET | ASP.NET MVC | IOC | Podcast
Sponsored By

headshot My two-hundred-and-seventeenth podcast is up. Scott talks to Javier Lozano about his open source MVC Turbine project and how it makes Dependency Injection and inversion of control extremely easy. These concepts can be tricky to jump into and usually require custom code in your app. MVC Turbine makes it easy to get up and running in minutes with ASP.NET MVC and IoC.

(Ya, I know, I'm late to post this.)

Subscribe: Subscribe to Hanselminutes Subscribe to my Podcast in iTunes

Download: MP3 Full Show

Links from the Show

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

I want to add a big thanks to Telerik. Without their support, there wouldn't be a Hanselminutes. I hope they, and you, know that. Someone's gotta pay the bandwidth. Thanks also to Carl Franklin for all his support over these last 4 years!

Telerik is our sponsor for this show.

Building quality software is never easy. It requires skills and imagination. We cannot promise to improve your skills, but when it comes to User Interface and developer tools, we can provide the building blocks to take your application a step closer to your imagination. Explore the leading UI suites for ASP.NET AJAX,MVC,Silverlight,Windows Formsand WPF. Enjoy developer tools like .NET reporting, ORM,Automated Testing Tools, TFS, and Content Management Solution. And now you can increase your productivity with JustCode, Telerik’s new productivity tool for code analysis and refactoring. Visit www.telerik.com.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes fromTravis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

Enjoy. Who knows what'll happen in the next show?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
June 17, 2010 6:08
Ninject is best. No ugly xml.
:-)
June 17, 2010 21:00
While listening to the podcast I couldn't help but keep thinking MEF. MEF does this same composition driven IOC/DI but it is much more mature, feature rich, and included in the framework 4.0. I guess it just needs a shim to plug into MVC like Turbine.
June 21, 2010 0:37
@josh,

For v3 of Turbine, we're planning on moving the auto-registration pieces and other runtime internals to be resolved by MEF. The way MEF resolves types is through the application of attributes on the types that need to be registered (import) and resolved (export). This means that you as a developer, you will need to apply these attributes to all your types that you want the container to manage for you.

What the Turbine core team is thinking is to have best of both worlds: have MEF manage the runtime of Turbine (something we control) and let the developer's preferred IoC to manage the application types (something we can't control). There are ways to bridge the two pieces together so in the case MEF needs a type, it can query the underlying container for it.

Thanks for the comment and feedback!
June 23, 2010 0:34
Josh,

MEF is only about a year old, maybe a year and a half. How can it be more mature than StructureMap, Ninject, AutoFac, or even Unity?
June 23, 2010 2:21
Hi Josh

MEF and traditional IoC containers are not exactly the same. In terms of feature richness, I would say that IoC containers on the whole offer many more features. One of the great things about the OSS community is the speed at which it can iterate as it operates under far less constraints. As .NET framework authors we are far more cautious about what we put in the box, we opt for less not more as once we put something in, we can never take it out unless folks in very high places approve it ;-)

The thing that differentiates MEF is not the number of features, it is the specific type of features that are targetted around building open and extensible systems, and which are unique to MEF. That is its sweet spot. If you are building those types of systems, I can confidently say I believe that MEF is your best choice.

Comparing with traditional IoCs, there is definitely overlap of some of MEF's feature. However that does not necessarily make it a slam dunk to use it for all of your IoC needs. I've summarized some key differences related to IoC in this post: http://blogs.msdn.com/b/gblock/archive/2009/08/16/should-i-use-mef-for-my-general-ioc-needs.aspx. Hammett also has a post detailing some fundamental differences here: http://blogs.msdn.com/b/hammett/archive/2010/05/29/mef-what-and-why.aspx

Maturity means it has stood the test of time. I agree with the rest of the sentiments. MEF is the new player to the block. Windsor and StructureMap for example have been out there for about 8 years, MEF V1 shipped a few months ago, that is hardly what one would consider mature :-)

Now that being said, MEF is definitely robust and stable. Visual Studio and several other products have been building on us for two years. Compounding that with the level of rigorous stress and functional testiing we do should give confidence in using MEF.

Cheers
Glenn
August 30, 2010 4:59
This is a great post, I'm always intriguing by newly developing open source software. What User Experience changes do you expect from the open source MVC turbine project?

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.