GWT versus Rails

I recently got into a debate with a friend of mine about which is better for developing web applications – Google’s Web Toolkit (GWT) or Ruby on Rails. He argued for GWT, I for Rails. Neither one of us convinced the other, although we both got each other to watch the frameworks’ respective screencasts (GWT, Rails).

Disclaimer: I’ve done quite a bit of Rails, but not any GWT, and I’m rusty with Java. So I may be totally off base with some of my analysis, but that’s what the comments are for (besides, what else is new?).

Anyway, without further ado:

Advantages of GWT over Rails

  • It’s FAST. GWT is designed to be lightning fast, and as far as I can tell, it’s pretty much as fast as it’s going to get for an HTTP application.
  • It scales extremely well. Because GWT relies quite heavily on the browser, there are fewer HTTP requests to the server, and the requests themselves are smaller. The ImageBundle widget is a great example of this.
  • GWT gives you a toolbox of graphical user interface widgets to build your application with out of the box.
  • There’s compiling. That catches quite a few errors before deployment.
  • Java is a much more mature language than Ruby.

Advantages of Rails over GWT

  • Database support. It is very easy to work with almost any database in Rails with almost no configuration. Rails also gives you RDBMS-agnostic migrations so you can update your database without writing any SQL. In fact, you don’t even have to manually create any tables in your database – Rails will create migrations for you to do that when you create your models. GWT has none of this as far as I can see.
  • Multiple Environments. Rails supports as many environment types as you can think of. Out of the box they give you basic code for a development environment, a testing environment (more on this later), and a production environment. This includes different database connection strings for each. Simply change RAILS_ENV to whatever environment you’re in.
  • Ruby is a much easier language to learn and work with. It’s also much lighter-weight as far as the amount of code you have to write.

This post may get updated as I think of more pros and cons for each. Stay tuned!



6 Comments on “GWT versus Rails”

  1. Anonymous says:

    Database support rails: gwt with hibernate has the same features.

  2. YodaYid says:

    ActiveRecord for Rails is much easier to use than Hibernate. You don’t have to specify getters and setters, for example – Rails figures them out automatically. There appears to be much more configuration involved with Hibernate. You need a mapping file to map each of said getter/setter functions to its corresponding database column. Again, Rails does this for you automatically.

  3. Tio Malandra says:

    1- I assume you don’t know Hibernate Annotations: It’s easier than ActiveRecord and much more Object Oriented.
    2- Comparation of GWT with Rails y like comparation of tangerines and oranges: Rails is server side technology and GWT is client side, you can use GWT with Rails in the same application.

  4. YodaYid says:

    Tio – you’re right – I didn’t know about Annotations. They’re a big step up from Hibernate Core. I wouldn’t say that they’re easier to use than ActiveRecord though.

    If I was to start a new web project today, I would basically decide whether to go with Rails or GWT. In that sense they’re certainly comparable. I haven’t found any documentation on how to get the two to communicate.

    Thanks for the comments!

  5. Ilya says:

    Client-side GWT can work with any programming language if you use the same serialization method (JSON or XML).

  6. YodaYid says:

    Thanks – I guess I thought GWT had more of a server-side component than it does.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s