Re: Coding Standards - are there any ?
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 48556
interpreted = N
texte = Hi all,I actually use the Fusebox methodology for all my site development. Originally developed as a ColdFusion coding standard, it has since been ported to PHP, ASP, JSP, etc. and I am currently developing a set of WebDNA core files - sort of waiting until version 5 to finish since that will really help since we will be able to separate our searches from the output with the use of arrays. Anyhow, the development methods used in Fusebox are valuable for all.- CharlesOn Monday, March 10, 2003, at 05:51 PM, Howard Wolosky wrote:> I actually have VERY strong feelings on this.>> I've tried to stick to strict naming conventions to avoid confusion in > an essentially non-typed language:> d_ should precede all database field names> m_ for math vars> t_ for text vars> s_ for skin vars (i.e if I allow for simple dynamic substitution of > HTML layout properties)> l_ for localized strings ---- I try to put all static strings in a > separate include file to make localization simpler.> _ precedes all vars submitted through forms>> Why is this important?>> #1 reason: scoping. It is very possible to end up having a form > variable, a math/text variable, a database variable, and a tag all > have the same name ([date] is a very common example...[cart] could be > another...so could [subtotal] or many others....).>> Not only does this convention thus become self documenting, it also > avoids common scoping issues before they even happen.>> I am a very strong believer in Hungarian notation (or variations of > it) and always use it in my non WebDNA coding. After getting bitten a > number of times with scoping issues in the past, I now adhere to this > convention 100% of the time.>> Now, there is intrinsically no real reason to differentiate between a > math var and a text var since it is possible to use one as the other, > I still do for the sake of consistency.>> I'm very interested in hearing further comments on this..>> -howard>> At 12:21 PM 3/10/2003, John Peacock wrote:>> Tom Duke wrote:>>> fFIELDNAME>>> vVARIABLENAME>>> rRECORDID>>>> That is similar to what is typically referred to as Hungarian >> notation for C++:>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ >> dnvsgen/html/hunganotat.asp>> http://ootips.org/hungarian-notation.html>>>> Pay close attention to the Ugly section of the second link; don't >> rely on the notation to be anything more than a comment when the code >> was originally written that the variable had this characteristic.>>>> John>>>> -->> John Peacock>> Director of Information Research and Technology>> Rowman & Littlefield Publishing Group>> 4501 Forbes Boulevard>> Suite H>> Lanham, MD 20706>> 301-459-3366 x.5010>> fax 301-429-5748>>>>>> ------------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list
.>> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/>>>> Howard Wolosky> ------------------------> howard@wolosky.com>>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Hi all,I actually use the Fusebox methodology for all my site development. Originally developed as a ColdFusion coding standard, it has since been ported to PHP, ASP, JSP, etc. and I am currently developing a set of WebDNA core files - sort of waiting until version 5 to finish since that will really help since we will be able to separate our searches from the output with the use of arrays. Anyhow, the development methods used in Fusebox are valuable for all.- CharlesOn Monday, March 10, 2003, at 05:51 PM, Howard Wolosky wrote:> I actually have VERY strong feelings on this.>> I've tried to stick to strict naming conventions to avoid confusion in > an essentially non-typed language:> d_ should precede all database field names> m_ for math vars> t_ for text vars> s_ for skin vars (i.e if I allow for simple dynamic substitution of > HTML layout properties)> l_ for localized strings ---- I try to put all static strings in a > separate include file to make localization simpler.> _ precedes all vars submitted through forms>> Why is this important?>> #1 reason: scoping. It is very possible to end up having a form > variable, a math/text variable, a database variable, and a tag all > have the same name ([date] is a very common example...[cart] could be > another...so could [subtotal] or many others....).>> Not only does this convention thus become self documenting, it also > avoids common scoping issues before they even happen.>> I am a very strong believer in Hungarian notation (or variations of > it) and always use it in my non WebDNA coding. After getting bitten a > number of times with scoping issues in the past, I now adhere to this > convention 100% of the time.>> Now, there is intrinsically no real reason to differentiate between a > math var and a text var since it is possible to use one as the other, > I still do for the sake of consistency.>> I'm very interested in hearing further comments on this..>> -howard>> At 12:21 PM 3/10/2003, John Peacock wrote:>> Tom Duke wrote:>>> fFIELDNAME>>> vVARIABLENAME>>> rRECORDID>>>> That is similar to what is typically referred to as Hungarian >> notation for C++:>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ >> dnvsgen/html/hunganotat.asp>> http://ootips.org/hungarian-notation.html>>>> Pay close attention to the Ugly section of the second link; don't >> rely on the notation to be anything more than a comment when the code >> was originally written that the variable had this characteristic.>>>> John>>>> -->> John Peacock>> Director of Information Research and Technology>> Rowman & Littlefield Publishing Group>> 4501 Forbes Boulevard>> Suite H>> Lanham, MD 20706>> 301-459-3366 x.5010>> fax 301-429-5748>>>>>> ------------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/>>>> Howard Wolosky> ------------------------> howard@wolosky.com>>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Charles Kline
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] Video Request: "Faces of WebDNA" (2010)
WebCatalog 3.0.4 alias crash bug? (2000)
code to phantom spacing (2001)
[WriteFile] problems (1997)
Type 11 errors setting up WebCAt 2 (1997)
WebDNA for Dummies (2003)
[WebDNA] DNA suffix (2008)
Re(2): Re(2): SSL, WebSTAR, WebCatalog (1998)
Re:Emailer and encryption (1997)
[OT] JS Help PLEASE (2006)
Virtual hosting and webcatNT (1997)
Showif with an or (2003)
finding server (2001)
Version f1 status (1997)
What about this gremlin issue? (2000)
Combining search criteria in a context? (1998)
Draft Manual, Tutorial, and more (1997)
SearchTitle Question (1998)
URL encoding question (2001)
Same DB Same Time (2004)