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.
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.