views:

214

answers:

4

Hi! I would like to know if you know some sites with great source code that follows Microsoft best practices?

By best practice I mean that projects that most likely conforms to say, this documents: http://www.codeplex.com/AppArchGuide http://apparch.codeplex.com/Wiki/View.aspx?title=Pocket%20Guides&referringTitle=Home

+1  A: 

I believe Microsoft's own code follows their best practices, so have a look at Shared Source Initiative.

Joonas Pulakka
To be honest, I'm looking code for project source code that can be used by users rather than projects that can be used by developers (i.e. development tools).
yoitsfrancis
Well, then be honest and edit your question accordingly :-)
Joonas Pulakka
A: 

Check out http://msdn.microsoft.com/en-us/practices/default.aspx and if you don't have VS 2008, download FxCop, http://msdn.microsoft.com/en-us/library/bb429476(VS.80).aspx

nickyt
I think you misunderstood the question. The practices site that you mentioned are mostly documents and not source code for Microsoft best practices. And I don't see the relevance of using FXCop which is a tool to check code. I'm finding sites with source codes.
yoitsfrancis
+1  A: 

I doubt that you will find "great source code" (ahem) which follows M$ best practices outside of M$ for these reasons:

  1. Most of the products will be commercial (-> closed source)
  2. To follow M$ development style, you need to be a big company with lots of developers. Most OSS projects are rather small (i.e. a small core team and lots of volunteers).
Aaron Digulla
Several programmers using Microsoft products follows that document so that document intends for people outside Microsoft to practice good programming styles. The document applies to projects whether big or small. Maybe you just misunderstood the concept of best practices.
yoitsfrancis
I own the book "Writing Solid Code" (which has been translated to "Never Again Bugs" in Germany). It's a bit old but a good read despite the fact that no company ever tortured more users with more bugs ;) So take my answer with a grain of salt :)
Aaron Digulla
http://www.amazon.com/Writing-Solid-Code-Microsofts-Programming/dp/1556155514
Aaron Digulla
A: 

It will probably be very hard to find any open source code that complies to Microsoft's standards. You could, however check to see how closely a given project conforms using StyleCop and FXCop with the default rulesets.

One place I would look is the Mono Project, and programs built using it.

Also, mad-j's idea of looking at the shared source initiative, may help, but I would guess that not all of their code strictly follows their guidelines.

chills42
I think that you misunderstood the question. I'm looking for a site with great source code, not enforcing rules with source code.
yoitsfrancis
The reason I suggested these tools is that they can be used to compare given source code to the guidelines set forth by Microsoft.
chills42

related questions