You can have a look at the source code of my project. I've tried to follow the SOLID principles and the recommendations of the Clean Code book. For example following SRP has caused the classes to be very small and focused - the largest classes are only about 200 LOC (when counting whitespace, copyright statements and comments). It's all in Java, but that is close enough to C#, and the principles are anyways the same.
I've been pretty impressed with the work put into an open source game: Star Trek Supremacy (http://supremacy.codeplex.com/). In addition to the author trying to learn new technologies, he is also applying some good programming practices as well - and his code is pleasant to read (e.g. the grab a favorite beverage and a printout kind of pleasant).
The author says on the website:
I started this project in large part
as a learning experience, and as such
it has become a sort of testbed for me
to try out several new Microsoft
.NET-based technologies, including:
* WPF
* WCF
* LINQ (in-memory, DLINQ, and XLINQ)
* Parallel Extensions
* XNA (for 3D combat system)
发布评论
评论(2)
<无耻插件>
您可以查看源代码 .net/" rel="nofollow noreferrer">我的项目。 我尝试遵循 SOLID 原则和干净代码的建议书。 例如,遵循 SRP 导致课程非常小且集中 -最大的类只有大约 200 个 LOC(计算空白、版权声明和注释时)。 全部都是用 Java 编写的,但它与 C# 足够接近,并且原理无论如何都是相同的。
<shameless plug>
You can have a look at the source code of my project. I've tried to follow the SOLID principles and the recommendations of the Clean Code book. For example following SRP has caused the classes to be very small and focused - the largest classes are only about 200 LOC (when counting whitespace, copyright statements and comments). It's all in Java, but that is close enough to C#, and the principles are anyways the same.
</shameless plug>
我对开源游戏《星际迷航霸权》(http://supremacy.codeplex .com/)。 除了作者尝试学习新技术之外,他还应用了一些良好的编程实践 - 并且他的代码读起来很愉快(例如,抓取最喜欢的饮料和打印输出有点令人愉快)。
作者在网站上说:
I've been pretty impressed with the work put into an open source game: Star Trek Supremacy (http://supremacy.codeplex.com/). In addition to the author trying to learn new technologies, he is also applying some good programming practices as well - and his code is pleasant to read (e.g. the grab a favorite beverage and a printout kind of pleasant).
The author says on the website: