How to make the program can accept plugins to extend its functionalities?

W

www

Hi,

Eclipse can be added more functionalities by adding specific plugins. I
am amazed with such an idea.

We are developing a Java program. Customers always request new
functionalities, after they got the program and used it. I am wondering
if we can make our program like Eclipse. So we can develop many plugins
so that customers can install the plugin if they want such a feature.
Different customers may need different features, so they can pick what
they want.

Is there any tutorial about how to make this kind of Java program? I
have never written a plugin yet. I don't know how to make the main
program to take a plugin.

Thank you.
 
T

Thomas Fritsch

www said:
Eclipse can be added more functionalities by adding specific plugins. I
am amazed with such an idea.

We are developing a Java program. Customers always request new
functionalities, after they got the program and used it. I am wondering
if we can make our program like Eclipse. So we can develop many plugins
so that customers can install the plugin if they want such a feature.
Different customers may need different features, so they can pick what
they want.

Is there any tutorial about how to make this kind of Java program? I
have never written a plugin yet. I don't know how to make the main
program to take a plugin.
Java itself offers a simple, yet powerful plugin technique. It is
described in
<http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service Provider>
<http://www.javangelist.de/space/Plugin> (in german language)

However, eclipse uses a more complicated technique for their plugins
(involving XML files).
 
A

Ashoka!

Java itself offers a simple, yet powerful plugin technique. It is
described in
<http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service Provider>
<http://www.javangelist.de/space/Plugin> (in german language)

However, eclipse uses a more complicated technique for their plugins
(involving XML files).

-----------------------------------------
On a more conceptual note to make plug in development possible we use
design patterns such as the "factory pattern" and the "composite
pattern" look these up on wikipedia for details.

The basic idea is instead instead of hard coding anything you get it
at run time from external source.
e.g. If your program has a menu bar on the top you will create a
MenuBar factory class that reads the items that go in this bar from a
configuration file or some other permenant store. And in your event
handling code instead of making a big "if ...else if " clause you will
make generic call to a "Composite Menu Class." This class will already
have loaded event handlers for each item at start up and will call the
corect handler.

I hope this helps some what
regards
Usman Ismail
 
C

Christian

www said:
Hi,

Eclipse can be added more functionalities by adding specific plugins. I
am amazed with such an idea.

We are developing a Java program. Customers always request new
functionalities, after they got the program and used it. I am wondering
if we can make our program like Eclipse. So we can develop many plugins
so that customers can install the plugin if they want such a feature.
Different customers may need different features, so they can pick what
they want.

Is there any tutorial about how to make this kind of Java program? I
have never written a plugin yet. I don't know how to make the main
program to take a plugin.

Thank you.

I would recommend you the book eclipse Rich Client Platform from Erich
Gama..

its about rcp and gives a good explanation of using eclipse's plugin
Framework.

If you just want to have a look at how plugins work you could also
search for a project called "Java Plugin Framework" its probably
buggy.. but they ripped the plugin framework out of eclipse and put it
in a project..

main adavantage of it is that they have a tutorial for doing plugins ...
and if you want to go back to rcp later, its all the same.


Christian
 
R

Roland Pibinger

Eclipse can be added more functionalities by adding specific plugins. I
am amazed with such an idea.
We are developing a Java program. Customers always request new
functionalities, after they got the program and used it. I am wondering
if we can make our program like Eclipse. So we can develop many plugins
so that customers can install the plugin if they want such a feature.
Different customers may need different features, so they can pick what
they want.

Is there any tutorial about how to make this kind of Java program? I
have never written a plugin yet. I don't know how to make the main
program to take a plugin.

See also: http://jpf.sourceforge.net/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top