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.
任何人都可以指引我使用一个小的C#应用程序,它将象征着设计程序的“正确方法”吗?我正在寻找一个相对简单(可能是微不足道)的程序来分析和学习。
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.
我一直在研究C#很晚了,虽然我对自己对.Net框架和C#语法部分的理解充满信心,但我对设计的一般概念以及项目如何适应有困难一起。
Thanks for any sources you can provide!
感谢您提供的任何来源!
5 个解决方案
#2
First, take a look at the previous question on this topic. It's at https://*.com/questions/143088/open-source-c-projects-that-have-very-high-code-quality-to-learn-from.
首先,看一下关于这个主题的上一个问题。它位于https://*.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)
ASP.NET MVC店面(MVC参考)
Rawr(优秀的Windows窗体应用程序)
All of these are on Codeplex.
所有这些都在Codeplex上。
#3
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.
SharpDevelop是一个面向对象并使用最佳实践的伟大项目。您可以在此处下载源代码:http://www.icsharpcode.net/OpenSource/SD/Download/。它实际上是一个IDE,因此您也可以使用它来编写代码。
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!
我下载了源代码,在Visual Studio中加载它,编译它,并在调试模式下运行...所有这些都在大约5分钟内完成,没有做任何特殊设置!
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.
唯一的问题是解决方案本身并不是很小,但是很多小项目被分解,所以这就是我推荐它的原因。
#4
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.
你可以下载像BlogEngine这样的东西。如果您下载完整的源代码版本,您可以设置断点并遍历代码并查看它们如何实现。
Otherwise there are a ton of projects on codeplex.
否则,有很多关于codeplex的项目。
#5
Microsoft has a great library of this stuff:
微软有一个很棒的库:
ASP.NET快速入门教程
ASP.NET Starter Kits and Community Projects
ASP.NET入门套件和社区项目
#1
#2
First, take a look at the previous question on this topic. It's at https://*.com/questions/143088/open-source-c-projects-that-have-very-high-code-quality-to-learn-from.
首先,看一下关于这个主题的上一个问题。它位于https://*.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)
ASP.NET MVC店面(MVC参考)
Rawr(优秀的Windows窗体应用程序)
All of these are on Codeplex.
所有这些都在Codeplex上。
#3
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.
SharpDevelop是一个面向对象并使用最佳实践的伟大项目。您可以在此处下载源代码:http://www.icsharpcode.net/OpenSource/SD/Download/。它实际上是一个IDE,因此您也可以使用它来编写代码。
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!
我下载了源代码,在Visual Studio中加载它,编译它,并在调试模式下运行...所有这些都在大约5分钟内完成,没有做任何特殊设置!
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.
唯一的问题是解决方案本身并不是很小,但是很多小项目被分解,所以这就是我推荐它的原因。
#4
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.
你可以下载像BlogEngine这样的东西。如果您下载完整的源代码版本,您可以设置断点并遍历代码并查看它们如何实现。
Otherwise there are a ton of projects on codeplex.
否则,有很多关于codeplex的项目。
#5
Microsoft has a great library of this stuff:
微软有一个很棒的库:
ASP.NET快速入门教程
ASP.NET Starter Kits and Community Projects
ASP.NET入门套件和社区项目