Hi all,
I am following a variety of discussions about using
servlets vs JSP vs Template Engines. But there is a combination that seems
nobody have mentioned, and I am wondering why.
Why don't use servlets or JSP pages to create
request processing and simple javascript files with only variable declarations,
and use static HTML files for the rest?
Of course, for this to be a good design style, we
need our designers to know javascript. And of course, this is not always
true.
I don't pretend to say it is a perfect solution for
all situations. But wherever we have the appropriate people, it seems to me
that it can be a very productive combination. Let me expose an
example:
We need to create a products list page, in which we
have to present a description (with a link) and a price for each
product.
The first step would be to specify our javascript
file content. We can define it with an example. In this case, it could be
something like:
Including such a javascript file in a static HTML
page, the page have information enough to render itself (of course, through
javascript).
Create a servlet/JSP that produces a file like the
one above is a trivial work.
The major advantage comes when the designer have to
create the HTML page. We can provide a full set of static javascript files like
the one above. This way, the designer can forget about the developers. It can
test the pages even without the need of a web server. It can do all his job in
his local filesystem.
The disadvantage of this methodology is the need of
a designer with javascript knowledge. But the javascript needed to access to the
values that come from our servlet is very easy; roll-overs and layer animations
are more complicated than this. The designer does not need to be a javascript
guru.
Nowadays, only a small group of internet users
deactivates javascript in their browsers. Javascript is so used in DHTML pages
that there is no point in deactivating it.
The advantages, when the condition of "designer
expertice available" is true, are evident (at least to me :-):
I understand that more than a few projects can
benefit from this approach. Have anyone experimented something similar
before?
Thanks,
-- GRIDSYSTEMS Rodrigo Ruiz Aguayo Parc Bit - Son Espanyol Ingeniero II 07120 Palma de Mallorca [EMAIL PROTECTED] Baleares - España Tel:+34-971435085 www.gridsystems.com Fax:+34-971435082 |
- Re: Servlets and Javascript Rodrigo Ruiz
- Re: Servlets and Javascript JM
- Re: Servlets and Javascript Robert Naczinski
- Guestbook, discussion panel with jsp / servle... Robert Naczinski
- Re: Servlets and Javascript Galbreath, Mark
- Re: Servlets and Javascript Rodrigo Ruiz Aguayo
- Re: Servlets and Javascript Galbreath, Mark
- Re: Servlets and Javascript Pavel Veselý
- Re: Servlets and Javascript Adrian Janssen