Question:
What are some open source C# projects I can download that implement many best-practices and have a relatively high code quality?
Please accompany your answer with some of the reasons you consider the code is of high quality.
What are some open source C# projects I can download that implement many best-practices and have a relatively high code quality?
Please accompany your answer with some of the reasons you consider the code is of high quality.
forums.agbotting.net in the release forum go to svns, I know the guy who coded that it's a bot and maphack for a video game called Diablo II, that him and a friend wrote themselfs. I believe it's of pretty good quality, and it's not very huge.
Enjoy
P.S When it doubt, call the magic powers of source forge.
Oh yeah, and of course SharpDevelop
I would recommend you to take a look at xUnit for example. Scott Hanselman has a serios of posts where he recommends some source code to take a look at (usually managed code written in C#): source code category posts
Scott Hanselman's The Weekly Source Code series is a nice read, he got 30+ episodes already and his comment is posted up along with each post as well.
I'm sorry that my post won't answer on your question, but I just want to add my 2 cents.
I doubt you can find any project with extremely high quality of code :)
I would be happy to know if I'm wrong, but I believe that people answered on this questions name applications because of their quality for end-users not because they written in high quality code.
Real-world projects being created to solve problems not to show off beautiful code.
You will be amazed if you take a look at metrics of some well-known projects.
I don't remember exact link, but there was a NDepend analysis of popular projects such as Paint.NET. Results were, let's say quite disappointing, but those projects are still good at what they do.
I saw millions of lines of code in commercial and open-source projects. I didn't see any project with extremely high quality but those project solved their task.
High quality code is somewhat subjective and even mystical matter. I think it would be much more useful to seek for good solution for a specific problem.
For example, project X has some really good code to solve Y, but it sucks in implementation of Z.
To make my post less off-topic, I can recommend you to take a look at code written by Microsoft Patterns & Practices team.
For example:
These projects are being written by very proficient developers, and they are intended specifically to teach how to come up with good solutions for some problems.
But even those projects suck terribly in implementation of some things :)
While I don't know about the actual code quality, you can have a look at the .NET Framework itself. At least they have FxCop and StyleCop running against it, since that's what the two tools were made for.
Visual Studio allows stepping into the BCL source, and there are some tools that misuse this functionality to download the entire source code. You can also look into the code with Reflector, since it is not obfuscated.
You can look directly at the .Net Framwork source available here: http://referencesource.microsoft.com/netframework.aspx
The XNA Creators Club has some quite nice, open source code - even if you aren't interested in the XNA aspect. Each code sample is small enough to wrap your head around, and often have a very good design.
I found the source for ASP.NET MVC to be a worthwhile read. At the time of writing, the latest source is avaliable to download on the preview 5 release page.
I would strongly recommend taking a look at Community Server. It is not an "Open Source" product per-se, but they provide a free Personal License and you can download the source for the entire system to muddle with.
If you want to see true art I'd recommend you to download Boo and check out. I recognize Rodrigo B. De Olivias to be probably among the best handful of men alive today in regards to code and quality...
When that's said, I'd definitely give Ra-Ajax a look too. I'm the creator of that stuff and there are very many places in there which I consider to have the "quality of Mona Lisa"...
To those saying that code quality and "pragmatism" doesn't necessarily go hand in hand, I would just like to say that you're wrong...!
Usefulness in most circumstances grows parallel in a one-to-one relationship with code code quality...!
Also often to determine code quality you can often count the number of lines of code, in general. The more complex the solution solved with less lines of code - the better the quality (normally)
MediaPortal. Individual sections of code are quite good, unfortunately it is not as cohesive as one might hope. There is an enormous amount of C# code covering everything from DB manipulation and XML manipulation to multimedia directshow programming and directx rendering.
Another suggestion, if you're interested in medical imaging software is ClearCanvas. They've developed an open source medical imaging viewer, archive, and a radiology information system. More details and how to access the source can be found on the site.
They've developed an application framework for developing .NET desktop apps, which is used to develop the viewer and information system. There's also developer documentation to get you started for the viewer, if you'd want to customize it yourself.
I would nominate the enterprise library which I maintain. Although it is virtually unknown :), it has been used on large project and performed really well. It is also FxCop compliant. It's called SixPack library.
Rotor is a shared source implementation (from MS) of portions of the .Net framework. CSLA is a nice Business Object framework for creating rich client and web apps.
John and Marc's MiscUtil is worth a look, the code is well commented and organized. It includes a large amount of tests.
I'm surprised no one mentioned Sharp Architecture
Here are some quality/structuring/changes analysis I did with NDepend
.NET Fx 4.0 beta1 vs 3.5 SP1
SharpDevelop
CruiseControl.NET
NUnit
Mono vs .NET Fx
Silverlight vs. .NET Fx
NHibernate
.NET 3.5 SP1 vs 3.5
What about DataObjects.Net? It's open-source commercial ORM + In-memory object database, seems to be quite interesting.
I'm surprised no one mentioned Ninject or Siesta yet, Nate Kohari has impeccable taste in writing source code
Personally, I've been amazed at what the people at the Kigg project have put together:
http://kigg.codeplex.com/Wikipage
Really some amazing stuff to see as to how they tackle building a robust, modern C# app.