About Askemos · design notes · documentation · news · download · On CD · thanks · forum · support
FAQOutputTree · XSQL
AskemosServer · NEWS · RelatedProjects

PHP

PHP an interpreted language, which is quite popular for web applications.

It's basically a procedural language. One of the tripple P (Php, Perl, Python) choice of the lamp basic web service setup. To give php users a feeling, here a side by side comparison of the php and Askemos way. We select from a data base table and format as an html description list:

php Askemos
<?
$link=mysql_connect("localhost",
                    "user", "pass");
$query = "use test";
if(!mysql_query($query, $link") {
    die("no data base");
}
?>
This initialization part does not exist in Askemos applications. Instead there is a line in the XSQL connection administration file.
<dl>
<?
$query = "select Topic, Description from db";
$result = mysql_query($query, $link);
while($row=mysql_fetch_array($result)) {
  echo "\n<dt>".$row["Topic"]."</dt><dd>".
       $row["Description"]."</dd>");
}
mysql_free_result($result);
?>
</dl>
<xsql:query connection="demo"
     row-element="" rowset-element="dl">
select Topic dt, Description, dd from db
</xsql:query>

No matter why one might choose PHP as a web script language -- but as a computer language it's a rather poor design, really. One word of warning: some of it's flaws let it appear to be it a rather poor choice security wise.

:Q: Whats the difference between {PHP, Perl, most other languages} and Askemos' XSLT / NameSpaceDSSSL for web scripting?

:A: In most languages the resulting document is constructed charachter by character from quoted strings of the programming language. This incures a lot of quoting and can produce invalid output. In contrast in Askemos, the result is created as a document tree from components of the input tree and syntax tree of the running programm. This safes typing, ungly code and ensures at least well formed results.

See also selforum (german).

Note: There is a phptools kit under development, which will eventually allow to convert PHP to Scheme (and with a little help of a to be developed rewritng engine equivalent DSSSL code).





border
last modification: Sun, 18 Feb 2007 17:46:01 +0100
authors: jfw,
document identifier: A849640f672ed0df0958abc0712110f3c
delivered to public at Mon, 08 Sep 2008 03:07:15 +0200
short comments


rss

pdf :: context view

search



02 Aug 2008SystemRequirements
02 Aug 2008PCRE
23 Jul 2008ProjectsOnThePlate
23 Jul 2008ModuleStructure05
17 Jun 2008StorageAdaptor
17 Jun 2008NEWS
17 Jun 2008HTML
17 Jun 2008ACM
22 Mai 2008HTTP
22 Mai 2008BOSH
10 Mai 2008AskemosBibliograph
10 Mai 2008JerrysDreamAbstrac
09 Mai 2008ProgrammingLanguag
20 Apr 2008XSLT
11 Mar 2008CodingStyle
10 Mar 2008
09 Mar 2008MIMEConverter
BSD
07 Mar 2008XML
06 Mar 2008SRFI
01 Mar 2008RFC4810
01 Mar 2008RFC4998
01 Mar 2008KondratieffWerk
04 Jan 2008service-level
04 Jan 2008NameSpaceDSSSLinde
24 Jun 2004KommunikationsInfr
BOINC






Add


About Askemos · design notes · documentation · news · download · On CD · thanks · forum · support
Web Design by Schwill Dresden