TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

DHH demonstrates "Test Induced Design Damage"

10 点作者 _pius大约 11 年前

1 comment

zenogais大约 11 年前
The comment by ntl more or less nails it.<p>This example is contrived at best and intellectually dishonest at worst. These kinds of patterns simplify applications with complex business logic. They complicate applications with straightforward business logic - much in the same way having more equations than variables makes a system of linear equations overdetermined.<p>These patterns exist to help domains with complex use cases test the business logic - which is likely to be tricky and filled with edge cases - quickly and and in a distraction free layer apart from the rest of the supporting infrastructure (eg. models, views, and controllers). This narrows developer focus to a single level of abstraction so they can solve the hard problem at hand. These patterns then provide an integration path for reintroducing the rest of the infrastructure (eg. dependency injection, etc).