cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: Configuration System
Date Mon, 20 Mar 2000 19:54:56 GMT wrote:
> Regarding developing the Configuration system for the Images in fop so that
> any library(Jimi,JAI,xxxx) could be plugged in. I have following thoughts
> It seems to me that the switchable components(libraries) Cocoon uses is
> parsers. All these parsers are based on well defined interfaces defined by
> neutral bodies. SO these parsers have a well defined api to access, thus
> being a good candidate for being switchable. While in case of image handling
> libraries we intend to use are totally disparate. Now I don't know if we
> should go ahead and define few interfaces for image handling. Then design
> wrappers based on these interfaces for the respective libraries or stick to
> one library. Although config system would be great choice for specifying
> parser and xsl formatter used by fop.
> Tell me what you guys think?

The Cocoon2 component system (modeled after Avalon) is based on the
assumption that all components implement the same interface and, for
this reason, can be polymorphically see as the exaxt same component
without requiring any other change in the tool that uses the component.

This is true with any plugin system, but java is simply great at doing
all this for you (while you can easily see how painful this is on other
native systems, for example apache or XFree 4.0)

Anyway, you are right: if you don't have the same interface the system
doesn't work so either

 - find a common API set that it's implemented by all of the components
 - write your own interface and write "adapter/decorator" classes that
wrap around the libraries you want to use and make them look all the
same to the component user.

Cocoon1 did that for all XML parser, XSLT processor and XML formatter.

Cocoon2 will try to use JAXP-next (so SAX2 + DOM2 + TRaX) to avoid the
use to define our own decorating interfaces... but we still have a way
to go to see those API collections stabilize.

So, at the end, yes without a common API set, you can't use polymorphism
and you can't do what cocoon does. Period.

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<>                             Friedrich Nietzsche
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------

View raw message