> I just posted a new article to Servlets.com titled "The Problems
> with JSP" that will be of particular interest to the people on
> this list. From the first paragraph:
I can't believe there's no comment on this (yet)! As usual, you have a lot
of good thoughts there, but it's definitely riskly to speak highly of
Microsoft in a Linux community as it is to suggest the JSPs are
not the end-all in a JSP community <smile>
I've not seen much with the TAGLETs yet, but it seems that JSPs could
support more of the template/macro logic as well. Why did they have to come
up with some verbose and confusing syntax (XML?) for certain common things
like loops and displaying the contents of a variable? It could have been
kept simpler (even the older LOOP and DISPLAY from 0.92 spec were less
confusing), but I think programmers and XML-wannabes got hold of the spec.
In your examples of iteration, wouldn't you write it something like this
than using the embedded println()s?:
<%
Enumeration e = list.elements();
while (e.hasMoreElements()) {
%>
The next name is <%=((ISP)e.nextElement()).getName()%><br>
<% } %>
And if you passed the ISP back as an array, it would be more like:
<% for ( int i=0; i<isps.length; ++i ) { %>
The next name is <%=isps[i].getName()%><br>
<% } %>
I'll grant none of this meets the simplicity of the webmacro solution,
though as a Java programmer I have no problem with it <smile>.
As for webmacro, how do you get the Javabean objects to be referenced by the
webmacro infrastructure, since part of the "nice-ness" of JSP is that it's
integrated with Java and all of the objects and beans that we've written
over the years are also available?
I totally agree on the error messages. I've haven't seen the nasty ones you
showed, but I've had to resort to looking at the JSP source generate to
debug some errors.
The argument about wasted space seems rather old fashioned in the days of
cheap 13GB drives. Memory has been a concern of mine for some time, since
it's a bit much for some rather static pages to be compiled into a class
file that's loaded into memory. I hope my servlet engine knows to unload
them when not needed, but I doubt it. Memory is cheap these days, but it's
not as cheap as disk memory.
Very good comments and I'd love to see the JSP community respond --
including making the JSP specs use some template like programming as well.
There are certainly enough constructs that are commonly used (looping,
displaying, cookies, etc.) that they could be templates rather than
long-winded TAGLETs.
David
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html