当我有机会时,我通常会使用我所谓的“三次迭代规则”。
In the first iteration (or startup), I devise the general layout of the application according to the model objects, the algorithms, and the expected (really expected, not maybe expected) future directions. I don't write design documents, but if I have to coordinate multiple people, a rough sketch of the procedure is of course needed, together with an analysis of dependencies and guesstimate of the time needed. Try to keep this phase to a minimum if, like me, you prefer a more agile method. There are cases where a strong design phase is needed, in particular when everything is known and true about the logic of your program, and if you plan to have a lot of interactions between features in your code. In this case, use cases or user stories provide are a good high level idea, in particular for GUI apps. For command line apps, and in particular libraries, try to write "program stories" in which you code against the library you have to develop and check how it looks. These programs will become functional tests of your library when completed.
After this first iteration, you will have a better understanding on how things interact, got out the details and the rough spots, solved issues with a slapped duct tape patch. You are ready to make use of this experience to improve, clean, polish, divide what was too large, coalesce what was too fragmented, define and use design patterns, analyze performance bottlenecks and nontrivial security issues. In general, all these changes will have a huge impact on the unit tests you wrote, but not on the functional tests.
当您完成第二次迭代时,您将拥有一个经过良好测试、良好记录和良好设计的小珍宝。现在您已经有了进行第三次迭代(扩展)的经验和代码。您将添加新的特性和用例来改进应用程序。你会发现一些粗糙的地方,最终你会进入与第二次类似的第四次迭代。清洗并重复。
这是我软件设计的一般方法。它类似于螺旋设计,具有简短的,三个月的迭代,以及敏捷开发的元素,允许您了解问题并了解您的软件及其应用领域。当然,这是一个可伸缩性的问题,所以如果应用程序非常大,涉及到数百名开发人员,事情就会比这复杂一些,但最终我想想法总是一样的,分门别类。
总结一下:
在第一次迭代中,您将体验并学习它
在迭代2中,您将清理产品并为未来做好准备
在迭代3中,您添加了新特性并了解了更多
转到2