Jeremias, On Tue, Feb 07, 2006 at 10:09:38AM +0100, Jeremias Maerki wrote: > As part of my upcoming optimization work I want to finalize the FOP API. > I've written down a proposal in the Wiki: > http://wiki.apache.org/xmlgraphics-fop/ApiDesign > > If possible, I'd like to have that finished by the end of the week. > Please post your feedback ASAP.
Some remarks and questions. 1. D11, D12: FopEnvironment should be FopFactory? 2. How does FOUserAgent differ from FopFactory? What is rendering run dependent in FOUserAgent, now and in the future? 3. Is FopFactory's main role being a factory, or being a configuration holding object across rendering runs? I am not charmed by the name FopFactory; it does not seem to describe its role, only a side effect of its role, viz. spawning rendering runs. 4. You write about XML configuration. Can the configuration on a fop factory also be set using an Avalon Configuration object? 5. Do I understand correctly that the main alternatives to start a rendering run are: A. Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF); B. FOUserAgent userAgent = fopFactory.newFOUserAgent(); userAgent.setTitle("My document"); Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent); The difference being that in method B one can set properties that are specific to this rendering run? 6. D5 (The FOUserAgent can return the FopFactory instance. (needed internally by FOP)): Why? Because FOUserAgent is the programmed way to get at configuration settings? Could it be better to implement get methods on the user agent which get the settings from the factory object (factory object not exposed)? Or even pass the factory object instead of the user agent (Cf. question 2)? 7. What is the difference between these to instantiation methods: FOUserAgent userAgent = fopFactory.newFOUserAgent(); (D6) FOUserAgent userAgent = new FOUserAgent(fopFactory); (D3) Regards, Simon -- Simon Pepping home page: http://www.leverkruid.nl