January 28, 2006

Ruby on Rails with AJAX support

 Images RailsOne of my friends and collegues has started using Ruby on Rails and has now become a complete convert, so much so that everything can be done with Rails (short name). Rails is a complete web development stack for creating dynamic web applications with very little fuss and painful configuration that is synonymous with other web development stacks, such as J2EE. I was also pointed in the direction of script.aculo.us that provides AJAX support to Rails by using the Prototype JavaScript Library. Some of the examples at script.aculo.us are drag and drop shopping carts, auto-completing text boxes and pretty JavaScript animations.

Rails is built around using the Ruby programming language, which is easy to learn and quick to develop with. Doing things quickly is the moral of the story when developing with RAILS. By adding Prototype enabled scripts on the client end greater interactivity is created and by using AJAX pages no longer need to be fully reloaded speeding up the response times as only the data is sent through the AJAX bindings. One issue with adding all this JavaScript to the client web pages is that the HTML code can become littered with <script> tags; however, this can be solved by attaching the JavaScript events by using CSS selectors. For a description and example of this approach have a look at the Behaviour web page.

Rails and supporting scripts can all be downloaded from the links below. If you are developing on a mac you can download pre-compiled binaries from here. For Windows users a quick install can be downloaded from here.

Links
Ruby on Rails Homepage
script.aculo.us Homepage
Prototype JavaScript Library Home Page
Behaviour Page
Agile Web Development with Rails Book
Programming with Ruby Book
Rico Homepage (Addition JavaScript Libraries using Prototype)

Posted by Egon Kuster at January 28, 2006 11:38 AM