Askemos 2000 (Archive)
home · features · download · archive
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 Sat, 04 Feb 2012 18:33:45 +0100
short comments


rss

pdf :: context view

search



24 Apr 2004 DefineInsecureMode
12 Dez 2010 FreeBSD
07 Dez 2010 BALLFeatures
05 Dez 2010 ByzantineAgreement
04 Dez 2010 SQLITE
03 Dez 2010 SRS
12 Okt 2010 WebDAV
12 Sep 2010 SQL
16 Jun 2010 BALL
16 Jun 2010 CouchDB
16 Jun 2010 AskemosServer
07 Mai 2010 SystemRequirements
30 Mar 2010 ProjectsOnThePlate
30 Mar 2010 AskemosResources
30 Mar 2010 RSchemeInstall
30 Mar 2010 INSTALL
30 Mar 2010 ChickenScheme
debug-access.scm
27 Nov 2009 subscriber
development
12 Jul 2009 test
01 Jul 2009 TrustCenter
27 Dez 2008 JKomG
26 Dez 2008 FanOut
26 Dez 2008 MIME
NetBSD
NOTE
02 Mai 2006 AskemosTopMenu
18 Nov 2008 StorageAdaptor
18 Nov 2008 PStoreStorageAdapt
18 Nov 2008 OperationTips
15 Nov 2008 PCRE
04 Nov 2008 ProgrammingLanguag
09 Sep 2008 RelatedProjects
23 Jul 2008 ModuleStructure05
17 Jun 2008 NEWS
17 Jun 2008 HTML
17 Jun 2008 ACM
22 Mai 2008 HTTP
22 Mai 2008 BOSH
10 Mai 2008 AskemosBibliograph
10 Mai 2008 JerrysDreamAbstrac
20 Apr 2008 XSLT
11 Mar 2008 CodingStyle
10 Mar 2008
09 Mar 2008 MIMEConverter
BSD
07 Mar 2008 XML
06 Mar 2008 SRFI
01 Mar 2008 RFC4810
01 Mar 2008 RFC4998






Add


home · features · download · archive