Andy Bailey wrote:
> Just because JSP has some of its roots in ASP does not mean that JSP is a
> bad thing. It means the ASP designers can leverage their familiarity
> with the structure of ASP files over to JSP. JSP 1.0 certainly is a big
> improvement on ASP and ASP has, at its heart, a terribly flawed language
> which JSP's do not.
>
> JSP was an attempt to provide the power of servlets to web developers in an
> already familiar format. Eminently sensible as it means no one who is
> familiar with ASP and Java need learn something new.
I should have ordered my points differently: This point becomes more powerful (for me
at least) after making the point that the basic ASP principle -- embedding code in an
HTML page -- makes (IMHO) for a poor architecture. In fact, I think it encourages it.
Assuming that this is a valid opinion (obviously I do) it follows that I think that
people at Sun made a *marketing* decision to push JSP. Yes, JSP if far superior to
ASP; but it still allows the mangling of HTML with code.
> > 2) The whole point of a template system is to allow the clear seperation
> of business logic and presentation. JSP allows to two to be coupled tightly.
> In fact, I would say (from the lazy programmer point-of-view) the JSP
> encourages the tight coupling.
>
> Any system that does not enforce loosely coupled design and implementationn
> will have this problem.
> This is a problem to do with the designer/programmer and not the system.
>
> JSP's do make it very easy to decouple business logic and presentation, as
> do ASP's when used correctly.
>
> JSP's have JavaBeans and ASP's can use COM, precisely as was intended.
Completely correct. The exact same argument can be applied to pointers, memory
management, multiple inheritance and many other aspects of modern software
development. The interesting point is that Java *forces* developers to do things
differently by removing these issues from the language/environment.
The important point is "when used correctly"... I have found that many technologies
are not used "correctly", either through ignorance, laziness or incompetence. I have
seen plenty of really bad Java code, and loads of bad C++. I'm forced to do the "wrong
thing", far more often than I like, simply due to real world resource constraints.
> > 3) When I look at template systems, I want to be able to use templates for
> HTML, DHTML with SSL, perhaps plain text reports, maybe RTF, etc. These
> formats should all be supported (or possible) from a template systems. JSP
> does HTML, period.
(Note: I intended to say DHTML with CSS, not SSL, above. Sorry for the confusion.)
> No JSP can do more than just HTML
I have not had much luck. I've gotten strange results tinkering with CSS, and I
haven't gotten text-based JSP pages to work. Could be I'm missing something.
> Do you have any readily available, easy to convert to, systems that do
> better than either ASP or JSP?
Well, there WebMacro and FreeMarker. ;^)
I have developed a private template engine that supports different formats of
templates. In fact, I trying to add support for binary templates (like a Word doc, for
example, or a EPS or PDF file) to that now (though that is proving tricky). I've
written the whole thing to be able to swap out parsers, tag evaluators, etc.,
dynamically. It is still buggy and slow and I don't own parts of it, so I'm not
prepared to release it.
In conclusion: I feel *very* strongly about separation of logic and presentation. I
work on a team with about 8 programmers and 20 HTML/graphics people. Look-and-feel
change on a daily basis, and I can't be involved with each time someone needs to
change the color of a cell or the number of rows in a table. I would go crazy if my
templates weren't simple, clean and easily supported by normal HTML people.
- Paul Philion
___________________________________________________________________________
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