SubMain - CodeIt.Right The First Time!

/Community

Support Community for SubMain Products
 Home Products Services Download Purchase Support
in Search
 
Home Forums Blogs Tutorials/CIR Tutorials/GD Downloads
Welcome to SubMain Community Sign in | Join | Help

Control Naming Guidelines

Last post 10-18-2011, 10:27 AM by Serge B. (SubMain). 5 replies.
Sort Posts: Previous Next
  •  12-19-2006, 8:42 AM 131

    Control Naming Guidelines

    Control Naming Guidelines look fairly VB6 old...
  •  12-19-2006, 8:47 AM 132 in reply to 131

    Control Naming Guidelines

    Hi Michael,

    Yes, you are right, the Control Naming Guidelines are old style in the current version.

    They are #1 on our list to rewrite in January.

    We will contact you at the email you registered downloading the whitepaper when we have updated version available.
    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft MVP  |  ASP Insider
    » » CodeIt.Right Will Fix Your Code!™ - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
  •  06-21-2008, 2:33 AM 554 in reply to 132

    Re: Control Naming Guidelines

    Hi,

    Any rules to check for this? I couldn't find any rules from editor as this moment.

    Please advice. Thank you
     

  •  06-21-2008, 10:35 PM 557 in reply to 554

    Re: Control Naming Guidelines

    Rules

    • Use prefix for derived type (Naming)
    • Avoid prefix for derived type (Naming)

    are included into the library but are not part of the default profile. You need to add them to your custom profile - How to add rule to User Profile

    You can use the rules above to enforce specific Control Naming prefixes or suffixes.

     


    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft MVP  |  ASP Insider
    » » CodeIt.Right Will Fix Your Code!™ - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
  •  10-18-2011, 7:47 AM 1900 in reply to 557

    Re: Control Naming Guidelines

    I disagree with 3.17 and 3.17.2 which states to use prefixes when naming controls. This clearly contradicts Microsoft’s Guidelines against using any prefixes (No Hungarian Notation). The naming conventions and coding standards at Microsoft have been studied by over one thousand people and for literally hundreds of hours. The disadvantages for using Hungarian Notation should be obvious; however, I am going to highlight the major disadvantages. Hungarian Notation causes development deficiencies because the developer has to think about what the prefix is and may need to look up the prefix. Hungarian Notation results in extra typing. Developers have to memorize prefixes tables (the prefix table typically maps prefixes to controls). Someone or the team to meet and take the time (increasing administration and documentation cost) creating a prefix lookup document and maintain the document adding mappings to new controls and as new custom controls developed. Code legibility should be the primary goal; however, prefixing produces inconsistent source code appearance making the code cryptic and less readable.

    And, just curious, what do you mean by "code can be visually checked for correctness" when using prefixes? I don't see the advantage.

  •  10-18-2011, 10:27 AM 1901 in reply to 1900

    Re: Control Naming Guidelines

    I totally agree that using Hungarian notation for control names is dated. 

    What are you suggesting for control naming?

    Thanks!

     


    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft MVP  |  ASP Insider
    » » CodeIt.Right Will Fix Your Code!™ - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
View as RSS news feed in XML
 
     
 
Home |  Products |  Services |  Download |  Purchase |  Support |  Community |  About Us |