Re: [WebDNA] WebDNA vs. PHP code examples

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 101126
interpreted = N
texte = Will Starck wrote: > If anyone has any code snippet examples of a few lines of code in WebDNA vs. > something much longer that would be required in PHP code you post them > please? > > Thanks, > > Will Starck > ------------------- > NovaDerm Skincare Science > http://www.novaderm.com > wjs@novaderm.com > 817-717-7377 Hi Will, I don't know if you will find code examples that show a much "longer" form in PHP... maybe, rather, when all is added up. I think PHP and WebDNA have a lot of the same tag function that will be more or less about the same length. I personally think WebDNA development is *time* is "shorter" because of it's intuitive syntax and it's innate data access (search) tools. However, lets compare (using W3 examples): Show something on condition------------------- PHP:: WebDNA:: [text]d=[date %a][/text] [showif [d]=Fri] Have a nice weekend! [/showif] Another similar example....... PHP:: WebDNA:: [text]d=[date %a][/text] [if "[d]" = "Fri"] [then] Have a nice weekend! [/then] [else] Have a nice day! [/else] [/if] So both are around the same length. Which is more intuitive? (Maybe a C++ guy will pick the PHP version) ;-) Here's more: Include something------------------- PHP:: WebDNA:: [include header.inc] Date Stuff------------------- PHP:: "; echo date("Y.m.d"); echo "
"; echo date("Y-m-d"); ?> WebDNA:: [date %Y/%m/%d]
[date %Y.%m.%d]
[date %Y-%m-%d]
Functions-------------------- PHP:: "; echo "My name is "; writeMyName(); echo ".
That's right, "; writeMyName(); echo " is my name."; ?> WebDNA:: [function name=writeMyName] [return]Kai Jim Refsnes[/return] [/function] Hello world!
My name is [writeMyName].
That's right, [writeMyName] is my name. I can go on, but the "intuitive difference" is the same throughout all the tags... and yes, I think, overall, PHP would be more lengthy when all is said and done. However, I think the bigger difference is that the intuitive syntax, coupled with WebDNA's search abilities are really where the development time is saved. Regarding PHP searching.. PHP most often uses MySQL for it's data access. Anyone who codes seriously in PHP will end up having to know MySQL. Of course, this may not be a bad thing. I am a big proponent of MySQL, and WebDNA will continue to improve it's integration with MySQL and other database architectures. However, in my opinion, using MySQL in many situations is just overkill. In fact, there are hundreds of every day examples where using MySQL would be overkill.. especially within the WebDNA environment. I liken this to firing up the Harley to go 2 blocks to the convenient store. Its just over kill! ;-) Take a look at this W3 link about PHP and MySQL: http://www.w3schools.com/php/php_ref_mysql.asp It's definately a learning curve. However, lets compare a simple delete record: PHP:: WebDNA:: [delete db=mydb.db&lsIDdatarq=5] Records deleted! :-) So I agree with Olin, PHP simply can't touch WebDNA's native and convenient search abilities.. (both [table..] and db= searching) Anway, after using WebDNA just about weekly for the last 10 years ..(since my first class with John Hill) ;-).. I can say that, to me, WebDNA is a great counterpart to creativity. The syntax is not so machine-like, yet it still has significant power. A programmer can really get into the zone and make things happen with this language. I certainly know the drawbacks of using WebDNA when compared to PHP (mostly having to do with recognition, and integration etc..).. but know that we are targeting those drawbacks! Hopefully soon, these things won't be a significant difference to factor in. Hope that helps! Donovan (didn't spell check this one! ;-) -- Donovan D. Brooke PH/FAX: 1 (608) 291-2024 ---------------------------------------------- VP WebDNA Software Corporation 16192 Coastal Highway Lewes, DE 19958 Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] WebDNA vs. PHP code examples (Patrick McCormick 2008)
  2. Re: [WebDNA] WebDNA vs. PHP code examples (Donovan Brooke 2008)
  3. Re: [WebDNA] WebDNA vs. PHP code examples (Bob Minor 2008)
  4. [WebDNA] WebDNA vs. PHP code examples ("Will Starck" 2008)
Will Starck wrote: > If anyone has any code snippet examples of a few lines of code in WebDNA vs. > something much longer that would be required in PHP code you post them > please? > > Thanks, > > Will Starck > ------------------- > NovaDerm Skincare Science > http://www.novaderm.com > wjs@novaderm.com > 817-717-7377 Hi Will, I don't know if you will find code examples that show a much "longer" form in PHP... maybe, rather, when all is added up. I think PHP and WebDNA have a lot of the same tag function that will be more or less about the same length. I personally think WebDNA development is *time* is "shorter" because of it's intuitive syntax and it's innate data access (search) tools. However, lets compare (using W3 examples): Show something on condition------------------- PHP:: WebDNA:: [text]d=[date %a][/text] [showif [d]=Fri] Have a nice weekend! [/showif] Another similar example....... PHP:: WebDNA:: [text]d=[date %a][/text] [if "[d]" = "Fri"] [then] Have a nice weekend! [/then] [else] Have a nice day! [/else] [/if] So both are around the same length. Which is more intuitive? (Maybe a C++ guy will pick the PHP version) ;-) Here's more: Include something------------------- PHP:: WebDNA:: [include header.inc] Date Stuff------------------- PHP:: "; echo date("Y.m.d"); echo "
"; echo date("Y-m-d"); ?> WebDNA:: [date %Y/%m/%d]
[date %Y.%m.%d]
[date %Y-%m-%d]
Functions-------------------- PHP:: "; echo "My name is "; writeMyName(); echo ".
That's right, "; writeMyName(); echo " is my name."; ?> WebDNA:: [function name=writeMyName] [return]Kai Jim Refsnes[/return] [/function] Hello world!
My name is [writeMyName].
That's right, [writeMyName] is my name. I can go on, but the "intuitive difference" is the same throughout all the tags... and yes, I think, overall, PHP would be more lengthy when all is said and done. However, I think the bigger difference is that the intuitive syntax, coupled with WebDNA's search abilities are really where the development time is saved. Regarding PHP searching.. PHP most often uses MySQL for it's data access. Anyone who codes seriously in PHP will end up having to know MySQL. Of course, this may not be a bad thing. I am a big proponent of MySQL, and WebDNA will continue to improve it's integration with MySQL and other database architectures. However, in my opinion, using MySQL in many situations is just overkill. In fact, there are hundreds of every day examples where using MySQL would be overkill.. especially within the WebDNA environment. I liken this to firing up the Harley to go 2 blocks to the convenient store. Its just over kill! ;-) Take a look at this W3 link about PHP and MySQL: http://www.w3schools.com/php/php_ref_mysql.asp It's definately a learning curve. However, lets compare a simple delete record: PHP:: WebDNA:: [delete db=mydb.db&lsIDdatarq=5] Records deleted! :-) So I agree with Olin, PHP simply can't touch WebDNA's native and convenient search abilities.. (both [table..] and db= searching) Anway, after using WebDNA just about weekly for the last 10 years ..(since my first class with John Hill) ;-).. I can say that, to me, WebDNA is a great counterpart to creativity. The syntax is not so machine-like, yet it still has significant power. A programmer can really get into the zone and make things happen with this language. I certainly know the drawbacks of using WebDNA when compared to PHP (mostly having to do with recognition, and integration etc..).. but know that we are targeting those drawbacks! Hopefully soon, these things won't be a significant difference to factor in. Hope that helps! Donovan (didn't spell check this one! ;-) -- Donovan D. Brooke PH/FAX: 1 (608) 291-2024 ---------------------------------------------- VP WebDNA Software Corporation 16192 Coastal Highway Lewes, DE 19958 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:

[WebDNA] [if] or [case] or something else (2012) Intermitent problem using [referrer] (1997) 2.1 Stuff (1998) select multiple (1997) Limiting user access to .tmpl files (1997) Sort Order on a page search (1997) Online reference (1997) Re:Emailer and encryption (1997) Funny Chars (1999) Group search doesn't work. (1997) Offer from ClearWay: Accelerate WebCatalog With ClearWay NITROPowerPlug! (1999) EIMS Problems (1997) HELP WITH DATES (1997) variables in [addlineitem] (1998) SERIAL NUMBER PROBLEM *AGAIN*!!! (1998) [showif]/[hideif] question (1997) [SearchString] problem with [search] context (1997) 4.0.x find (2000) Unique value creation (1999) ShippingCosts (1998)