客户端MVC与服务器MVC [英] client-MVC vs server-MVC
问题描述
我希望从其他用户那里得到一些有关服务器端MVC好处的信息.拥有许多JavaScript库的强大功能.服务器端MVC服务器又有什么用呢?
I am looking to get some input from other users on the benefits of server-side MVC. With the power of many javascript libraries. What good purpose does server-side MVC server anymore?
您可以轻松地将客户端MVC与模板和REST API结合使用,以创建更具适应性的应用程序,而为较小的更改而重新加载整个页面的开销则较小.
You can easily use client-side MVC with templating and a REST API to make a much more resposive application with less overhead of reloading a whole page for minor changes.
推荐答案
服务器MVC的优点:
- 成熟.
- 广泛采用.
- 大多数代码都在服务器内部,因此应该更加安全.
但是肯定的趋势是回到客户端/服务器计算,而不是用C或其他语言编写的胖客户端,但是现在您有了一个非常不错的平台:浏览器.
But definitely the tendency is to back to client/server computing but instead of fat clients written in C or another language but now you have a very nice platform: The browser.
关于何时使用服务器端MVC和客户端MVC,我有一个简单的政策:
I have a simple policy about when I use Server side MVC and client side MVC:
- 很少互动的休闲用户:Server + Ajax.
- LOB应用程序(会计,ERP,CRM等):客户端.
顺便说一句,我将Java Server Faces用于#1,将ExtJS由JAX-RS服务备份用于#2.
BTW I use Java Server Faces for #1 and ExtJS backed up by JAX-RS services for #2.
致谢.
这篇关于客户端MVC与服务器MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!