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

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

white_dragoon said:

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

Thanks!

# July 10, 2006 10:14 PM

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

Gary said:

This is a new age in the evolution of the internet.

The age of broken links to articles that looked useful.

Oh well..

# April 14, 2011 10:19 AM

weblogs.asp.net said:

361020.. Awesome :)

# May 6, 2011 6:43 AM

weblogs.asp.net said:

361020.. Retweeted it :)

# June 19, 2011 8:04 PM