ProfK
ProfK

Reputation: 51063

Is there merit in using a Composition Model for MEF in an MVVM application?

At the moment I'm doing it in a global, singleton ApplicationModel, but I feel that model should be thinner, and a more cohesive set of tasks and properties concerning composition could be relocated, on their own, to a new 'CompositionModel' class. Each of the vertical imported modules has their own MVVM stack and are basically self sustaining, with very little dependency on the core, or shell, application.

Upvotes: 2

Views: 45

Answers (1)

Mark Feldman
Mark Feldman

Reputation: 16119

Works for me! I'm currently using it in an application where the client needs to be able to configure services by simply dropping plugins into the relevant folders, haven't run into any major issues so far. As far as your resource dictionaries go you may want to look at the answers to this question, paying particular attention to the build settings...you will need to call InitializeComponent() to get the resources to merge correctly.

Upvotes: 1

Related Questions