Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unity v. MEF
Message
De
21/03/2011 16:06:42
 
 
À
21/03/2011 14:30:51
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Titre:
Divers
Thread ID:
01504400
Message ID:
01504411
Vues:
68
>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/


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform