Re: JAXG snapshot available (was: Re: API discussion (revived))

2005-08-25 Thread Simon Pepping
Jeremias,

It is a good package. I have a few remarks.

1. At some point I wanted it to be possible to set input and output
   types on the Factory. In that way it would be possible to write a
   factory implementation which knows about several of the processing
   engines, and depending on the input and output types (and some user
   configuration, at the discretion of the factory implementation)
   could choose the best engine, e.g. JFOR for fo to rtf, FOP head for
   fo to all other, Batik for SVG to other.

   But that would introduce input type dependence into the
   code. Currently the following code:

   XGProcessorFactory factory = XGProcessorFactory.newInstance();
   XGProcessor processor = factory.newXGProcessor();
   Source src = new StreamSource(new File(args[0]));
   XGResult res = new StreamXGResult(application/pdf, new File(args[1]));
   processor.process(src, res);

   together with the appropriate value of the system property can be
   used to process both FO and SVG, with the engine of choice by the
   invoker.

2. I am a bit suprised that you use a specific factory implementation
   in your examples, and not the engine agnostic newInstance
   method. This is counter to the goal of engine agnostic code.

   This made me think that perhaps another goal is more important:
   This is a framework that allows one to access each engine through
   the same interface. It does so by writing adapters between the
   defined interface and the engines.

   Viewed this way, the reference implementation is not just that. It
   is the essential part of your package, viz. the set of adapters.

3. The interface is not limited to XML Graphics applications. It is
   suitable for any engine that exposes a SAXResult interface, or can
   be made to expose such an interface by an adapter.

I hope these thoughts make sense.

Regards, Simon

On Mon, Aug 22, 2005 at 12:23:45PM +0200, Jeremias Maerki wrote:
 I've cleaned up JAXG and published it on my website:
 
 http://www.jeremias-maerki.ch/dev/jaxg/
 
 Comments are welcome.
 
 Jeremias Maerki
 

-- 
Simon Pepping
home page: http://www.leverkruid.nl



JAXG snapshot available (was: Re: API discussion (revived))

2005-08-22 Thread Jeremias Maerki
I've cleaned up JAXG and published it on my website:

http://www.jeremias-maerki.ch/dev/jaxg/

Comments are welcome.

Jeremias Maerki