aspose file tools*
The moose likes Java in General and the fly likes Container or Framework to launch classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Container or Framework to launch classes" Watch "Container or Framework to launch classes" New topic
Author

Container or Framework to launch classes

Sean Riley
Greenhorn

Joined: Jun 08, 2004
Posts: 11
I am looking for a framework like application, which I can plug in selected classes to. These classes will have different jobs.

E.g. MyMainApp will run all the time (controlling the plug-ins??). Plug-in A, B or C or a combination of the three can be configured to start up with MyMainApp.

All my searching has turned up nothing yet, I fear it is because I am not using the correct terminology. Please could some-one help me with the correct words to use in my search.

Many Thanks
Sean


Of all the things I've lost in my life it's my mind I miss the most.
Sean Riley
Greenhorn

Joined: Jun 08, 2004
Posts: 11
As it always happens while I was gathering my thoughts about how to post this request, I came up with more terms to use in my search.

I have stumbled upon Java Plugin Framework. I will continue down this road for a while.

Has any-one any experience with this framework? Are there any others like it?

Many Thanks
Sean
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Depending on the type of application, you might consider using the Eclipse platform (www.eclipse.org) which is designed for doing this kind of thing in a desktop app, or an "application server" (Tomcat, JBoss, etc.) Servlets and EJBs are really just another way to look at plug-ins.


[Jess in Action][AskingGoodQuestions]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
For me the breakthrough to plugins was the "Dependency Inversion Principle". It means that the engine is calling the plugins, but the compile-time dependency is inverted - the plugins must reference the engine to compile.

So the engine package might have the Engine class and the IPlugin interface. You can compile this, bundle it up in a jar and sell it on EBay.

You build the plugin package later. Maybe folks who bought your jar on EBay build their own plugins to work with your Engine, kind of like people write plugins for Eclipse. Plugin packages have classes that implement the Plugin interface.

We glue them together with configuration and some form "Dependency Injection". The Engine winds up with code like:

The factory can return new plugins that the Engine authors never heard of. The factory might say

Does that sound fun? If so, Google for more good stuff on Dependency Inversion and Dependency Injection.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Container or Framework to launch classes