Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT and Ruby on Rails

We have RoR application and we are planning to make js interface(extjs or closure) in new version. Is it possible to use GWT with RoR?

like image 587
Andrey Kuznetsov Avatar asked Jul 21 '10 13:07

Andrey Kuznetsov


People also ask

Is Ruby on Rails still relevant 2022?

Ruby on Rails is still relevant in 2022 and will stay relevant for a few years to come. It is a simple and powerful platform to build rapid prototypes, MVP, and any kind of web application/service. It reduces the development time and helps you hit the market in a really short time.

What is the difference between Ruby and Ruby on Rails?

Ruby is an open source, object oriented general-purpose programming language, whereas Ruby on Rails is an open source web development framework. As a programming language, Ruby has its own 'syntax' or language, as well as unique rules for its use and application.

What is Ruby on the Rails used for?

Rails is a development tool which gives web developers a framework, providing structure for all the code they write. The Rails framework helps developers to build websites and applications, because it abstracts and simplifies common repetitive tasks.

Is Ruby on Rails still used?

Ruby's and Ruby on Rails' Overall Popularity Although way behind main contenders, such as PHP or Python, Ruby still makes the cut for the 20 most popular programming languages list in 2022. The 2022 edition of Stack Overflow Annual Developer Survey also places RoR in a similar spot.


3 Answers

Yes, using GWT with RoR is perfectly possible. Client server communication will be by JSON, which RoR can easily produce. GWT works best when you're creating a client side app in HTML/JavaScript/CSS, if you want progressive enhancement of an existing HTML UI jQuery etc. might be a better choice.

like image 115
user398051 Avatar answered Oct 19 '22 15:10

user398051


As this is still the accepted answer, decided to update with more modern approaches

RESTful API

The tooling for creating and consuming API's has improved markedly.

  • Creating REST JSON API from RoR is simple. Basically set controller to respond to a JSON request and serialise model to JSON

  • Consuming REST API from GWT has a good Stack Overflow answer how-to-call-restful-services-from-gwt

RoR to GWT RPC project (very dated)

The http://code.google.com/p/gwt-rails/ project is intended to provide easy to use RPC between RoR backend, and GWT UI.

like image 6
Jayfang Avatar answered Oct 19 '22 16:10

Jayfang


You can, but you won't have the nice RPC mechanism available with java based servers. You'll probably have to use RequestBuilder class to pass data to the server & back.

like image 2
Bogdan Avatar answered Oct 19 '22 14:10

Bogdan