- 论坛徽章:
- 0
|
[讨论]大家来讨论一下开发流程问题
[这个贴子最后由cinc在 2002/10/06 01:21pm 编辑]
呵呵,内聚性比较强是什么意思啊?
为什么说 XP 不符合潮流呢?
软件开发的技术发展几十年了,经历的好多种开发方法,面向过程的到现在的面向对象
的,也不知道面向对象的技术能领导潮流多久,但软件开发中有一个元素永远在起作用:
代码。编写代码这个活动永远在各种方法中占有一席之地。
在一个软件产品中,最重要的是什么呢,我觉得是软件的质量,而软件的质量的最终体
现是在代码。 write perfect code,就是 xp 的一个目标。XP 非常看重代码的质量。
任何有助于提高代码质量的实践都是 XP 提倡的,而且 XP 把这些实践推向了极致,所
以我们称之为极限编程:
摘自 http://www.xpchina.org/
----------------------------------------------------------------------------------
kent beck说了,如果一件事情好的话,那我们就走极端,让每个人、每时每刻来做,
意思就是极端化,把好处最大化,其他的解释都不通:
So why the "extreme" in the name? XP takes commonsense principles
and practices to extreme levels.
1.If ... are good, we'll .... all the time.
2.If .... is good, everybody ..all the time.
3.If ....is good, ...everybody's daily business
4.If ..is good, ...always..
5.If ... is important,everybody.....all the time.
6.If ....is important,..several times a day
7.If .. is good,...realy realy short-seconds and minutes and hours...
结对编程:
if code reviews are good,we'll review code all the time ---pair programming
单元测试:
if testing is good,every body will test all the time ---unit test
我们使用 JUnit 做 Java 的单元测试,用 CppUnit 做 C++ 的单元测试
功能测试:
even the customer ---functional testing
用户自己写测试
重构:
if design is good,we'll make it part of everybody's daily business ---refactoring
简单设计:
if simplicity is good,we'll always leave the system with the simplest design
that supports its current functionality
---the simpliest thing that could possibly work
隐喻:
if architecture is important,everybody will work defining and refining the
architecture all the time ---metaphor
持续测试:
if integration testing is import,then we'll integrate and test several times a day
---continuous integration
小版本发布:
if short iterations are good,we'll make the iterations really,really
short--seconds and minutes and hours ,not weeks and months and years
---the planning game
愿意的确是把这些好的要素强调到极点,不过翻译成极限也很不错,xp还在继续发展和演化中,
取其“无极限”的意思吧。
----------------------------------------------------------------------------------
上面提到的这些都不只是理论,已经有相应的工具可以支持:
单元测试:
XP 规定必须先写测试,才能写代码。
我们使用 JUnit 做 Java 的单元测试,用 httpunit 做 servlet 测试,
JUnit 已经集成到 JBuilder 和 VisualAge 中了。
用 CppUnit 做 C++ 的单元测试,
XUnit 是他们的总称。
http://www.xprogramming.com/software.htm
持续集成测试:
在 java 下我们使用 Ant 来做持续集成,Martin Flower 曾经写了一篇文章:
http://www.agilechina.org/MartinFowler/continuousintegration.htm
XP 中有个口号叫“拥抱变化”,就是承认需求永远是在变化的,所以我们能做的就
是让他将来变化的时候对我们的冲击最小。完整的单元测试 junit 和 集成工具 ant
使我们对将来需求和代码的任何改动都充满信心。
重构:
除了理论 ( Refactoring: Improving the Design of Existing Code by Martin Flower)
已经有工具来实现里面的功能:
IntelliJ IDEA 最出名。
还有的 rafactor 工具已经集成到 JBuilder 中了。
集体代码所有权:
我们使用 CVS 管理软件的版本。
XP 的理论就像一个洋葱,最外面是过程,中间是团队实践,而最里面,也是最重要的
就是编程,任何软件开发都回避不了的问题:code。外面两层的目标也是为了写出高质
量的代码。
可能由于 xp 从比较细节的角度考虑软件开发的问题,现在还只是适合小规模的开发。
但他里面的一些方法和实践同样值得大规模软件的参考。
|
|