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.
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.
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.
3) Formatting changes don't have any risk of impacting logic
and vice-versa. Orthogonality, I think it's called. :-)
> - 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.
I can point to a place where templates have been successfully
deployed. The project manager really liked the solution, even though
the templates used were the (relatively) primitive CGI::FastTemplate
style for Perl. Check out http://www.crisco.com -- all of the CGIs
in the recipe and meal planner section are using templates.
Since the site was deployed, we've made a few changes. We've
run into a few problems related to the organization of the
FastTemplate templates, but those can be fixed by adopting a good
directory standard. The Java template packages I've used wouldn't
have those problems.
The client is happy -- we've been awarded a nice amount to
continue developing the site this year -- and the site's users seem
to like it.
I have deployed Apache JServ-style templates in an intranet.
They've also been successful from a development and maintenance
standpoint.
Use what you want -- neither solution (templates or JSP) is
perfect. My situation makes templates more attractive; other situations
may make JSP more attractive.
[I'm not speaking for either my employer or client, of
course.]
--
Robert Crawford [EMAIL PROTECTED]
http://www.iac.net/~crawford
___________________________________________________________________________
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