Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unity v. MEF
Message
From
22/03/2011 05:21:17
 
 
To
21/03/2011 16:06:42
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Title:
Miscellaneous
Thread ID:
01504400
Message ID:
01504470
Views:
56
>>Hi,
>>
>>Anyone worked with both of these?
>>I've used Unity but not MEF.
>>I'm sort of attracted to the MEF attribute based approach but would be interested to hear of anyone's discovered or perceived 'pros and cons'
>>Ta,
>>(posted this under WPF because I'm primarily looking at this from an MVVM perspective)
>>Viv
>
>I am exactly working through this issue right now. I am a fan of Karl Shifflett and after he said such nice things about Unity I opted for that in my first implementation of prism. Prism 4.0 gives you the option of MEF or Unity ( or any other container model. ) I know MEF is what is used for VS Extensions, so that is attractive as well. ( There is stuff about this in Pluralisight training on extending VS 2010 in code )
>
>As I was trying to wire up my MVVM view models, I stumbled across Cinch, Sasha Barber is my new hero.
>
>http://www.codeproject.com/KB/WPF/CinchV2AndPRISM4.aspx
>
>This made a lot of stuff make more sense to me - and he has switched from Unity in Cinch v1 to MEF in Cinch v2 ( WPF and SL ) I am starting to see how the various frameworks and pieces/parts out there fit togther and this link made that clearer than anything.
>
>I want Prisms regions and modules and other goodies and Devforce's extension of the entity Framework, but there is still something missing and this MVVM framework seems to fill in the missing piece. And kudos to him for explaining for us mortals just how they go together.
>
>BTW there is a goodie in Cinch V1 ( both versions, samples and lots of other goodies are all part of one zip in the download ) that is a view model generator. Haven't quite figured it out yet but only because I have not carefully gone through the very extensive documentation of *everything* he's done on codeproject and codeplex.
>
>http://www.codeproject.com/KB/WPF/CinchCodeGen.aspx
>
>http://www.codeproject.com/KB/WPF/CinchV2_1.aspx
>
>I'm starting to make a list of folks that actually seem to understand this stuff and it is a pretty impressive group of people. ( I realize he is a countryman of yours and you may know him - if so, give him my admiration and promise to buy dinner on either side of pond )
>
>As I understand it, it was Marlon Grech who made the switch to MEF attractive ( to the extent Barber build dependency of this goody into Cinch v2 )
>
>http://mefedmvvm.codeplex.com/
>
>Just sharing what I've run across in the last 24 hours - most still undigested.
>
>Hope you'll share whatever you discover.
>
>Right now it's Devforce ( EF ) - Prism - Cinch (MVVM) - WPF/Expression Blend
>
>Starting my first project with that setup - feels like setting out to cross the ocean in a boat while I'm building it and learning how to sail and realizing I can't swim
>
>Speaking of MVVM :
>
>http://karlshifflett.wordpress.com/2010/11/07/in-the-box-ndash-mvvm-training/
>
>and speaking of Karl ( for lurkers : I recommend both of these highly )
>
>http://karlshifflett.wordpress.com/xaml-power-toys/
>http://www.molosoft.com/

Thanks Charles. Several links there I hadn't come across. I want to take a closer look at Cinch - but probably just to steal ideas rather than use it 'as is'. I was working with Prism 2 about a year or more ago so Unity was the obvious choice then. Just picked up Prism 4 and, given that I've probably forgotten 50% of what I knew about Unity, MEF seems certainly worth exploring. I'll let you know how I get on.....
Previous
Reply
Map
View

Click here to load this message in the networking platform