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:

Template Cache problem -- new plugin for ya' (2000) unable to launch acgi in WebCat (1997) WebCommerce: Folder organization ? (1997) SiteEdit NewFile.html ? (1997) [math date]: Arrrggh! (2003) WebCatalog 2.1b4/Mac available (1997) Lineitems [text*] (2004) Reloading adds items - how to prevent?? (1998) stripping extra spaces from form fields (2000) Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997) Banner DNA (1997) Here we go again.. Web Services (2006) Firesite cache vs webcat cache (1997) Middle Context (2002) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Remove WebDNA context (2001) [append] vs. [appendfile] delta + question? (1997) PCS Frames (1997) Shopping carts and reloading pages (1997) Great product and great job ! (1997)