经验集成Spring MVC 3与GWT? [英] Experiences with integrating spring 3 mvc with GWT?

查看:182
本文介绍了经验集成Spring MVC 3与GWT?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于:   Spring 3.0的MVC具有优良的REST支持与再presentation一个是JSON。

Given: Spring 3.0 mvc has excellent REST support with one of the representation being JSON.

GWT简化了开发的用户界面是Java开发。但默认情况下它使用的RPC客户端服务器交互。但是,有一个选项使用JSON。

GWT simplifies development as UI is developed in java. But by default it uses RPC for client server interaction. But there is an option to use JSON.

问题:

  1. 您可以使用Spring 3.0的MVC使用GWT分享经验?

  1. Can you share experiences with using Spring 3.0 mvc with GWT ?

什么是最好的方式来整合这两个框架?

What is the best approach to integrate these two frameworks?

是默认的GWT的MVP架构仅在客户端和它使用JSON的工作呢?

Is the default GWT's MVP architecture only for client side and does it work well with JSON?

感谢

推荐答案

你能使用Spring 3.0的MVC使用GWT分享经验?

是的。我们已经成功地建立在GWT和Spring MVC整体大型应用程序(1500源文件,6个月的开发)。

Yes. We've successfully built a whole large application around GWT and Spring MVC (1500 source files, 6 months in development).

春季的关键是项目成功的关键。只有春天,我们能够单独测试某些部分的应用程序在服务器端。

Spring was the key to the project's success. Only with Spring we were able to test individually some pieces of the application on the server side.

什么是最好的办法娶这两个框架?

忽略使用GWT默认的servlet,而是创建自己的春天控制器来处理传入的GWT-RPC请求。这博客文章是关键整合两家的技术人员。

Ignore the default Servlet used by GWT and instead create your own Spring controller to handle incoming GWT-RPC requests. This blog post was the key to integrating the two techs.

我们还成功地集成其他组件:Flash进行动画图表和第三方JavaScript组件用于其他的东西。这些通过JSON服务器通信。所以,你有两种或两种以上的网址:

We also successfully integrated other components: Flash for animated charts and third-party Javascript components for other stuff. These communicate with the server through JSON. So you have two or more kinds of URLs:

  • *。RPC 的网址是GWT组件和由Spring控制器GWT供应
  • *。JSON 的网址是其他组件和另一个春天控制器供应。
  • the *.rpc urls are for GWT components and are served by the Spring controller for gwt
  • the *.json urls are for other components and are served by another Spring controller.

此外,在我们的例子中,我们避之唯恐不及与注解配置,而不​​是$用好老的Spring XML文件p $ pferred配置。他们使它更清楚发生了什么。除了 @Required 注释;这是伟大的发现应连接,但不是那个春天豆。

Also, in our case, we shunned configuration with annotations and instead preferred configuration with the good old Spring XML files. They make it much more clear what's going on. Except for the @Required annotation; it's great to find spring beans that should be connected but aren't.

是默认的GWT的MVP架构仅在客户端和它使用JSON正常工作?

GWT的MVP架构效果最好,如果你遵循的指导线。使用GWT-RPC通信作为谷歌建议。

GWT's MVP architecture works best if you follow the guide lines. Use GWT-RPC communication as Google suggests.

您仍然可以有JSON用于其他客户端组件。

You can still have JSON for other client-side components.

这篇关于经验集成Spring MVC 3与GWT?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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