Easy way to use GWT with Rails

6 views
Skip to first unread message

burton miller

unread,
Feb 20, 2008, 12:20:15 PM2/20/08
to gwt-on-rails
the instructions jon has given to integrate your GWT and Rails
projects is detailed and brilliant.

however, you may want to keep you client and server code more
distinct, instead of closely integrating them. that is what i am
doing on my project, where we are not sure that we will stick with
rails server forever.

so - we are using a simple protocol where rails controllers are called
via com.google.gwt.http.client.RequestBuilder, using POST, and
ordinary parameters for simple data. structured parameters and return
values are JSON objects. there is a little overhead in doing things
this way, but you can use utility classes to take a lot of the pain
away.

if you are doing things this way, then you can just DROP YOUR GWT
BUILD INTO THE PUBLIC RAILS DIRECTORY AND IT WORKS.

i have configured the utility classes that i use to make requests to
detect if it is my development environment or the rails environment.
i use a simple proxy server that forwards requests in development
mode, and plain http (ajax) requests when in Rails mode.

if there is any interest, i will post more details, along with some of
the utility code for this. this solution requires very little code
and configuration, but you do have to deal with JSON objects.

Jiawei

unread,
Feb 21, 2008, 8:24:42 PM2/21/08
to gwt-on-rails
I am looking forward to your next post!
Reply all
Reply to author
Forward
0 new messages