jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From crazy...@crazybob.org
Subject Re: XSL TagLib
Date Wed, 05 Dec 2001 21:27:15 GMT
My intention was not to be harsh, just truthful. If the existing tag libraries had fit my needs
as a developer, I would have used them rather than write my own.I think that's the spirit
of OS. I apologize if I hit a nerve.

> Remember JSPTL is a common standard - it doesn't attempt to do everything
> for every use case - so some issues such as caching of output or of
> transformers have not been addressed yet, but can be plugged in using other
> tags or beans.

I'm trying to propose a more "standard-esque" api. I consider the target audience to be a
typical JSP developer. I didn't find the JSPTL's api to be intuitive from a JSP developer's

First, the "id" param creator and "name" param accessor (as you see in the useBean tag) seems
to have become a pretty standard convention. Is there a reason that the JSPTL uses this "var"
param? I found it confusing at first.

> > Unlike the JSPTL, my library hides the details of Transformer caching and
> > reuse.
> This can be viewed as a good and bad thing.

This is nothing but a good thing. There is no reason a JSP developer should ever have to worry
about Transformer caching. If you want to plug in a different implementation, you should configure
it in the the web.xml or somewhere else equally appropriate.

> Your Transformer caching could complement the JSTL very nicely indeed. There
> are various ways in which a Transformer could be cached. You've implemented
> one way which is great. There are other ways to do it - e.g. the Controller
> servlet might take care of that.

This logic does not belong in a controller servlet either.

> If you were to wrap up your transformer caching logic into a tag it could be
> reused with the JSTL tags.

Why not just access my factory, specify the stylesheet URL as a param, and not worry about
caching at all? There's no need to cache Transformers in the pageContext, nor pollute other
tags with unnecisary logic.

I had a look at OSCache. OSCache provides a variety of other tools, however the taglib is
comparable. Their tag interface is a little more invloved, but you get the same amount of
functionality. In regard to performance, there's not much you could do to best my implementation.

I do agree that the cache tag would be better served in a separate library.

Thank you,

P.S. I made a small implementation change. I was using Calendar.getInstance().getTime().getTime()
to get the current time. I just replaced it with System.currentTimeMillis() which performs
a lot faster. Not that the change made a real difference, but may as well do it correctly.
You can get the update at http://crazybob.org/xsl.zip.

To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>

View raw message