开发者

'Best' server with Google Web Toolkit?

What is the 'best' server-side technology on Linux to use with Google Web Toolkit & why? I'd like opinions about:


GWT is a client side technology used to convert Java to JavaScript.

If you want to use GWT as a client code for a client-server application you should use a Java based server to avoid problems.

You can use the GWT-RPC with any language or you can even use your own JSON wrapping, but the easier solution is to use a Java server.

My recommendation would be GAE, TomCat or Jetty. Both Tomcat and Jetty are really easy to configure in Linux and TomCat integrates nicely with Eclipse.


The server technology has very little to do with it; use whatever you're most comfortable with.

If you want to take advantage of GWT-RPC to pass Java objects between browser and server, you'll obviously need a server written in Java, but any Java server container will work more or less the same.

If you don't care about GWT-RPC, your server can be in any language, Python/Django, .NET/ASP, PHP, Rails, anything. At that point you're just going to be hosting JavaScript files, even static hosting should work for you.

You could even write a GWT app that doesn't connect to a server at all, where the user downloads the JS directly, perhaps packaged as a Chrome extension.


The path of least resistance will be a Java servlet container like Apache Tomcat or Jetty. The GWT servlets are deployed in the servlet container, and call into your own code for the purpose of persistence and other server-side application logic. All of the presentation logic should reside in the client-side GWT code.

May I also recommend that you take a good look at the Scala programming language? It integrates very neatly with Java, and is therefore a perfect language in which to write your server-side logic.

In terms of client-server communication, I recommend gwt-dispatch to you. It has a good following, and streamlines the handling of requests and responses on both the client side and the server side.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜