Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Re: [platform-dev] question about plugin name convention


Hi jml,

Let me start by saying that the problem you are pointing at is real,
we have identified it within Equinox, an Eclipse Technology Project
experimenting with new approaches for Eclipse as a rich client platform (RCP).  
Unfortunately, we don't have a solution. In a perfect world, the best would be that
Apache manages the name space, so packages under org.apache would be available in
plugins named with the same prefix...  This is about managing names but also versions.
So including org.apache.xerces version 4.0.7 would mean the same thing for everybody.
It would be defined by the Apache consortium.

Well, Eclipse acceptance is not yet there... that the world always defines plugins for
their software... :-)

Because plugin names are used to express dependencies (as package imports),
managing the name space of plugins is a real concern. I don't know what the
current recommendation for Eclipse is, if fact, it changed. Originally, the Apache
jars where in a plugin prefixed by org.eclipse... and then was moved to a plugin
prefixed with org.apache---which I personally believe is confusing and could
potentially lead to inextricable errors. As you point out, you are tempting to call
your own plugin org.apache.xerces, but it is unlikely that the contents or the versions
of your plugin and Eclipse-provided one would match.

Of course, the xerces case is disappearing with JDK 1.4, which contains an xml parser.

As far as I can tell, the only safe solution is to prefix such plugins with your own
domain name: com.mycom. It is terrible in the sense that it will conflict with the very
principle of plugin sharing... different products will ship and use the same packages
from different plugins... in other words, xerces will be loaded multiple times...
we are back somehow to the Web Server days where each web applications
would contain its own jar files within its WAR file. This will also prevent
those products to interoperate around XML documents.

For specifications, such as SAXP or DOM, we have better hopes in Equinox through
the OSGi mechanism of importing packages as opposed to requiring plugins. So at least,
the W3C DOM specification would be shared, for example---even if exported by different plugins.
This allows interoperability for plugins depending only on the specifications.

Any solution that I can come up for implementation classes are not too satisfactory
or should I say not too practical in the world we live in. Until Apache manages its own
name space and provides plugins for its libraries, someone has to act as a proxy for
Apache---controlling contents and versions. This is something that is difficult to make happen
in a real world scenario. I am guessing this is why you didn't get an answer so far, just
because the right answer is not clear yet. As I said above, your practical option today is
to use your own prefix... until Eclipse 3.0 comes around, where we are working
hard to provide a better support for specified APIs. Then, if you would
depend only on interfaces (such as SAXP and DOM), your plugins could re-use any
deployed XML parser that would export those specifications....

Stay tuned... :-)
Best regards,

Olivier Gruber, Ph.D.
Persistent & Distributed Object Platforms and Frameworks
IBM TJ Watson Research Center




jml <jml@xxxxxxxx>
Sent by: platform-dev-admin@xxxxxxxxxxx

10/21/2003 09:32 PM
Please respond to platform-dev

       
        To:        platform-dev@xxxxxxxxxxx
        cc:        
        Subject:        [platform-dev] question about plugin name convention



I asked the question on the newsgroup, but got no response, so execuse
me to ask it here again.

Hi,
I have a question about plugin name convention.

In our project, we use many third party libraries, many from apache. And
in eclipse, there is several plugins also contain packages from apache,
such as "org.apache.xerces". This suggested us to also put the third
party libraries into separate plugin, and name them as
"org.apache.commons", "org.apache.axis", etc.

Then come my quesiton: in this way, who is managing the "org.apache"
namespace? And if a lot of people doing the same, they may put totally
different files in the same named plugin, and I believe a lot of trouble.

Or I name the plugin as "com.mycom.apache.commons", but that make me
feel terible, also I would believe common lib as apache will be used by
a lot of people.

Is there any convention in how to handle this?

Thanks

jml


_______________________________________________
platform-dev mailing list
platform-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-dev


Back to the top