Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35016
| From | Qu0ll <qu0ll64@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: plugin architecture |
| Date | 2016-07-21 05:10 +1000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <nmoibf$1u04$4@gioia.aioe.org> (permalink) |
| References | <f6628337-f13e-4a4f-8a4c-fa005d7a7747@googlegroups.com> |
On 20/07/2016 16:29, Philipp Kraus wrote: > Hello, > > I'm searching for an indea for a plugin architecture. > I have found PF4J, OOGI and JPF. > > At the moment I would like to use PF4J, but I'm at the moment on the conceptiual phase, so > I don't finished my complete requirements. But at the moment I'm thinking about the plugin structure, > so I think my plugins implements an equal interface. Finally a Jar should contains the plugin. > At the moment I have got a question: Is it a good idea, that one Jar file store multiple plugins or is > it better that one plugin is represent by one Jar file. > > I create a complexe software, so in some cases a multi-plugin approach could be nice, because I can build > "plugin packages". On the other hand, the software architecture can be more cleaner, if I don't allowd multi-plugins. > > Another question is because I'm using Google Guava and there exists a reflection API, so I can iterate over all >classes within a package. IMHO I can use this reflection to load my plugin. Is this a good choice? > A plugin cannot be changed in my case during runtime, so the plugin will put to the classpath / classloader and than > I can iterate overall classes within the plugin package and check if a class implements the plugin interface. > On this I can instantiate the plugin. > With this structure I can build the multi-plugin approach. > > Hope for some comments to get a better idea for my architecture Hi Phil, I realise it may not be exactly what you are after, but have you checked-out Java 9 and the Jigsaw module system? You will eventually have to make your software Java 9 & Jigsaw compatible anyway so maybe it could be a good place to start. Early releases of Java 9 with Jigsaw have been available for some time. Also, I am not even sure that JARs are really the way Java is heading (especially with Jigsaw). Just some things to consider... -- And loving it, -Qu0ll (Rare, not extinct) _________________________________________________ Qu0llSixFour@gmail.com [Replace the "SixFour" with numbers to email me]
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
plugin architecture Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2016-07-19 23:29 -0700
Re: plugin architecture Qu0ll <qu0ll64@gmail.com> - 2016-07-21 05:10 +1000
Re: plugin architecture Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2016-07-21 05:17 -0700
Re: plugin architecture Qu0ll <qu0ll64@gmail.com> - 2016-07-22 06:18 +1000
Re: plugin architecture Arne Vajhøj <arne@vajhoej.dk> - 2016-07-22 23:50 -0400
Re: plugin architecture Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2016-07-25 11:57 -0700
csiph-web