Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #35104

Re: plugin architecture

From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: plugin architecture
Date 2016-07-22 23:50 -0400
Organization Aioe.org NNTP Server
Message-ID <nmuphi$92v$1@gioia.aioe.org> (permalink)
References <f6628337-f13e-4a4f-8a4c-fa005d7a7747@googlegroups.com>

Show all headers | View raw


On 7/20/2016 2:29 AM, Philipp Kraus wrote:
> I'm searching for an indea for a plugin architecture. I have found
> PF4J, OOGI and JPF.

What about using what is in Java SE aka ServiceLoader (see
http://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html).

Or do what a lot of people are doing: just use Spring to load
the plugin.

Or do you really need some advanced features with versioning,
dependencies, unload etc.?

>            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.

One plugin per jar.

> 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?

Direct reflection is probably too much a reinventing the wheel
framework.

Arne

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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