The best way to show the difference between the two languages is to compare the code required to do the same thing. Even a non-techie can see what's going on in the WebDNA example.
numero = 37[listfiles path=./][showif [isfile]=T][if ("[fileName]" ^ ".png")|("[filename]" ^ ".swf")][then][grep search=\..*&replace=][filename][/grep]<br>[/then][/if][/showif][/listfiles]as opposed to unintuitive PHP code:
<?phpfunctionstrip_ext($name){$ext=strrchr($name,'.'); if($ext!==false){ $name=substr($name,0,-strlen($ext)); }return $name; } function removeHyphen($filename) { $target = $filename; $patterns[0] = '/-/'; $patterns[1] = '/_/'; $replacements[0] = ' '; $replacements[1] = ' '; $filename = preg_replace($patterns, $replacements, $target); return $filename; } function capFirstWord($word) { $cap = $word; $cap = explode(' ', $cap); foreach($cap as $key => $value) { $cap[$key] = ucfirst($cap[$key]); } $word = implode(' ', $cap); return $word; } function formatFile($name) { $name = strip_ext($name); $name = removeHyphen($name); $name = capFirstWord($name); return $name; } $mydir = dir('./'); $extension_blacklist = array("gif", "js", "css"); $filter = array("config.php", "printpage.php"); while (($file = $mydir->read()) !== false) { $file_info = pathinfo($file); if ($file != "." && $file != ".." && !in_array($file, $filter) && !in_array($file_info['extension'], $extension_blacklist)) if(!is_dir($file)) { echo "<li><a href='./$file'>".formatFile($file)."</a></li>"; } } $mydir->close(); ?>Here another PHP vs. WebDNA example. Do you want a directory file listing, with files and only files, showing png and swf files only, hiding other files and hiding file extension? There's a simple beauty in typing:
[listfiles path=./][showif [isfile]=T]
[if ("[fileName]" ^ ".png")|("[filename]" ^ ".swf")]
[then]
[grep search=\..*&replace=][filename][/grep]<br>
[/then]
[/if][/showif][/listfiles]
<?php
functionstrip_ext($name){
$ext=strrchr($name,'.');
if($ext!==false){
$name=substr($name,0,-strlen($ext));
}
return $name;
}
function removeHyphen($filename) {
$target = $filename;
$patterns[0] = '/-/';
$patterns[1] = '/_/';
$replacements[0] = ' ';
$replacements[1] = ' ';
$filename = preg_replace($patterns, $replacements, $target);
return $filename;
}
function capFirstWord($word) {
$cap = $word;
$cap = explode(' ', $cap);
foreach($cap as $key => $value) {
$cap[$key] = ucfirst($cap[$key]);
}
$word = implode(' ', $cap);
return $word;
}
function formatFile($name) {
$name = strip_ext($name);
$name = removeHyphen($name);
$name = capFirstWord($name);
return $name;
}
$mydir = dir('./');
$extension_blacklist = array("gif", "js", "css");
$filter = array("config.php", "printpage.php");
while (($file = $mydir->read()) !== false)
{
$file_info = pathinfo($file);
if ($file != "." && $file != ".." && !in_array($file, $filter) && !in_array($file_info['extension'], $extension_blacklist))
if(!is_dir($file))
{
echo "<li><a href='./$file'>".formatFile($file)."</a></li>";
}
}
$mydir->close();
?>
DOWNLOAD WEBDNA NOW!
WebDNA Hosting Companies...
More than just websitesWebDNA is a great all-purpose language for adding dynamic elements to websites...
Large companies using WebDNALarge companies have been using WebDNA for years: speed and robustness as well as scalability have been some of the most attractive strengths of this language...
WebDNA database access and the future of SQLWebDNA databases vs SQL databases...
WebDNA needs to be thought of as the Web Application Hacker's preferred weaponOnline object orientation is anecdotal...
SupportThe support team and an experienced base of programmers is always available to you...
I think it's really important to point out how a RAM-centric data engine is far more powerful and appropriate than all of the disk-centric database programs on the market...
WebDNA vs. PHPThe best way to show the difference between the two languages is to compare the code required to do the same thing...