On Mon, 10 Jun 2002, Jayson Falkner wrote:

> Overall your opinion seems to be the JSTL tags would just be easier
> and accomplish the same thing. I tend to think they are not easier at
> all, just a different approach.  Do you think it is wise to promote
> the use of these tags to new users? Especially when it may result in a
> JSTL skillset compared to a sound understanding of what most people
> consider the best method of developing JSP/Servlet Web Applications.

In general, JSTL requires that users know less, making its use easier.  
For instance, users of JSTL tags don't need to understand the lifecycle
considerations associated with a JDBC Connection, Statement, or ResultSet;
if the applications performs sufficiently well without finer-grained
management of such resources, then development is easier with no loss in
quality of the code.

>  > * for any simple application, when its clear that it will not go
>  >   through major extensions; using just JSP pages with action elements
>  >   is probaly very cost-efficive in this case (lower development time).
> 
> Probably? Is it quicker for you or any projects you have helped on?

I can certainly say, from my own experience and anecdotal evidence, that
prototyped pages (and small applications) can be faster to develop in JSP
than in JSP + Java.

>  > As Shawn, I also see the URL actions as a perfect fit with the View
>  > in MVC, no matter if you use servlets or not. XML processing can
> 
> About the URL components. The import action seems nice, but not really 
> practical. Is there a good case where it would be desired to directly 
> import external content in to a web app?

Sure - consider importing a header from another web application.  Would
you really want Java code to do this, instead of a single <c:import>
action element?

> If the content needs to be further manipulated it makes sense Java
> would be desired to properly do it, so importing some XML, perhaps
> from a Web Service, is something that would much better be done by a
> Java class.

For importing data from a web service, I tend to agree that more
abstraction is useful; James Strachan and others like the idea of using
XPath to parse responses from web-services, but I'm not fully convinced of
the utility of that approach.  However, displaying data from an XML
document that's retrieved from a database or URL is reasonably within the
realm of the presentation tier.  What's the advantage of using Java,
versus JSTL, to loop over all <customer> elements of a document and print
the value of their <orderNumber> children?

> Do you think the url tag is more helpful then a custom anchor-like tag? 
> e.g. <a href="<c:url/>">link text</a> versus
>   <c:a url="http://...";>link text</a>
> The custom anchor-like tag syntax is cleaner, and it would be easy to 
> code any URL rewriting logic in to the custom tags setter method.

But this then ties JSTL to HTML in particular (something we've
consistently avoided doing), and it also requires a separate JSTL tag for
each HTML element that might contain a URL -- including, at least, <a>,
<img>, <iframe>, <frame>, <form>, and <link>.  Worse, every potential HTML
4.0 attribute would need to be replicated by the JSTL tag; I believe <img>
has about two dozen attributes, for instance.  Furthermore, this wouldn't
help when sending a URL as part of a block of scripting code (e.g.,
JavaScript).

> What is a good use for the redirect tag?

Forwarding to a resource that's not in the web application (and is thus
beyond the reach of <jsp:forward>).

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com
(coming in July 2002 from Manning Publications)


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to