简体   繁体   English

GWT 应用程序的服务器端

[英]The server side of GWT application

Is it possible to write a server side of GWT application in other languages then Java if yes how to use GWT-RPC mechanism, an sample code please是否可以用其他语言编写 GWT 应用程序的服务器端然后 Java 如果是如何使用 GWT-RPC 机制,请提供示例代码

Thanks谢谢

Please read the GWT documentation Communication with the Server :请阅读 GWT 文档与服务器通信

If you can run Java on the backend and are creating an interface for your application's server-side business logic, GWT RPC is probably your best choice.如果您可以在后端运行 Java 并为应用程序的服务器端业务逻辑创建接口,那么 GWT RPC 可能是您的最佳选择。 [...] [...]

If your application talks to a server that cannot host Java servlets, or one that already uses another data format like JSON or XML, you can make HTTP requests to retrieve the data. If your application talks to a server that cannot host Java servlets, or one that already uses another data format like JSON or XML, you can make HTTP requests to retrieve the data.

You can write your server in any language you choose, GWT is just JavaScript to be run in your users' browsers.您可以使用您选择的任何语言编写服务器,GWT 只是 JavaScript 可以在您用户的浏览器中运行。

If you decide to go that route, you should look into using RequestFactory to communicate with your server instead of GWT-RPC, which is Java-specific.如果您决定 go 该路由,您应该考虑使用RequestFactory与您的服务器通信,而不是使用 Java 特定的 GWT-RPC。 RequestFactory uses standard JSON, which any language can read/write. RequestFactory 使用标准 JSON,任何语言都可以读/写。

Dont waist your time with GWT-RPC.不要浪费时间使用 GWT-RPC。 It's bad.这不好。 Use RequestFactory.使用请求工厂。 I am surprised people are promoting GWT-RPC.我很惊讶人们正在推广 GWT-RPC。 It's a broken toy.这是一个坏掉的玩具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM