《测试驱动的面向对象软件开发》封面

测试驱动的面向对象软件开发

Growing object-oriented software, guided by tests

Steve Freeman · 初版 2009 年

57人推荐
73位读者提及
91次提及

为什么值得读

  • 澄清TDD中Mock在发现稳定接口上的作用
  • 契合对象通过消息传递协作的面向对象本质
  • 有效解答测试驱动开发实践中的困惑与障碍

Hacker News 上怎么说

  • ……手里拿着锤子,看什么都成了钉子。- 《企业应用架构模式》(Patterns of Enterprise Application Architecture,Martin Fowler 著)- 《重构:改善既有代码的设计》(Refactoring: Improving the Design of Existing Code,Martin Fowler 与 Kent Beck 著)- 《测试驱动的面向对象软件开发》(Growing Object-Oriented Software, Guided by Tests,Steve Freeman 著)

    …their hammer for which everything becomes a nail. - Patterns of Enterprise Application Architecture (Martin Fowler) - Refactoring: Improving the Design of Existing Code (Martin Fowler and Kent Beck) - Growing Object-Oriented Software, Guided by Tests (Steve Freeman)

  • Martin Fowler 和 Kent Beck 写的《Refactoring》。Martin Fowler 的《Patterns of Enterprise Application Architecture》。Eric Evans 的《Domain Driven Design》。Steve Freeman 和 Nat Pryce 写的《Growing Object-Oriented Software, guided by tests》。

    Refactoring by Martin Fowler and Kent Beck. Patterns of Enterprise Application Architecture by Martin Fowler. Domain Driven Design by Eric Evans. Growing Object-Oriented Software, guided by tests by Steve Freeman and Nat Pryce.

  • 我觉得 mock 最初的理念(如果你去读读《Growing Object-Oriented Software, Guided by Tests》的话)还是很有道理的:在那套 TDD 风格中,mock 是用来发现组件之间(希望能相对稳定)的接口的,而且理论上,它也很契合 OOP 的核心理念——即“对象之间发送消息……

    I think the original ideas of mocks (if you go and read Growing Object-Oriented Software, Guided by Tests) had some merit: In that style of TDD, mocks are used to discover (hopefully somewhat stable) interfaces between components, and in theory, it fits with the idea that OOP is about "objects sending messages…

  • “…主流用法已经演进了。我敢断言你可以写出‘漂亮的 Java’,要么用类似这样的东西(自推一下):http://draconianoverlord.com/2011/03/17/frameworkless-di.htm... 要么参考更好的资源,即 Steve Freeman 和 Nat Pryce 写的 GOOS——《Growing Object-Oriented Software》:http://www.growing-object-oriented-software.com/ ...尽管,没错,像 Scala 这样更简洁的语言确实也有帮助。”

    …mainstream usage has evolved. I assert you can write "nice Java", either with something like (shameless plug): http://draconianoverlord.com/2011/03/17/frameworkless-di.htm... Or, for a better source, GooS, Growing Object-Oriented Software, by Steve Freeman and Nay Pryce: http://www.growing-object-oriented-software.com/ ...although, yes, a more succinct language like Scala helps too.

  • 作为入门,我推荐读一读《Growing Object-Oriented Software, Guided by Tests》。虽然我现在还不算 100% 的皈依者,但我心里的很多同类疑问确实得到了解答。http://www.amazon.com/Growing-Object-Oriented-Software-Guide...

    As a start, I recommend reading "Growing Object-Oriented Software, Guided by Tests". I am still not a 100% convert but I did get many of the same questions answered. http://www.amazon.com/Growing-Object-Oriented-Software-Guide...

  • ……测试时做不到的事情。一旦我学会了如何正确测试,TDD 就一直大有助益,从来不是累赘。如果你还没读过的话,Kent Beck 的《Test Driven Development By Example》以及 Steve Freeman 和 Nat Pryce 的《Growing Object-Oriented Software Guided by Tests》都是极好的书

    …things that you can't do while testing. Once I learned how to test properly, TDD has been helpful, never a hindrance. In case you haven't read them `Test Driven Development By Example` by Kent Beck and `Growing Object-Oriented Software Guided by Tests` by Steve Freeman and Nat Pryce are great books

正在加载完整评论……

键盘快捷键

/
聚焦搜索框
j / k
下一本 / 上一本
Enter
打开选中的书
Esc
关闭 / 返回
g h
回到首页
g b
值得读精选
g t
历史总榜
g r
上升最快
g l
我的书架
?
显示本帮助