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 want passed form variables stored in an array. Since WebDNA now uses scoping much more, I guess I would 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 other variable types of the same name can override *form* variables. Also, you don't have to use the "show=f" param since that is the default. Regarding PHP arrays, wow, what an advantage WebDNA has there IMO. I don't know the syntax off-hand exactly, but you have to open up a 'for each' loop for a specific http 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 users would be astonished by how they could use our [table][/table] context to replace many PHP solutions that use convoluted PHP arrays. Don't get me wrong, PHP has significant *other* advantages over WebDNA right now, but on specific syntax comparisons, WebDNA is a relief to program with. Donovan -- Donovan Brooke Euca Design Center [Practical-Ethical-Efficient] www.euca.us egg.bz artglass-forum.com Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] WebDNA vs. php war ;-) (Paul Willis 2010)
  2. Re: [WebDNA] WebDNA vs. php war ;-) (Dan Strong 2010)
  3. Re: [WebDNA] WebDNA vs. php war ;-) (Dan Strong 2010)
  4. Re: [WebDNA] WebDNA vs. php war ;-) (Paul Willis 2010)
  5. Re: [WebDNA] WebDNA vs. php war ;-) (Bob Minor 2010)
  6. Re: [WebDNA] WebDNA vs. php war ;-) (Donovan Brooke 2010)
  7. Re: [WebDNA] WebDNA vs. php war ;-) (Dan Strong 2010)
  8. Re: [WebDNA] WebDNA vs. php war ;-) (Donovan Brooke 2010)
  9. Re: [WebDNA] WebDNA vs. php war ;-) (Matthew Bohne 2010)
  10. Re: [WebDNA] WebDNA vs. php war ;-) (Donovan Brooke 2010)
  11. Re: [WebDNA] WebDNA vs. php war ;-) (Donovan Brooke 2010)
  12. Re: [WebDNA] WebDNA vs. php war ;-) (Matthew Bohne 2010)
  13. Re: [WebDNA] WebDNA vs. php war ;-) (Matthew Bohne 2010)
  14. Re: [WebDNA] WebDNA vs. php war ;-) (Dan Strong 2010)
  15. Re: [WebDNA] WebDNA vs. php war ;-) (Matthew Bohne 2010)
  16. Re: [WebDNA] WebDNA vs. php war ;-) (Dan Strong 2010)
  17. Re: [WebDNA] WebDNA vs. php war ;-) (Donovan Brooke 2010)
  18. Re: [WebDNA] WebDNA vs. php war ;-) (Matthew Bohne 2010)
  19. Re: [WebDNA] WebDNA vs. php war ;-) (Dan Strong 2010)
  20. Re: [WebDNA] WebDNA vs. php war ;-) (Paul Willis 2010)
  21. Re: [WebDNA] WebDNA vs. php war ;-) (Dan Strong 2010)
  22. Re: [WebDNA] WebDNA vs. php war ;-) (christophe.billiottet@webdna.us 2010)
  23. [WebDNA] WebDNA vs. php war ;-) (Dan Strong 2010)
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 want passed form variables stored in an array. Since WebDNA now uses scoping much more, I guess I would 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 other variable types of the same name can override *form* variables. Also, you don't have to use the "show=f" param since that is the default. Regarding PHP arrays, wow, what an advantage WebDNA has there IMO. I don't know the syntax off-hand exactly, but you have to open up a 'for each' loop for a specific http 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 users would be astonished by how they could use our [table][/table] context to replace many PHP solutions that use convoluted PHP arrays. Don't get me wrong, PHP has significant *other* advantages over WebDNA right now, but on specific syntax comparisons, WebDNA is a relief to program with. Donovan -- Donovan Brooke Euca Design Center [Practical-Ethical-Efficient] www.euca.us egg.bz artglass-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)