tags:

views:

188

answers:

5

Can anyone direct me to a smallish C# application that would be symbolic of the "right way" to design a program? I'm looking for a relatively simple (potentially trivial) program from which to analyze and learn.

The application should have a relatively trivial problem to solve and should solve it in a rather straight-forward way while showing off best practices/good object oriented design.

I've been studying C# rather a lot of late, and while I'm becoming confident in my understanding of parts of the .Net framework and the C# syntax, I'm having difficulties with the general concept of design and how a project fits together.

Thanks for any sources you can provide!

+1  A: 

There are plenty of projects on this site:

http://www.codeplex.com/

0xA3
I wouldn't necessarily say that all of the projects on CodePlex represent the "right" way to design a program.
Scott Dorman
A: 

You can download something like BlogEngine. If you download the full source version you can set break points and walk thru the code and see how they implement things.

Otherwise there are a ton of projects on codeplex.

brendan
+1  A: 

First, take a look at the previous question on this topic. It's at http://stackoverflow.com/questions/143088/open-source-c-projects-that-have-very-high-code-quality-to-learn-from.

To that list I would add:

  • ASP.NET MVC Storefront (MVC reference)
  • SubSonic
  • Rawr (good Windows Forms app)

All of these are on Codeplex.

Robert S.
A: 

Microsoft has a great library of this stuff:

ASP.NET Quick Start Tutorials

ASP.NET Starter Kits and Community Projects

Andrew Lewis
A: 

A great project that is object oriented and uses best practices is SharpDevelop. You can download the source here: http://www.icsharpcode.net/OpenSource/SD/Download/. It's actually an IDE, so you can use it to write your code too.

I downloaded the source, loaded it up in Visual Studio, compiled it, and ran it in Debug mode... all in about 5 minutes without doing any special setup!

The only catch is that the solution itself is not very small, but is broken into a lot of small projects, so that is why I am recommending it.

mc2thaH