是否有一个原因,我将使用MVC淘汰赛淘汰赛,而不是JS的? [英] Is there a reason I would use Knockout MVC instead of Knockout JS?

查看:272
本文介绍了是否有一个原因,我将使用MVC淘汰赛淘汰赛,而不是JS的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

另一位用户建议淘汰赛MVC 处理一些AJAX张贴问题。我读了一点就可以了,我看到它是一个包装周围淘汰赛JS 。所以我不知道是什么,两者之间的差异?我不屑于与淘汰赛JS 因为淘汰赛MVC 的存在?当我将使用一个比其他?

Another user suggested Knockout MVC to handle some AJAX posting issues. I read a little on it and I see it is a wrapper around Knockout JS. So I wonder what are the real differences between the two? Should I bother with Knockout JS since Knockout MVC exists? When would I use one over the other?

推荐答案

淘汰赛MVC是WebForms的的私生子。它路由通过控制器动作的所有视图模型的方法,即会发生有反弹到服务器和背面的一切。我不明白为什么有人会采取像淘汰赛的框架,其目的是将客户端MVVM,并迫使它要求每一个功能的服务器。

Knockout MVC is the bastard child of WebForms. It routes all viewmodel methods through controller actions, meaning everything that happens has to bounce to the server and back. I cannot understand why anyone would take a framework like knockout, which is intended to be CLIENT SIDE MVVM, and force it to call the server for every function.

在另外,在执行服务器上的那些方法指的整个视图模型的需要被传递给服务器,并返回给客户端,对于每一个函数调用。的这是令人难以置信的浪费。

In addition, performing those methods on the server means the entire viewmodel needs to be passed to the server, and back to the client, for every function call. This is incredibly wasteful.

使用MVC淘汰赛意味着牺牲客户端code的所有性能优点不必写javascript的利益。同样权衡的WebForms的。这不是一个好。这是一个反模式。

Using Knockout MVC means sacrificing all the performance benefits of client-side code for the benefit of not having to write javascript. The same trade-off WebForms made. It is not a good one. It is an antipattern.

如果MVC淘汰赛明天死去,网络将是一个更好的地方。

If Knockout MVC dies tomorrow, the web will be a better place.

这篇关于是否有一个原因,我将使用MVC淘汰赛淘汰赛,而不是JS的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆