Reputation: 347
As part of the team developing a custom application framework that will be given to 3rd party developers, I need to come up with a simple yet complete solution in order to let the developers customize views (A) and the main application layout (B) of our solutions.
For B, we will be using a custom UI composite approach (similar to Prism, but simpler), where the main application layout will be configurable by the 3rd parties.
As for A, we will create UserControls that need to be customized and perhaps completely "overridable" by the 3rd parties.
Proposed solutions:
i) Giving out the XAML code of the main layout file and the the UserControls (A and B). In the case of A, the 3rd party developers will be able to use a default UserControl (located lets say in Views/Default) or to completely override it by creating the same control in Views/Custom.
ii) Giving out the XAML code of the main layout file and the UserControls (A and B) and use IoC (Unity for example) to swap/extend them.
My questions:
Besides, whatever We come up with it should work on WPF, Silverlight and ASP.net, as the framework support those three technologies. By this reuse of technologies, I mean the "publishing" mechanism, not reusing the XAML files among WPF/SL/ASP (makes no sense!)
Thanks,
Upvotes: 3
Views: 1085
Reputation: 60987
That's no small task, and FYI, Prism does largely that. What you're looking at is the holy grail of composite application architectures.
I've done a lot of work on this lately and you can't support every possible scenario without becoming this mindless framework which really does nothing for you but you can design with pluggability as the default.
I really like these sort of application architectures because they often have nice properties such as loosely coupled and therefore testable. And I think that's one of the single most important things to strive for.
The MVVM pattern really lends it self for building view abstraction, using WPF or Silverlight you'd be in a better spot than say ASP.NET (especially if you're considering WebForms).
Anyway, without rambling on about the glory of all this, if done right, using something like MEF to build a extensible framework is quite something. And you should pick an IoC container that's good at plug-in architectures because your 3rd party developers will like that. You give them a tested framework with lots of extensibility points and they customize that in a controlled manner. Best of two worlds.
Upvotes: 2