Jason,
I'm very interested in Model 2 and feel it's the "right way" to integrate
these technologies and also removes most of your arguments against JSP. I
think Model 1 is wrong for the reasons you state, but that's not a "JSP
problem", it's a misuse of JSP depending on the circumstances or application
of course. Can you say when your second edition will be out?
Bill Hines
Hershey Foods
-----Original Message-----
From: Jason Hunter [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 26, 2000 5:49 AM
To: [EMAIL PROTECTED]
Subject: Re: New article: "The Problems with JSP"
[EMAIL PROTECTED] wrote:
> To me, a template engines syntax means learning
> a lot more than JSP syntax.
I think it depends on your starting point. I'm comfortable using JSP
too, because I understand what's going on underneath. I'd rather not
have to think about that though.
> Sure, you can mistype the <%! with <%, but if
> you learn JSP, you'll know when to use one or the other.
However, I feel the "graphics artist" that's targetted by JSP won't
understand the difference.
> Uh..what about this:
>
> <%
> Enumeration e = list.elements();
> while( e.hasMoreElements())
> {
> %>
> The next name is <%= ((ISP)e.nextElement()).getName() %><br>
> <%
> }
> %>
>
> Seems easy enough to me
Easy enough for Java programmers. I'm OK with JSP being "a cheap way
to write servlets". I've used it that way myself. However, when you
get non-Java programmers into the mix people should be aware that there
are other options that might work better for them.
> Is a template engine going to be part of the J2EE
> specification?
No, nor does it need to be. Not everything needs to be in a
specification. Not everyone has to do everything the same way.
If your servlet uses a template engine, just include the engine
classes along with your app and it'll work everywhere.
> alot of application servers will be supporting J2EE.
All engines support template engines, without any changes to the
server. No vendor-specific JSP bugs. :-)
> How exactly is a template engine used anyways?
Whoa, you haven't used template engines. Perhaps you can go try it,
use both on a real site, then decide if you still prefer JSP.
That's what I did.
> Is it a plugin to app servers, web servers, etc? I assume it would
> be a servlet perhaps that parses the data sent to it returning back
> a response? If thats the case, then I can see it added to a servlet
> engine where an extension of say .wm (webmacro) is mapped to the
> servlet engine, and thus passed on to the right
> servlet to parse it.
Template engines are just classes like
com.oreilly.servlet.MultipartResponse that help you generate content.
You can have them serve .wm files if you like, such as when you're
doing includes.
> In all honesty, I cant imagine why you, who wrote a book on
> servlets, wouldnt use the JSP (or promote it) over something as
> (to me) arcane as a template engine. Seems that JSP would fit right
> along well with servlets, since its an extension to it.
JSP 0.90 I liked. It was an easy way to write servlets. Now JSP has
been targetted at the non-programmer and I don't believe it can succeed
well in that market, at least not without a great dependence on tools.
Maybe that'll be its ultimate savior.
> I was looking forward to a new book with more info on JSP from you.
> I guess thats not going to happen..is it? :)
In the second edition I'm demonstrating how to do "Model 2" using JSP.
That's arguably the best technique for JSP and belongs more in the
servlet book than the JSP book because it's servlet-centric.
-jh-
===========================================================================
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
===========================================================================
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