xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Pepping <spepp...@leverkruid.nl>
Subject Re: [VOTE] Finalized API - Merge Temp_API_Finalization branch back into Trunk
Date Tue, 21 Mar 2006 20:13:16 GMT
On Tue, Mar 21, 2006 at 03:23:26PM +0100, Jeremias Maerki wrote:
> We need to finish the API discussion once and for all, especially since
> we need to get another release out of the door soon. I'm happy with the
> API as described in [1] and implemented in the Temp_API_Finalization
> branch, except for one item handled separately below. Thanks to Simon
> for cleaning up the branch and rewriting the examples.
> 1. I'd like to propose merging back the Temp_API_Finalization branch
> back into Trunk.
> +1 from me (I can do the actual merge)

+1 from me
> 2. This is somewhat detached from point 1 above, so I put it in a second
> item. Jess Holle asked in [2][3] to leave the existing Fop constructors
> intact. ATM, only one is deprecated. In D8 in [1], I proposed to
> deprecate all Fop constructors.
> I thought some more about this and I'm for drawing a clean line. So:
> +1 from me for deprecating all Fop constructors, even if it means that
> some people have to adjust their code. After all, we're still on
> beta-level and have clearly indicated that the API isn't stable, yet.
> Removing the reflection code from Jess' example, it looks like this:
>     Fop fop = new Fop("application/pdf");
>     fop.setOutputStream(out);
>     DefaultHandler defaultHandler = fop.getDefaultHandler();
> With the revised API, this will need to be changed to this:
>     Fop fop = FopFactory.newInstance().newFop("application/pdf", out);
>     DefaultHandler defaultHandler = fop.getDefaultHandler();
> Simon's deprecating setOutputStream() gives me the impression that he'd
> be in favor of that, too, but obviously I can't speak for him. But it
> points in the same direction.

I deprecated setOutputStream() because I am in favour of a style in
which first all required objects are created, FopFactory, (optionally)
FOUserAgent and OutputStream (if required by the output type), and
then a consistent Fop object is created. To stress the latter, I
created the defaulthandler in the Fop constructor, so that
inconsistency between output type and presence or absence of output
stream can be signalled immediately.

I am not against the Fop constructors as they are now (except for the
deprecated one), provided they throw an exception if FOUserAgent is
null. I left the deprecated constructors of FOUserAgent in the code
because I wanted this change. That all said, I am not against
deprecation of all Fop constructors either. Both ways are fine with
me. That gives a neutral vote from me on this point.

0 from me.


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

View raw message