Re: [WebDNA] WebDNA vs. php war ;-)
This WebDNA talk-list message is from 2010
It keeps the original formatting.
numero = 104824
interpreted = N
texte = Matthew Bohne wrote:> Or, the one that irks me the most...> > if (isnull($_GET['variable'])) {> $newname=$_POST['variable'];> } else {> $newname=$_GET[['variable'];> }> > versus> > [text show=f]varname=[variable][/text]Right. PHP automatically assumes you wantpassed form variables stored in an array.Since WebDNA now uses scoping much more, I guess Iwould change the WebDNA comparison to:[text]varname=[formvariables name=variable&exact=T][value][/formvariables][/text]It's not as small, but it is an example of better code since othervariable types of the same name can override *form* variables.Also, you don't have to use the "show=f" param since thatis the default.Regarding PHP arrays, wow, what an advantage WebDNAhas there IMO. I don't know the syntax off-hand exactly,but you have to open up a 'for each' loop for a specifichttp method (along with echo) just to list form vars, where WebDNA can simply use [formvariables][name]=[value][/formvariables]Also in the arrays arena, I am guessing PHP array userswould be astonished by how they could useour [table][/table] context to replace many PHPsolutions that use convoluted PHP arrays.Don't get me wrong, PHP has significant *other* advantages overWebDNA right now, but on specific syntax comparisons, WebDNA isa relief to program with.Donovan-- Donovan BrookeEuca Design Center[Practical-Ethical-Efficient]www.euca.usegg.bzartglass-forum.com
Associated Messages, from the most recent to the oldest:
Matthew Bohne wrote:> Or, the one that irks me the most...> > if (isnull($_GET['variable'])) {> $newname=$_POST['variable'];> } else {> $newname=$_GET[['variable'];> }> > versus> > [text show=f]varname=[variable][/text]Right. PHP automatically assumes you wantpassed form variables stored in an array.Since WebDNA now uses scoping much more, I guess Iwould change the WebDNA comparison to:
[text]varname=[formvariables name=variable&exact=T][value][/formvariables][/text]It's not as small, but it is an example of better code since othervariable types of the same name can override *form* variables.Also, you don't have to use the "show=f" param since thatis the default.Regarding PHP arrays, wow, what an advantage WebDNAhas there IMO. I don't know the syntax off-hand exactly,but you have to open up a 'for each' loop for a specifichttp method (along with echo) just to list form vars, where WebDNA can simply use
[formvariables][name]=[value][/formvariables]Also in the arrays arena, I am guessing PHP array userswould be astonished by how they could useour
[table][/table] context to replace many PHPsolutions that use convoluted PHP arrays.Don't get me wrong, PHP has significant *other* advantages overWebDNA right now, but on specific syntax comparisons, WebDNA isa relief to program with.Donovan-- Donovan BrookeEuca Design Center[Practical-Ethical-Efficient]www.euca.usegg.bzartglass-forum.com
Donovan Brooke
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
The List is Changing (1997)
BBEdit/HTMLcomments/WebCat/[/FONT] (1999)
Trying to append from within a single template file (2005)
WebStar Secure on other machine (1997)
RE: Remote administration (1998)
Look out kiwis! (2003)
PCS Frames (1997)
[WebDNA] Anyone using version 6.2.1 in production on Linux (2013)
RE: Credit card processing - UK (1997)
Re:quit command on NT (1997)
WebCat2b15MacPlugin - showing [math] (1997)
show all problem (1997)
Hiding URL ? (1998)
[WebDNA] Secure Cookies (2020)
nesting limits? (1998)
Problems mit mysql (2004)
Sku numbers (1997)
Major Security Hole IIS NT (1998)
[delete] problem (1997)
[date format] w/in sendmail (1997)