GWT versus RailsPosted: June 20, 2007
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!