Now GWT is not a straight out replacement for DWR. It's default usage is to have everything coded in Java (client UI and server side). This might be something prefferable to DWR's way of doing things. However if it's not, and you'd like to use GWT in a fashion more similar to DWR, you can have your javascript code / functions and your GWT Java classes, and you can call js functions from Java via GWT's JSNI API:
发布评论
评论(3)
我使用spring和jquery,每个请求都可以映射到一个特定的方法。相比 dwr,我更喜欢它。
Ajax 和 Spring。
I use spring with jquery, each request can be mapped to a specific method. I prefer it over dwr.
Ajax and Spring.
您可以尝试一下 Google Web Toolkit,目前它已经足够成熟,拥有所有不错的功能并且没有烦人的错误:
http://code.google.com/intl/fr-FR/webtoolkit/
现在,GWT 并不是 DWR 的直接替代品。它的默认用法是用 Java 编码所有内容(客户端 UI 和服务器端)。这可能比 DWR 的做事方式更可取。但是,如果不是,并且您想以更类似于 DWR 的方式使用 GWT,您可以拥有 javascript 代码/函数和 GWT Java 类,并且可以通过 GWT 的 JSNI API 从 Java 调用 js 函数
: href="http://code.google.com/intl/fr-FR/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html" rel="nofollow">http://code.google.com/intl/fr-FR/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html
You can give Google Web Toolkit a try, at this point it's mature enough to have all the decent features and no annoying bugs:
http://code.google.com/intl/fr-FR/webtoolkit/
Now GWT is not a straight out replacement for DWR. It's default usage is to have everything coded in Java (client UI and server side). This might be something prefferable to DWR's way of doing things. However if it's not, and you'd like to use GWT in a fashion more similar to DWR, you can have your javascript code / functions and your GWT Java classes, and you can call js functions from Java via GWT's JSNI API:
http://code.google.com/intl/fr-FR/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html
您可以使用 JSON-RPC
You can use JSON-RPC