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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

The end of MVC. Seems to be banished

5 点作者 CrystalBlood超过 15 年前

4 条评论

cscotta超过 15 年前
There's no need to sensationalize this. It's not the end of MVC and I'm not sure what's "banished" here. This sort of headline is a depressing trend.<p>But it is an interesting pattern for software architecture/engineering, and I'm glad to learn about it. I'll admit that after reading this summary I'm not entirely clear on how this marks any sort of revolutionary change in program design. Instead, it strikes me as a mental shift enabled by a few years' reflection on what MVC aspires to be. Indeed, the author says as much: "This may not seem like a really big change and indeed, technically, it is not. However the mental shift is huge!"<p>I'm not a Java developer, but in Ruby this sounds something like implementing a significant amount of program logic in modules rather than directly in a Merb/Rails/Datamapper/what-have-you model in order to achieve a looser coupling of the data/business logic layer.<p>So, I dunno. It's a really cool idea, and welcome to HN...but please change the headline to something less sensational/linkbait and more informative like - "Data/Context/Interaction - Thinking Beyond MVC Structure."
评论 #966160 未加载
jimfl超过 15 年前
From my reading, DCI doesn't supplant MVC, but is an architecture for organizing code. Object behaviors are mixed in (via mixins, traits, or templates) according to roles (the common examples are ATM withdrawal and deposit) which are implemented separately.<p>There would be a couple of benefits of this aside from the advertised ones: Automated tests are associated with the role bahaviors. Instead of testing all of the possible behaviors of an object, tests are targeted at the individual traits. Also, by separating the roles from the data it's easier to mock the data layer.<p>When code needs to be removed or refactored, it is easy to find the code (and tests!) involved. Adding features becomes less of a refactor, and more just adding traits.
pohl超过 15 年前
I thought MVP already supplanted MVC. I haven't wrapped my head around DCI yet, but my first question is whether this resembles MVP in any way.
CrystalBlood超过 15 年前
Claims to be the new modernized version of MVC, is it really promising?