designing plugin architecture
hi everybody
I guess this is not a java-specific question, but this is the best forum I know ;-)
recently I posted a topic asking for nice plugin frameworks to include into my projects, and I decided to go with JPF... also because I haven't found any other option =P
shortly I'll begin a medium-sized personal project (my first attempt) in which I'll use this framework, allowing my application to be extended with plugins, and I want to create it with a "perfect" design... it's like training all that good programming techniques and all... for someone like me, a programmer with some coding time, but little/no contact to nicely designed applications, it's a nice challenge! =P
then I was wondering about how a basic plugin architecture design should look like and how it should behave, and I couldn't find some docs or guides on that.
I was thinking of something like this:
- interface-based extension points for the plugins that will be used to extend my application (pretty obvious)
- plugins being invoked by these interfaces, working only over internal and parameter data (i.e.: no access to main application classes)
- all the communications from the plugins to the main application should be done using observable-observer pattern
- the plugins should have "no chance" of holding "important" objects of the main application (like controls, GUI components, data descriptors...) - if something like this is "unavoidable" (like a plugin used to reformat a text document), use a copy of the object or part of it (sounds like a step towards performance problems)
this is a sketch of what's coming to my mind... can you guys help me to polish/correct it?
many thanks!

