Solutions for fine-grained extensibility in RCP applications? [message #783412] |
Wed, 25 January 2012 17:10 |
William Saar Messages: 16 Registered: July 2009 |
Junior Member |
|
|
What's the best way to provide detailed customization support in a shared RCP-application base without littering all the base plugins with extension points for everything, or forcing the customization code to maintain copies of large chunks of code that are mostly copies of the base?
Our demands for customer-specific behavior are plentiful, hard to anticipate, and highly important to the customers, but also often quite small. Customizations may include: special default selections in certain combo boxes on SWT/JFace master-details form pages, addition or removal of individual elements in layouts, special treatment of certain values in the sorting of tables or other data structures etc.
I have come up with the following 4 approaches to the problem, but I am curious how others are dealing with the balance of granularity and maintainability when it comes to providing extensibility?
1) Provide extension points for every small customization request - makes the customizations well-defined, but litters the base product code with extension points for every detail and demands a lot of code and XML for small changes.
2) Provide few extension points for major chunks, such as a whole form page, and force the customization plugin to implement the whole chunk as it sees fit - most of the customization chunk will be a duplicate of shared base and a lot of the maintainability will be lost.
3) Maintain copies of the customized base plugins - similar maintainability problems as in solution 2 but plugin-versioning and code repository compares may actually make it easier to identify and migrate customized behavior.
4) Use OSGi framework hooks to inject customized classes into the plugins' class loaders to override behaviors - probably the least code to maintain for each customization, but difficult in patch management, and a nightmare for debugging and plugin-versioning.
MediaOrgan - media organizer for your local computer and the web using Eclipse RCP/RAP - http://mediaorgan.com
|
|
|
|
Re: Solutions for fine-grained extensibility in RCP applications? [message #794375 is a reply to message #786727] |
Thu, 09 February 2012 08:02 |
William Saar Messages: 16 Registered: July 2009 |
Junior Member |
|
|
Thanks for the reply. Yes, configuration is another interesting an option, but one needs to watch that they don't become too many so they basically replace the Java files and declare the whole GUI/app.
There's also the maintenance issue when work is done one the base plugins, but one can alleviate that by declaring the parameters in extension point interfaces as methods, so one gets compilation errors in the extensions when migrating to newer base plugin versions.
MediaOrgan - media organizer for your local computer and the web using Eclipse RCP/RAP - http://mediaorgan.com
|
|
|
Powered by
FUDForum. Page generated in 0.03003 seconds