[ZDP] History Second review
Howard Clinton Shaw III
Sat, 22 May 1999 08:11:22 -0500
On Sat, 22 May 1999, Tom Deprez wrote:
> Second revision: ASP and PHP.!
> 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...
I'm using some earlier listmembers technique of <> based edits.
> <SNIP>There is another problem with the scripts <script-based> solution for a dynamic web<site>.
> Each script may do the same thing<perform the same task> (respond to users, fetch data, and
> generate a web page) in a slightly different way. Each different way<method> makes
> <*a*> new, different bug<s>, inconsistenc<ies> or security hole<s> possible. Although
> within limits it is nice that<useful for> people can<to be able to> solve the same problem<*s*> in
> different ways (as each way<technique> has its own advantages and disadvantages), if
> every<each> 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,<Many> people <have> tried to find other solutions to these common problems. One of
> these approaches <One common approach> is the use
> of a CGI wrapper, with an appropriat<e> scripting language. Based on embedding
> special tags in the HTML file right away
> which the CGI-wrapper in his turn parsed.
<One common approach is the use of server-side includes, where an application, usually
running within or closely linked to (ASIDE: is 'in-process' too complex a term for this level discussion?)
the webserver, which parses HTML files (usually marked with a different name, such as sql.php3) and
executes scripting code contained in special tags, removing the code as it works, and replacing it with
the code's output, finally passing on to the webserver a normal HTML file. For instance, code may be
embedded in the HTML file to execute an SQL query and place a nicely formatted table of results in the
final HTML. The browser which finally receives the parsed file has no indication that the file was other
than normal HTML, other than a possibly unusual filename. Systems based on server-side includes
are often abbreviated SSI. Since the separate application which parses the server-side includes is
generally the same no matter which file is being processed, it can be started once, and connected
to the webserver as a long-running process, with a single process parsing an unlimited number of
SSI files. This saves considerable time by eliminating the startup overhead associated with CGI applets.
The primary disadvantage to this approach is that the code and the HTML are inextricably linked. This
generally requires that both the HTML and code be generated by the same person or persons, and usually
prevents the use of sophisticated web-authoring tools intended for HTML. They can also be difficult to maintain,
since it is often difficult to determine where HTML leaves off, and code begins, especially since much of the
HTML is dynamically generated to begin with. One popular example of such a program is PHP3, written
by Rasmus Lerdorf, which was specially designed for the purpose.> SORRY: Guess I got a bit carried away there.
I was trying to make small edits... I guess it just got a bit out of hand. Oh well.
The special tags are recognised
> and 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 mostly 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 web 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 different programmers working on the web site. 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. An example of such a scripting language is PHP, written by
> Rasmus Lerdorf, and it is pretty popular.
> Another of these approaches is using a web server with build in objects and
> a scripting language. This totally removes the use of a CGI-script but on
> the other hand, you're depended on the web server itself. Other web servers
> don't understand the scripting language in the HTLM file. Like the previous
> approach, HTML and scripting language are mixed which each other. As example
> you can look at the .ASP files of the IIS Server.
> So, although these approaches reduce some of the problems, they are still
> not perfect.
> 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.
> : _______________________________________________
> : ZDP maillist - ZDP@zope.org
> : http://www.zope.org/mailman/listinfo/zdp
> ZDP maillist - ZDP@zope.org
Howard Clinton Shaw III - Grum
St. Thomas High School