Re: [WebDNA] Anyone use this coding style for readability...

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 105463
interpreted = N
texte = I don't use your question mark convention, but I don't use [x]=[raw][x][/raw] either. Instead I preset my variables at the top of the page like this: [text secure=f]a=b[/text] Using 'secure=f' allows incoming formvariables to override the 'a' value and change it. Then I can use a simple comparison to see if the 'a' value has been changed: [showif b=[a]]no change[/showif] [showif b![a]]changed[/showif] Sincerely, Kenneth Grome > Here's a simplified example: > > [text secure=T]customer_id_undefined?="[c_id]"="[raw][c_id][/raw]"[/text] > > [showif [customer_id_undefined?]]Customer id is not defined.[/showif] > > > I find this question mark condition naming improves readability rather > than having: > > "[c_id]"="[raw][c_id][/raw]" > > throughout my code. It also "DRY"s it up. > > Any pitfalls to this that you can see? > > Thanks, > Bill > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us > Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Anyone use this coding style for readability... ("Terry Wilson" 2010)
  2. Re: [WebDNA] Anyone use this coding style for readability... (Kenneth Grome 2010)
  3. Re: [WebDNA] Anyone use this coding style for readability... (Govinda 2010)
  4. [WebDNA] Anyone use this coding style for readability... (William DeVaul 2010)
I don't use your question mark convention, but I don't use [x]=[raw][x][/raw] either. Instead I preset my variables at the top of the page like this: [text secure=f]a=b[/text] Using 'secure=f' allows incoming formvariables to override the 'a' value and change it. Then I can use a simple comparison to see if the 'a' value has been changed: [showif b=[a]]no change[/showif] [showif b![a]]changed[/showif] Sincerely, Kenneth Grome > Here's a simplified example: > > [text secure=T]customer_id_undefined?="[c_id]"="[raw][c_id][/raw]"[/text] > > [showif [customer_id_undefined?]]Customer id is not defined.[/showif] > > > I find this question mark condition naming improves readability rather > than having: > > "[c_id]"="[raw][c_id][/raw]" > > throughout my code. It also "DRY"s it up. > > Any pitfalls to this that you can see? > > Thanks, > Bill > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us > Kenneth Grome

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:

Nested search (1997) [WebDNA] Error: Can't open order file. Ignoring [OrderFile] context Error: Error: expected [/APPLICATION], but found [/!] instead[/!] (2011) [WebDNA] improvements (2015) displaying 12 results 4 by 3 (2000) nesting limits? (1998) Separate SSL Server (1997) [format 40s]text[/format] doesn't work (1997) Speaking of Rediret (2004) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) Auto entering Friday's date in a field (2002) WebCat2 - Getting to the browser's username/password data (1997) Shopping carts and reloading pages (1997) Database Updates (1997) member logins database (2003) b12 cannot limit records returned and more. (1997) Faxing orders in place of email (1997) Problem with Midnight (2003) WebCatalog for guestbook ? (1997) SiteGuard Admin Feature ? (1997) Filemaker & WebCat (2001)