DWR 是 MVC 吗?

发布于 2024-08-11 10:54:52 字数 353 浏览 7 评论 0原文

几天前,我开始阅读有关 DWR 的内容。它与我迄今为止所研究的通常的 Web 应用程序技术(理解为大量的 Struts)有着显着的不同。人们总是想到一个问题:DWR 真的能取代 MVC 吗? 人们可能会争论 MVC 的可用性,但像 Struts 和 JSF 这样更成熟的框架在 MVC 中提供了很多工具。验证、解释器(struts2)等。

根据我从少量阅读中对 DWR 的理解,如果我能用几句话来概括的话,那就是它只不过是“RPC over HTTP”。那么,我们真的可以用 DWR 来替代 MVC 架构吗?

I started reading about DWR few days back. Its strikingly different from the usual web-app technologies I have worked on till date (read as huge amount of Struts). One question that invariably comes to mind is can DWR really replace MVC ?
One may argue about the usability of MVC but the more mature frameworks like Struts and JSF give lots of tools in the MVC. Validation, interpretors(struts2) etc..

From whatever I have understood about DWR from my little reading and if I can put it down in few words is that its nothing but say 'RPC over HTTP'. so, Can we really replace a MVC architecture with DWR ?

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

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

发布评论

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

评论(1

泛泛之交 2024-08-18 10:54:52

就像你说的,DWR 基本上是“RPC over HTTP”。它是一个库,可以轻松地从(浏览器端)JavaScript 调用(服务器端)Java 代码。它不会取代 MVC 架构(它也不需要 MVC 架构),就像日志框架或 JDBC 取代(或要求)MVC 架构一样。

Like you say, DWR is basically "RPC over HTTP". It is a library that makes it easy to call (server-side) Java code from (browser-side) JavaScript. It does not replace a MVC architecture (it also does not require one), any more than a logging framework or JDBC replaces (or requires) a MVC architecture.

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