Re: [WebDNA] Anyone use this coding style for readability...
This WebDNA talk-list message is from 2010
It keeps the original formatting.
numero = 105464
interpreted = N
texte = More and more I avoid using [raw] too. Mine often are used=20with forms and look like:[text secure=3Df]a=3D[/text]Then, if no a is passed, I don't get ugly [a] code showing=20up; just a nice clean nothing. Yours would be like[text secure=3Df]c_id=3Dundefined[/text][showif [c_id]=3Dundefined]Customer id is=20not=A0defined.[/showif]TerryOn Fri, 2 Jul 2010 21:50:21 -0500 Kenneth Grome
wrote:> I don't use your question mark convention, but I don't=20>use [x]=3D[raw][x][/raw] either. Instead I preset my=20>variables at the top of the page like this:>=20> [text secure=3Df]a=3Db[/text]>=20> Using 'secure=3Df' allows incoming formvariables to=20>override the 'a' value and change it. Then I can use a=20>simple comparison to see if the 'a' value has been=20>changed:>=20> [showif b=3D[a]]no change[/showif]> [showif b![a]]changed[/showif]>=20> Sincerely,> Kenneth Grome>=20>=20>=20>=20>=20>=20>> Here's a simplified example:>>=20>> [text=20>>secure=3DT]customer_id_undefined?=3D"[c_id]"=3D"[raw][c_id][/raw]"[/tex=t]>>=20>> [showif [customer_id_undefined?]]Customer id is not=20>>defined.[/showif]>>=20>>=20>> I find this question mark condition naming improves=20>>readability rather>> than having:>>=20>> "[c_id]"=3D"[raw][c_id][/raw]">>=20>> throughout my code. It also "DRY"s it up.>>=20>> Any pitfalls to this that you can see?>>=20>> Thanks,>> Bill>> --------------------------------------------------------->> This message is sent to you because you are subscribed=20>>to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us>>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed=20>to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us=A0
Associated Messages, from the most recent to the oldest:
More and more I avoid using [raw] too. Mine often are used=20with forms and look like:[text secure=3Df]a=3D[/text]Then, if no a is passed, I don't get ugly [a] code showing=20up; just a nice clean nothing. Yours would be like[text secure=3Df]c_id=3Dundefined[/text][showif [c_id]=3Dundefined]Customer id is=20not=A0defined.[/showif]TerryOn Fri, 2 Jul 2010 21:50:21 -0500 Kenneth Grome wrote:> I don't use your question mark convention, but I don't=20>use [x]=3D[raw][x][/raw] either. Instead I preset my=20>variables at the top of the page like this:>=20> [text secure=3Df]a=3Db[/text]>=20> Using 'secure=3Df' allows incoming formvariables to=20>override the 'a' value and change it. Then I can use a=20>simple comparison to see if the 'a' value has been=20>changed:>=20> [showif b=3D[a]]no change[/showif]> [showif b![a]]changed[/showif]>=20> Sincerely,> Kenneth Grome>=20>=20>=20>=20>=20>=20>> Here's a simplified example:>>=20>> [text=20>>secure=3DT]customer_id_undefined?=3D"[c_id]"=3D"[raw][c_id][/raw]"[/tex=t]>>=20>> [showif [customer_id_undefined?]]Customer id is not=20>>defined.[/showif]>>=20>>=20>> I find this question mark condition naming improves=20>>readability rather>> than having:>>=20>> "[c_id]"=3D"[raw][c_id][/raw]">>=20>> throughout my code. It also "DRY"s it up.>>=20>> Any pitfalls to this that you can see?>>=20>> Thanks,>> Bill>> --------------------------------------------------------->> This message is sent to you because you are subscribed=20>>to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us>>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed=20>to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us=A0
"Terry Wilson"
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:
Price question (1998)
WebSTAR 2.1 freezes my Mac (1997)
multi-paragraph fields (1997)
For those of you not on the WebCatalog Beta... (1997)
Bug alert! (1997)
[WebDNA] HTTP Streaming -- impossible? (2010)
math on date? (1997)
E-Mailer (WebCatb15acgiMac) (1997)
'page impression' techniques for banner ads (1999)
[WebDNA] testing... (2010)
accountnum using [listwords] (2001)
WebCat2b12 - New features for 1.6 users ... (1997)
[WebDNA] WebDNA receiving numerous signal SIGSEGV then crashing (2016)
[taxrate] question (1997)
RE: AccountAuthorizer doesn't seem to work (1997)
Searching multiple Databases (1997)
TRAINING videos - Prove IT. (1998)
Multiple catalog databases and showcart (1997)
generating unique IDs (2000)
MacAuthorize order data fields WAS:How To question... (1997)