burton miller
unread,Feb 20, 2008, 12:20:15 PM2/20/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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.