Originally posted by Azriel Abramovich:
Of course, the best idea is to just have a directory where all plugins fall into and thus make the 'users' life easier, but considering performance vs. ease of use I think you've got it.
Yeah - I was thinking about that. I could just have the plugins be packaged in a .jar and you put the .jar into the plugins directory. At startup, I put all of the .jars on the classpath then open each .jar and look for the plugin descriptor that tells me some info (name of plugin, plugin class, etc.). This would make it easy on the user/downloader of the plugin, and shouldn't be too hard to code. I haven't ever really played around with classloaders to dynamically read the plugins dir and put the .jars on the classpath, but it's something new to learn
I'll definitely write the plugin code to be generic enough that I (or others) can use it in other apps. Assuming I can get it to work, I'll probably release as free, open-source code.
Originally posted by Azriel Abramovich:
One other solution is to enable a registration mechanism (through API) for plugins, where when a user adds a plugin he/she registers the plugin. This is the most 'efficient' for you because it takes the load of your shoulders and puts it on the 'users'. But then you don;t have a mechanism like you wanted
I don't see a huge amount of plugins being developed (maybe 5 at the most) so I don't think it's a big deal for me to host them on my site and keep track of them. So, I think a registration mechanism of plugins might be overkill.
Brian
[ January 06, 2004: Message edited by: Brian Pipa ]