Mick Chang wrote:
>
> I kind of disagree that JSP provide a separation of presentation and content
> logic.
You can disagree all you want ;-), but this part JSP does do. As Milt
pointed out earlier, it is not a *total* separation. If not watched,
the pendulum could swing the other way, and instead of the servlet
having embedded HTML, you end up with a JSP page full of control logic
in the form of scriptlets. The best way out is to use beans that
encapsulate the logic, but even then you will have some logic in the JSP
page when you iterate over bean properties, for example. In other words,
the goal should be to move the the "C" part of "MVC" away from the JSP
page as much as possible.
> I hear people talk about it, but I've yet to see a good demo that scales
> with it.
> Most people I've heard from think that a more scalable way to separate
> presentation from content logic is to use XML served up with Servlets.
>
> If you have a good example of how JSP scale with the separation of
> presentation from the content logic, by all means, share it.
>
The very first time the JSP page is compiled into a servlet, as we have
discussed earlier there is a hit (but in a real site, just the act of
testing would take care of that, assuming one does test ;-). But once
the servlet is built and compiled, I don't see why its "scaling" would
be any different from any other servlet. Frankly, I don't see why HTML
vs XML is a "scalability" issue.
Shash
> Gracias,
>
> Mick Chang
>
> -----Original Message-----
> From: Shash Chatterjee [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, January 19, 2000 2:08 PM
> To: [EMAIL PROTECTED]
> Subject: Re: What JSP really offers?
>
> Pere Soler Rubi wrote:
> >
> > Hi to all,
> > We are thinking about designe of a web site. We don't know what
> are
> > the advantages that JSP offers. We have read all the Sun's stuff,
> but
> > we need some in depth information. Our questions are:
> >
>
> I have been playing with JSP lately. The advantage is that it allows
> you
> to separate the mechanics of HTML (or, other display client-side
> presentation technology) from the actual logic and data of the
> servlet.
> That is, you can have the same servlet serving up the data, but
> depending on how the JSP page that uses the servlet is written, the
> presentation can be different. Or, looking at it another way, you
> can
> decide to change the "look" of your pages/site without having to
> change/recompile the server. Yet another way, you can use the same
> servlet in three different places on your website or on three
> different
> sites and have the output look entirely different.
>
> > * Does JSP overload the server ?
>
> That I don't know from experience, but the answer probaly is that it
> depends on how much the JSP page changes, thereby requiring
> regeneration
> of the servlet and a recompilation. On a JSP page that does not
> change,
> there is some extra overhead in reading the page, parsing it and
> determining which servlet to invoke, but it is minimal when compared
> to
> the added overhead of actually compiling the servlet. Overall,
> though,
> this per-page overhead would get multiplied by the number of
> JSP-page
> accesses and so the answer depends on how intensely the website is
> accessed. I run Redhat-6.1/Apache-1.3.9/JServ-1.1b3/GNUJSP-1.0 on a
> PIII/500/128MB box at home that isn't loaded at all (i.e. not
> connected
> to the "net"), and there is an appreciable delay the first time the
> JSP
> page is compiled. You can't really call this "loading", it is a
> "delay"
> (and understandable if you think about what is happening behind the
> scenes).
>
> > * Does JSP overload the client ?
>
> Simply, no. JSP is a server-side technology.
>
> > * Is really useful for small web sites (whith static data)?
>
> Absolutely. JSP and static/dynamic data aren't as much related as
> are
> servlets and the static/dynamic data. In other words, choice should
> be
> whether to use servlets or not dependent on the static/dynamic
> nature of
> the data. If it is really static, then what is the point of using
> servlets in the first place? If the choice is to use servlets, then
> the
> fact that JSPs separate the presentation from the implementation of
> the
> servlet/data is useful.
>
> > * Does anybody know any technical FAQ or mailing list?
> >
> http://java.sun.com/products/jsp/index.html ;-)
> http://java.sun.com/products/jsp/faq.html
>
> > Thank u in advace.
>
> ___________________________________________________________________________
> 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