为什么基于操作的 Web 框架占据主导地位?

发布于 2024-09-05 14:40:01 字数 528 浏览 6 评论 0 原文

大多数 Web 框架仍然使用传统的基于操作的 MVC 模型。控制器接收请求,调用模型并将渲染委托给模板。这就是 Rails、Grails、Struts、Spring MVC...正在做的事情。

另一类,基于组件的框架,如 Wicket、Tapestry、JSF 或 ASP.Net Web Forms 在过去几年中变得越来越流行,但我的看法是,传统的基于操作的方法更受欢迎。甚至 ASP .Net Web Forms 也成为了 ASP .Net Web MVC 的兄弟名称。编辑:也许我的看法是错误的,因为人们对 Wicket 的兴趣日益浓厚。如果我问 Google Trends,传统的MVC框架有更多的增长。

我认为使用这两种类型的框架构建的应用程序有很多重叠,所以问题是:为什么基于操作的框架如此占主导地位?

Most web frameworks are still using the traditional action based MVC model. A controller recieves the request, calls the model and delegates rendering to a template. That is what Rails, Grails, Struts, Spring MVC ... are doing.

The other category, the component based frameworks like Wicket, Tapestry, JSF, or ASP.Net Web Forms have become more popular over the last years, but my perception is that the traditional action based approach is far more popular. And even ASP .Net Web Forms has become a sibling name ASP .Net Web MVC. Edit: Maybe my perception was wrong because of the impression of increasing interest in Wicket. If I ask Google Trends, there is much more growth in the tradional MVC frameworks.

I think the kind of applications built with both types of frameworks is overlapping very much, so the question is: Why are action based frameworks so predominant?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

送舟行 2024-09-12 14:40:01

基于组件的框架,例如
Wicket、Tapestry、JSF 或 ASP.Net Web
表格变得越来越流行
过去几年

[需要引用]?

我严重怀疑这种说法。 MVC 已经接管了 .Net 博客/Twitter 领域。很难找到有人说“我们将在下一个项目中使用网络表单”。


MVC 更适合 Web 的无状态特性。组件框架是 Web 开发人员不想要的抽象。

the component based frameworks like
Wicket, Tapestry, JSF, or ASP.Net Web
Forms have become more popular over
the last years

[Citation Needed]?

I seriously doubt this claim. MVC has taken over the .Net blog/twitter sphere. Its really hard to find somebody saying "we'll use webforms for our next project".


MVC fits the stateless nature of the web better. Component frameworks are an abstraction web developers didn't want.

不再见 2024-09-12 14:40:01

为什么东西更受欢迎?它们有几个原因:因为良好的用户体验、快速的开发周期、最便宜的东西等等,

但有时是

最响亮

或最炒作的(rails,尽管它很棒;-))

或最傲慢的(苹果)

或最有影响力的东西积极的营销(微软)

将会获胜。

这就是所谓的进化。

顺便说一句:我和泰夫斯在一起。基于组件的框架将是最终的赢家(例如 GWT/Vaadin 或 wicket)。

Why are things more popular? They are several reasons: because of a good user experience, fast development cycle, cheapest things, etc

But sometimes

the loudest

or most hyped (rails, although it is great ;-))

or most arrogant (apple)

or the things with the most aggressive marketing (microsoft)

will win.

That is called evolution.

BTW: I am with Thevs. The component based frameworks will be the final winners (like GWT/Vaadin or wicket).

云淡风轻 2024-09-12 14:40:01

惯性。一旦你在一项技术上投入了大量资金,改变到更好的技术就会变得越来越困难。而且这并没有好 10 倍,因为那时每个人(甚至首席执行官)都会看到需要进行改变。

Inertia. Once you've invested a lot in one technology, it becomes progressively more difficult to change to something better. And it is not 10 times better, because then everyone (even the CEO) would have seen the change is needed.

黑白记忆 2024-09-12 14:40:01

我相信这是因为基于操作的框架使开发人员(和设计人员)能够更好地控制页面的外观。基于组件的框架试图(恕我直言,但没有成功)隐藏网络就是网络这一事实。他们试图让 Web 编程变得像对 WinForms 或 Cocoa 等本地桌面小部件工具包进行编程一样。

但网络与此非常非常不同。我认为基于行动的框架很受欢迎,因为它们认识到这一点。

编辑

显然有些人误解了我的意思,所以让我澄清一下。我不是批评在用户看来功能类似于桌面应用程序的网络应用程序。我对此绝对没有问题

我所说的是底层的编码方法和哲学。标签库系统中的每个标签都以某种方式呈现 HTML,类似于 Cocoa 或 WinForms 等桌面编程库中的小部件。有些系统允许您自定义呈现的 HTML,但这有时并不容易完成。它将呈现 CSS 类等,您对此几乎无法控制或必须付出特别的努力来控制。它假装是一个黑盒解决方案,但它不可能是,因为如果您想设计渲染的 HTML 样式或使用 JavaScript 定位它,您必须了解其结构等等。

I believe it's because action-based frameworks give developers (and designers) more control over the appearance of the page. Component-based frameworks try (unsuccessfully, IMHO) to hide the fact that the web is the web. They try to make web programming something like programming a native desktop widget toolkit like WinForms or Cocoa.

But the web is very, very different from that. I think action-based frameworks are popular because they recognize this.

EDIT

Apparently some people have misunderstood what I mean by this, so let me be clear. I'm NOT criticizing web application that appears to users to function like a desktop application. I have absolutely no problem with that.

What I'm talking about is the underlying coding methodology and philosophy. Each tag in a tag library system renders HTML in a certain way, analogous to a widget in a desktop programming library like Cocoa or WinForms. Some systems allow you to customize the rendered HTML, but this can sometimes be non-trivial to accomplish. It will render CSS classes and so on over which you either have little control or have to make a special effort to control. It pretends to be a black-box solution, but it cannot possibly be, because if you want to style the rendered HTML or target it with JavaScript, you have to understand its structure and so on.

零度℉ 2024-09-12 14:40:01

我怀疑开发人员正在使用 MVC 框架作为公开服务的简单方式,而不是作为基于操作的 Web 应用程序框架(这纯粹是我的猜测)。即他们将它们用于 AJAX 请求。我预测,基于操作的框架的概念将在未来几年内悄然消失,在这种情况下,(在某种程度上)MVC 的概念也会随之消失。

I suspect that developers are using MVC frameworks as a simple way of exposing services, not as action-based web app frameworks (this is pure speculation on my part). i.e. they are using them for AJAX requests. I would predict that the concept of action-based frameworks quietly goes away over the next couple of years, along with (to some extent) the concept of MVC in this context.

始于初秋 2024-09-12 14:40:01

我认为您只会看到这些框架。但大多数程序员使用内部(自定义)或更简单的框架模型(如 ExtJS 或 JQuery)并默默地完成他们的工作。

编辑:顺便说一句,我认为 MVC 模型正在尝试模仿旧的且可能过时的业务/表示分离模型,该模型是前段时间为遗留应用程序提出的。
我看不到这个模型的未来(2-3年后)。 AJAX 已经改变了您使用后端的所有方式。

I think you only see these frameworks showing all around. But most programmers use in-house (custom) or much more simple framework models (like ExtJS or JQuery) and silently do their job.

EDIT: By the way, I think MVC model is trying to mimc the old and probably obsolete business/presentation separation model which was proposed for legacy applications some time ago.
I see no future for this model (2-3 years from now). AJAX is already changing all the way you're working with backend.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文