"Robert A. Crawford" wrote:
> On Mon, May 24, 1999 at 04:14:30PM -0400, David Mossakowski wrote:
> > So to sum up:
> > - why go into template world?
>
> Because templates provide _real_ separation of formatting,
> logic, and content. As I understand JSP, they're the Java "answer"
> to ASP -- a question I never asked, personally. I don't want a system
> that puts HTML and Java into the same file -- I'm trying to get away
> from HTML in Perl, even.
>
I don't see how templates separate logic from presentation better than JSP. If
you don't want to you don't have to put Java into the same file as HTML (you
are actually encouraged not to do that).
>
> Why?
>
> 1) Most of the people I work with aren't programmers. They
> know HTML well enough, and they can learn a good template system
> quickly, but they're not programmers. Letting them worry about the
> layout while I worry about the logic speeds development.
>
If they can learn template language they shouldn't have a problem with
<USEBEAN> or <DISPLAY> tags either. This is true for both.
>
> 2) Mixing formatting and code obscures both. I want the logic
> flow to be as obvious as possible. I want the formatting to be as
> obvious as possible. I'm more than willing to pay a little in
> performance to keep development and maintenance costs down.
>
See above. You don't have to (and shouldn't) do it in JSPs. As for
performance, you don't have to pay for it as much because JSPs compile into
servlets and there is no static data being read during execution.
>
> 3) Formatting changes don't have any risk of impacting logic
> and vice-versa. Orthogonality, I think it's called. :-)
>
True for JSP too.
>
> > - why cook up your own little things to do it?
>
> AFAIK, most people don't. I've never written my own template
> API -- I've used the one in the Apache JServ package, and I've used
> Freemarker. I've heard about a few more, but I think in time most
> people will settle on WebMacro or Freemarker based on personal
> preference.
>
> > - why not JSP?
>
> Because life's short and I'd rather let someone else do
> the formatting while I attend to the meat of the problem. Because
> it's too close to ASP for my comfort, and I still wake up in cold
> sweats over ASP. I don't like mixing code and HTML -- dunno why, but
> I don't.
>
Again, why do you insist on saying that JSP mix code with HTML? You are
_discouraged_ from doing so to develop good Servlet-JSP applications. There is
a fine line between you and the designer. You both are involved in coming up
with the idea for the application. You come up with ideas about how it all
should work, you draw up what the pages do and what the properties beans should
have and you go your separate ways. You go design the logic that fills the
bean up and fire the response to JSP which is designed with knowledge of what
it should do. You get a request fiddle with data, fill up a bean and fire JSP
page.
dave.
--
David Mossakowski [EMAIL PROTECTED]
http://www.dwdog.com/styk 212.310.7275
"I don't sit idly by, I'm planning a big surprise"
F U G A Z I
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html