Fri, 21 May 1999 20:11:14 +0200
Ok, moving again on slick ice, i've added a part of PHP in the historie of
the web... I don't know anything about it, so I guess it can be pretty
rubbish. Hope someone on the list is familiar with it and can make
corrections, additions to it...
<SNIP>There is another problem with the scripts solution for a dynamic web.
Each script may do the same thing (respond to users, fetch data, and
generate a web page) in a slightly different way. Each different way makes
a new, different bug, inconsistency or security hole possible. Although
within limits it is nice that people can solve the same problems in
different ways (as each way has its own advantages and disadvantages), if
every script has to re-invent the wheel all over, it is far more work to
write them and debug them, and to make them work together. It also becomes
a problem later, when they need to be maintained.
So, people tried to find other solutions to these common problems, like the
use of separate CGI programs to generate the web page. Most of the time it
were simple CGI wrappers which soon had added features. They are based on
embedding special tags in the HTML file right away. The CGI-wrapper parses
the HTML file and recognizes the special tags with the help of a language
parser. Depending on these tags, commands can be excecuted at server side.
For instance, an embedded SQL query is used to query a database and the
results or embedded in the result HTML file sended back to the user. Such
utilities are called HTML-embedded scripting languages. This approach
results in the use of only one CGI script which is used to parse the
incomming HTML file. And because it was only one CGI script, it can be
integrated in the we sever itself, eliminating the need to start up a
seperate CGI program to generate a web page. However, HTML, SQL queries,
the scripting language, etc all reside in the HTML file, reducing its
readability. It not only reduces the readability but it makes it also very
hard for the different programmers working on the web site. For instance,
the SQL programmer and HTML programmer both have to work on the same HTML
file, with the possibility they can make it difficult for each other.
Getting connection to several databases, etc are still a relative difficult
task. And although we don't need several CGI-scripts, there are still
pretty much HTML-files to manage, which all can have haevy
scripting-languages inside them. So, although it is a good approach it
still has some drawbacks. An example of such a scripting language is PHP,
written by Rasmus Lerdorf, and it is pretty popular.
There is a trend in the development of the web. At first, web sites mainly
published static pages. This can be compared to what magazines do. But
we're dealing with the Internet here, not magazines. Interactivity and
communication are the main things that make the net so powerful and
appealing. After all, computers can do more than glossy paper! Computers
run *applications*, not magazines. So it is natural that people expect that
web sites to be more like applications. A dynamic web sites behaves like
an application; both on the end user side (where users interact with the
site), and on the side of the people who provide the contents for the site
-- and with the Internet often there's an overlap between these two parties.