[Uml-devel] u2 plugins architecture
ansutton at kent.edu
Mon Mar 10 06:38:07 UTC 2003
i'm not entirely certain how to proceed building the plugin architecture. it's
not really difficult, but it's not precisely easy either. here's the basic
to put simply, u2 needs an event driven plugin system that allows semi-dynamic
configuration of on-demand plugin loading. what does that mean. i don't know.
actually, it means that when a particular even happens, we load a plugin.
when that plugin is loaded, it has the option of loading other plugins.
here's an example event for the application (umbrellorc?)
Load Plugins= libu2_mof-1.4 libu2_xmi
here's another example that defines some functionality for creating new
UML = libu2_uml-1.4 libu2_uml-viz
CWM = libu2_cwm-1.0 libu2_cwm-viz
MOF = libu2_model-viz
this isn't really an event system, but it's still configuration. When the menu
is created, this information could be used to create the popup under Menu |
New. When a metamodel is selected, the listed plugins are loaded.
additionally, each plugin can have its own configuration file that defines
similar properties. for example, libuml-vizrc (the vizualization library for
UML - it does all the gui work).
Load Plugins = libu2_uml-patterns libu2_uml-metrics libu2_uml-layout
then there'd probably some other configuration information regarding
capabilities or something like that.
as for implementation, i'm torn between using KParts::Plugin and just KLibrary
for this stuff. I have a suspicion that we'll probably need to be using
KLibrary for the simple fact that it doesn't have anything tied to it. KParts
seems to assume certain aspects of the application that might not be
appropriate for our architecture. i'm not 100% on this - carsten, would you
care to comment here? i'd love a good pros/cons on using KParts - i haven't
been able to find one. i'd also like to write as little code as possible ;) -
i'm already generating close to .5 million.
More information about the umbrello-devel