I am planning to use mochiweb/erlang based server logic. Can I use GWT and JSON for client side development? Or do you recommend java script libraries like jQuery, PURE and Raphael?
2 Answers
Actually I disagree 100% with mblin, it is definitively possible to develop your frontend in GWT and use whatever type of backend for it. Because GWT can access any type of service through HTTP (effectively doing AJAX) you can call the backend as long as it exposes it's operations through HTTP (ideally using REST). Checkout http://code.google.com/p/gwt-rails/ which provides a foundation to combine GWT and rails, or http://www.gwtphp.com/ GWT+PHP.

- 8,281
- 1
- 21
- 16
-
+1 agreed. And both kinds of communication (GWT-RPC or not) have their pros and cons http://stackoverflow.com/questions/4906369/should-i-build-a-rest-backend-for-gwt-application/4906518#4906518 – Chris Lercher Feb 19 '11 at 08:06
-
Interesting projects, didn't know they existed. Guess the hackery is a little less arcane than I thought it would be. – mblinn Feb 20 '11 at 00:52
The whole point of GWT is that you can write your server-side and client-side code in Java, and have the framework compile that java to (supposedly optimized) javascript so it can run on the client. If you're clever enough, you could probably figure out how to make it work with a non GWT based server, but it would be an exercise in arcane hackery rather than practicality.
JSON is just a data interchange format that's a subset of javascript, and doesn't have much to do with GWT other than the fact that GWT can use it to transmit data.
Short version: no, there would be no reason to try to use GWT with an erlang server, unless you just want to hack around with stuff for fun.

- 3,264
- 17
- 15