Re: Treeviews

From: Richard (riplin_at_Azonic.co.nz)
Date: 02/23/05


Date: 22 Feb 2005 20:08:51 -0800


> Most of the stuff I am doing currently is web based, I'm using ASP
(looking
> at PHP)

It seems to me that the server side web stuff is divided into two
groups. On one side there is ASP, PHP, JSP. On the other side there
is Java srvlets, CGI, Perl and other scripts.

The first group is 'code in page': the html web pages incorporate
server side code that executes to extract data base stuff. The second
group is 'page in code': the program runs and builds the data then
writes out the html for the web page.

In many cases both of these approaches mingle the program code and the
html in ways that make then inseparable. I hate that.

> It would be pointless without OO and components.

Ah, now here is the crux of the matter. When using ASP or JSP etc the
code is buried in the web page and this means that it may need to be
duplicated if the same result is required in a different page. The
'solution' is to extract the code and make it into a component so that
it can be accessed from two or more pages.

Leastways this is how JSP solves the problem, though I think that JSP
is just a means for Java to have a 'me too' workalike for ASP and
wouldn't otherwise be used at all.

It still seems to me to be a backwards solution to a problem that
shouldn't exist in the first place.

ASP, JSP and PHP (and mod-Perl if you prefer that) are 'web page
writers' languages. The users want to design the pages and then fixup
the issue of 'how do I get the data in here'. OTOH Servlets, Perl and
so on tend to be 'programmers' languages where they extract the data
and then kludge up something to get the html out to the user.

I use templating (I may have mentioned this). To me that fits into the
middle between ASP/JSP and the usual scripting/Perl/servlets approach
(though Perl does have templating). While it runs as a typical script
it completely separates the presentation from the code. This has some
advantages. For example if you wnat that table of invoices in a usable
format then just get the program to use a different template that
outputs csv instead of html.

> and Javascript.

Javascript is client side, though it is just built into the html page
just as ASP/JSP/PHP is.



Relevant Pages