ScottD's Musings

C#, .NET, ASP.NET, Automated Unit Testing, Middle Tier Development, and various topics!

News

<script src="http://jobburner.com/adclient.ashx?/0/6" type="text/javascript"></script>

Visual C# MVP

»telligent Bloggers

.NET Community

About Me

Blogs I Read

Cool Utilities

Lists - Others

Lists - Scooter's

Microsoft Events

Other Posts

Naming Conventions & Coding Standards for .NET

Being a middle-tier guy, as well as being anal about standards & conventions, I really wanted to expand on my standards documents authored for clients, and write a verbose standards document to share with the community.  Since then, I’ve realized a few things.  First, a good friend of mine convinced me that quick, bullet-list, to-the-point documents are used more readily than verbose 100+ page guidelines.  So far in my experience with clients & consultants, I've found that to be the case.  Second, many people have put together some great work in this area!  Check out the work that these people/teams have put together on this topic:

Naming Conventions/Coding Standard Guidance for .NET & C#

·         Microsoft’s Design Guidelines for Class Library Developers (via MSDN Library)

·         Lance Hunt’s C# Coding Standards document

·         Juval Lowy & IDesign.net’s C# Coding Standards document  (Click on the red "Standard" box located on the right side of the window to download the document.)

·         Microsoft’s new .NET Framework Developer Center, with related presentations & chat transcripts on various topics.

I think many companies/consulting shops take the best from these documents, and adopt their own standard.

I’m curious what the community thinks of standards documents…

·         Do you like concise bullet list documents or verbose papers?  

·         Or do you ditch all of these, and rather rely on tools such as FxCop? 

·         Do you have other guidelines, not listed here that you think are worth mentioning?

·        Prefer VB.NET’er?  Have some good links to VB.NET standards documents?  Share them here, I’ll keep a running list.

Please send your feedback!

Comments

Tim Rayburn said:

I really think that concise bullet pointed documents are more useful than long tomes on the ins and outs of design because a design journal should be like my Simon and Schuster Handbook for Writers which I keep near my desk. The goal is a desk reference to give guidance when you have a question.

All that said, you still rely on FxCop because guidelines are like laws, without enforcement you can't reasonably expect for them to be followed. Manual code-reviews are OK for checking on such things, but time consuming and only guarantee that the code you checked is correct (or will be corrected).

I've cobbled together a design reference that all my developers use which is garnered from most of the above sources (Lance's site is new to me) with a specific focus on the Design Guidelines for Class Library Developers.
# January 26, 2005 3:54 PM

TrackBack said:

# January 26, 2005 4:57 PM

karl said:

Microsoft's design guidelines are what we use...but only because of FxCop and the FxCop documentation/website, not because of how the guidelines are written...I wish that blasted guideline document was available for download in PDF format and provided better reference information (like bullet points)

# January 26, 2005 5:52 PM

AndrewSeven said:

A small summary of the common points.
Detailed description of the rules and reasons.
An automated tool (FxCop) to verify conformance so that people don't have to study the entire rule set in order to write conformant code
# January 26, 2005 6:39 PM

TrackBack said:

# January 27, 2005 5:45 AM

TrackBack said:

# January 27, 2005 8:00 PM

rosario said:

I agree with Karl. I wish that guideline document were available for download in any format. I am looking for a comprehensive naming conventions and coding standards document.
# February 10, 2005 10:13 AM

white_dragoon said:

Hi. Do you know a good, well-known and extended standard for VB.NET?

Thanks!

# July 10, 2006 10:14 PM

Confluence: Research Informatics said:

16ava Clase , Miercoles 09 Mayo Diffgrams cuando se quiere grabar en el XML sp: xmlpreparedocument SQL 2005: se puede usar TRY CATCH Decima Clase ,...

# May 18, 2007 8:35 PM

G Athaullah said:

I am not able to download this article "Lance Hunt’s C# Coding Standards document". Can you please help me.

# June 12, 2007 12:41 AM

Fabiano Fran??a » Blog Archive » links for 2007-06-14 said:

Pingback from  Fabiano Fran??a  &raquo; Blog Archive   &raquo; links for 2007-06-14

# June 14, 2007 4:43 AM

fasdf said:

<font color="red">this is text</font>

# June 7, 2008 4:54 AM

nil karaibrahimgil said:

Thanks for article..

# July 12, 2008 2:54 AM

watertraveller said:

Thank you. I'm trying to help decide on a coding standard at work-- this was useful.

# August 25, 2008 5:40 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)