jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott "M." Stirling <sstirl...@mediaone.net>
Subject Re: What (or for whom) are JSP tags?
Date Wed, 10 Jan 2001 00:43:31 GMT
On 09 Jan 2001 08:21:20 -0600, Glenn Nielsen wrote:
> "Scott M. Stirling" wrote:
> > While I'm at that, and since I've taken a look at some of the other tag
> > libs (for example , the JSP implicit object tag libs) I'm noticing a
> > trend that's a little unsettling, but maybe it's just me.
> > 
> Is the JSP implicit object a Jakarta taglib?  If so, which one is it in?

I was referring to the application, page, request, etc. taglibs, which
are essentially wrappers for calls that could as well be made on the JSP
implicit objects directly.

> > Basically what I think I'm seeing are tags that are little more than
> > wrappers for Java method calls.  I am wondering how these are going to
> > appear to a JSP coder, who is going to be boggled by tags that require
> > him to know Java objects and concepts.
> > 
> If the tag set and its features are well documented, it should be fine.
> And if the docs don't assume any knowledge of Java.

After HTML-ifying the doc for the JNDI taglib, I think it safe to say
there's no way a non-Java programmer would have a clue about how to use
it.  There's no significant abstraction.  I don't mean to attack the
JNDI taglib, since it's not really much different from  several others.
One that is really well done, I think, is the BSF taglib.

But here's the basic design pattern I'm seeing:

1. Take a Java class or interface with methods
2.  Write a tag or taglib that corresponds directly with that
class/interface, and provide multiple tags and attributes for
instantiating the class and calling its methods.
3. Add an iterator tag for any collection returned from the class'
methods or constructor.

That's it.  But these are tags for Java programmers.  They're
engineer-centric, instead of user-centric.

I'll agree that a JSP written in tags could look nicer than one written
in scriptlets.  But I think that JSPs are nasty looking with a ton of
tags that are necessitated by the fact that each one encapsulates hardly
any functionality.  The more useful functionality you can encapsulate in
a tag, the more you remove the tag user from having to know how it works
or what it technically does on the back end.  I work for Allaire, so of
course I'm thinking of the oodles of CFML tags that ColdFusion has, and
the hundreds of tags people have written -- that people sell, even.

> I am looking at this from the perspective of how JSP is being deployed
> where I work.  In my case, we are like a web hosting service.
> We host several hundred web sites and over 800 people can publish
> content.  We want to push out to them the ability to do 'dynamic content'
> using JSP.  For many of them, learning Java programming concepts would
> be too high a barrier for them to use the technology.  Plus from our
> side it would be a great deal easier to support well documented tag
> sets than java code embedded in scriptlets.  If performance becomes
> an issue we can always throw more hardware at it.

Then I am most interested in your perspective, since you are in the
thick of the marketplace/user base toward whom JSP is thrust.  I've
argued this at work with people, when discussing PHP versus JSP (among
other things).  That is, a well-written PHP function is no more
difficult to use than is a well-written CFML or JSP tag.  In PHP, you
have a method call into which you pass a few paramters.  In JSP/CFML
tags, you have a tag with attributes.  I don't see a whole lot of
difference if you them both right.  I also don't see much difference
between <foo:getAttribute name="bar"/> and <% foo.getAttribute("bar")
%>.  Forgetting which is potentially neater in simple examples or better
for tool vendors (which looks at it from the wrong end, IMO), does
either really abstract anything from the user?  Is there a better user
interface in one than the other?  I don't think so.  They look about the
same to me.

Scott Stirling
West Newton, MA

View raw message