Thanks to Jason for kicking off another interesting discussion.

First to say I agree wholeheartedly with the view expressed to the effect
that
a) designers should be kept a very long way away from code of any form
b) JSP as an ASP substitute for those not strong enough to go cold turkey is
reason enough for it to exist.

However the fact that 'template engines' replace JSP with a perl style
script makes me shudder too. The answer I came up with to this problem would
also correspond to a 'view' in the MVC model. I created what I called an
HtmlManager class and a resource bundle to go with it. The strategy works by
storing every last bit of html and text in the resource bundle where it can
be modified with no more than a server restart if so desired. My html
manager reads this at start up, though if it grew too large I might consider
breaking it up into several bundles. Then the servlet programmer can write
methods like addLink or addTable supplying only the dynamic arguments.

The result is a full html page in typically no more than a dozen lines of
servlet code. And the methods in html manager are now fairly stable, though
obviously I can write others if I ever need them. Internationalisationis
fully supported through the use of a resource bundle for text as well as for
html.

Anything the designer has to add can be provided as images (change the file
location in the resource bundle) or html mock-ups to be coded by the servlet
writer.

The M and C parts of the model are handled seperately but integrate smoothly
because the page is already written in servlet code.

regards, tim

----- Original Message -----
From: Jason Hunter <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 26, 2000 3:26 AM
Subject: New article: "The Problems with JSP"


>
>
> Hello everyone,
>
> 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:
>
>   By now almost everyone using servlets has heard about JavaServer
>   Pages (JSP), a Sun-invented technology built on top of servlets.
>   Sun has done a marvelous job promoting JSP as a way to get HTML out
>   of servlet code, speeding web application development and improving
>   web page maintenance. In fact, the official "Application Programming
>   Model" document published by Sun has gone so far as to say, "JSP
>   technology should be viewed as the norm while the use of servlets
>   will most likely be the exception." (Section 1.9, December 15, 1999,
>   Draft Release)  This paper evaluates whether that claim is valid --
>   by comparing JSP to another technology built on servlets:
>   template engines.
>
> The article is available at:
>
>   http://www.servlets.com/soapbox/problems-jsp.html
>
> -jh-
>
> --
> Jason Hunter
> [EMAIL PROTECTED]
> Book:    http://www.servlets.com/book
> 2.0 to 2.1: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.html
> 2.1 to 2.2: http://www.javaworld.com/jw-10-1999/jw-10-servletapi.html
>
>
___________________________________________________________________________
> 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

___________________________________________________________________________
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

Reply via email to