|
[Current WSSG Projects][XML project home]
The following table briefly summarizes three commonly-used methods for generating dynamic Web pages by embedding programming code into HTML: Microsoft's Active Server Pages (ASP), Sun's Java Server Pages (JSP), and PHP.
These methods are then compared with eXtensible Server Pages (XSP), a method of generating dynamic XML documents (from which Web pages or other output formats can be then generated) by embedding programming code within XML-based structures. XSP is supported by Cocoon and AxKit, which are further described in XML-based Web Publishing Frameworks & Tools
The information in the table below is in draft form. None of the sample code below has been tested and may contain errors. There may be other errors in this document, as well.
Microsoft's Active Server Pages (ASP) |
|
| Summary |
|
| Sample code |
|
| Can separate code from HTML markup? | No? |
| Descriptions & tutorials | Tutorial: Microsoft's Active Server Pages Tutorial |
Sun's JavaServer Pages (JSP) |
|
| Summary |
|
| Sample code |
|
| Can separate code from HTML markup? | No? |
| Descriptions & tutorials | Tutorial: Sun's JavaServer Pages Tutorial |
PHP |
|
| Summary |
|
| Sample code |
|
| Can separate code from HTML markup? |
Yes, via one of two third-party extensions to PHP which permit the use of "template" files:
FastTemplates or PHP Base Library (PHPLIB) "Template" files are HTML documents containing PHP variables in {curly braces}. Separate, associated PHP files contain programming logic (instantiations of a 'template' class), which generate output to dynamically replace these variables. Here's a sample excerpt from a template file:
|
| Descriptions & tutorials | Tutorial: php.net's PHP Tutorial (with links to other, more extensive tutorials) |
eXtensible Server Pages (XSP) |
|
| Summary |
|
| Sample code |
Both of these examples generate the following XML document:
which, in turn, can be further processed by XSLT stylesheet(s) or otherwise to generate HTML or other output formats.
|
| Can separate code from XML markup? |
Yes. In the Cocoon environment, see the second and third options listed under
"3 types of XSP pages" in David Parry's XSP Tutorial.
We haven't seen any comparable documentation for AxKit, but it does support taglibs, so it may support similar methods of separation. |
| Descriptions & tutorials | (See the Cocoon and AxKit Web sites, above.) |
URL:http://seaotter.berkeley.edu/xml/dynpagelangs.html
Last modified on Wednesday, 09-May-2001 15:59:00 PDT