views:

192

answers:

1

I'm developing a line-of-business application using WPF, possibly multitargeting SL as well. One of the requirements is that UIs be composed based on user roles/rights. For example, if the user is a salesperson, she shouldn't see any of the accounting components. If the user is an accounting clerk, that user will see some accounting components and a subset of sales components. If the user is an accounting dept manager, she will see all accounting modules, and a larger subset of sales modules, and so on.

I know that the Composite Application Library supports module-loading and UI composition (obviously), but I want to be sure that it has the flexibility to support this feature before I invest a big chunk of time in spiking it.

I'm not asking whether role-based UI composition is "baked-in" to the library (I assume that it isn't), but only whether it is a good fit for this model -- that I can intercept or configure the module loading and UI composition logic without any severe code contortions.

Thank you.

+1  A: 

The Composite Application Guidance actually is a very good option for this. By being able to easily assign content to regions, you can swap out your content by roles in a very flexible manner.

I personally think combining Prism with MEF makes this type of situation easier, though, since MEF allows for easier dynamic extensibility for roles.

I'd recommend listening to Glenn Block's chats on Prism, Unity, and MEF.

Reed Copsey
Yes, MEF. I have yet to delve into it. Can you give me a brief synopsis of what it brings to the table (well, I guess you already did)... how about a one-line synopsis of *what MEF is*. I'm afraid I don't even know what it is for. (I will listen to that podcast? to which you linked, but--ironically--I can't do it here at work.)
Jay
One liner: "MEF is a library that makes it very easy to dynamically add content to your application, 'extending' it at runtime". It's basically a very clean way to make an extensible application (it's how the VS2010 extensibility works, for example)
Reed Copsey