What's a small, open source project with an excellent design?
I'm looking for small projects (5,000 - 25,000 lines) in languages like Java, C#, C++, Ruby, or Python. These projects should exhibit excellent architecture and design principles. The purpose of this is to find good models to study from, rather than getting knocked over the head for the next 10 years until I learn these lessons.
Edit: Thanks for all the responses. I'll try to go through all of them and see which is the most comprehensible. This'll take me a while. Don't worry, though. I'll accept one.
Junit 3.8 http://www.junit.org/node/363
From Dirk Riehle: "JUnit 3.8 Design Documentation Wed, 05/14/2008 - 06:24 — driehle
JUnit is increasingly being used in scientific case studies. That's because it is comparatively small, well-known, and self-contained. For anyone who is interested in a detailed design documentation of how JUnit 3.8 works, I have documented its design. I chose JUnit 3.8 because the move to annotations in 4.0 may have made JUnit more convenient to use, but the design less clear (in object-oriented terms). JUnit is not the only common case study, JHotDraw is another. If you have additional case studies with well-documented designs, I'd love to hear about it!"
and from http://dirkriehle.com/2008/04/03/junit-38-documented-using-collaborations/
"Abstract: This paper describes the design of the unit testing framework JUnit v3.8. The documentation technique employed is an enhanced version of collaboration-based design, also known as role modeling. In collaboration-based design, objects are viewed as playing multiple roles in different contexts, and different contexts are viewed as task specific collaborations. The documentation accounts for every method in the JUnit 3.8 framework by assigning it to a role. It thereby investigates whether roles and collaborations can serve as basic units of functionality provided by a design like a framework. Such a measure of functionality can serve multiple purposes, for example estimating implementation efforts or measuring complexity."
C4F Developer Kit
The kit features include drag 'n drop controls and components, SmartTags, Visual Basic and Visual C# source code for all tools and samples as well as complete QuickStarts and APIs documentation.
I can't give you specifics but the best source (pun intended) is the stuff you actually use. If you have access to the source of the standard libraries of your platform check them out, if you use open source apps check out the code of those too.
They'll likely far exceed your line limit but if you actually interact with the code as a user as well as a programmer you will come to appreciate the design decisions so much more.
Pay attention to the documentation as well. Programs that have good documentation are far more likely in my experience to have really well thought out code as well.
链接地址: http://www.djcxy.com/p/79158.html下一篇: 什么是具有优秀设计的小型开源项目?