Featured Whitepapers
Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

Rails on the move in 2009

Rails 2.3 to feature performance optimization and memory savings

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

It is looking like a very busy year for the popular Ruby on Rails Web application development framework, with multiple enhancements anticipated in an upgrade due this month, followed by a merge later in the year with the Merb Web framework.

First on deck is the 2.3 release of the open source Rails framework, set to feature performance optimizations, customizable templates, memory savings, and the ability to write the most performance-dependent parts in Ruby. Rails 2.3 also features HTTP Digest Authentication, an API for authentication.

"It's getting pretty close to being done," with an expected release this month, says David Heinemeier Hansson, creator of Rails and a partner at 37signals, a Web application development company.

Rails 2.3 takes early advantage of Merb strengths While Rails 3, expected in an early format around May, serves as the merged Merb-Rails release, Version 2.3 in some ways serves as a precursor to version 3, with performance boosts brought over from Merb, Hansson says.

For example, the respond_to block capability in Rails, enabling an application to respond to a single request with HTML, XML, or JavaScript, has been made 8 percent faster in Version 2.3 by Yehuda Katz, the new Rails core team member coming over from Merb, Hansson says.

Other v2.3 changes are unrelated to Merb. For example, the new templates capability enables creation of templates already fitted with specific capabilities such as plugins, instead of just having a bare-bones, skeleton template, Hansson adds. A plugin could be added, for example, to ensure that an application is tested by the RSpec framework rather than the default Test::Unit framework. A pagination plugin also could be included in a template.

The Rack function in v2.3 serves as a piece of shared infrastructure, enabling different Ruby frameworks to work together more easily. A developer, for example, could add in to a Rails project a piece of an application built in the more lightweight Sinatra framework, Hansson says.

The Rails Metal capability in Rails 2.3 lets developers author part of an application directly in Ruby rather than in Rails, to boost performance. "Rails Metal is basically an assembler for Rails, where you throw away all the premade functions and so on that you normally have and use [it] to be extremely fast on a tiny part of your application," Hansson says.

Rails 3 to adopt best of Merb

As dramatic as some of the features are in version 2.3, Ruby 3 looks to be the bigger blockbuster upgrade. A release candidate is hoped for at the RailsConf conference in Las Vegas in May, Hansson says, though the development is early enough that he calls it "still in some ways vaporware."

But Hansson assures that Rails 3 will take full advantage of the competing Merb effort, which is now being merged into Rails. The Rails-Merb merger, announced on December 23, came about because the Rails and Merb teams basically realized they wanted the same things, Hansson says.

"All of the Merb guys are former Rails developers, and they started Merb because they had a number of issues that they cared about," such as performance optimization and agnosticism pertaining to frameworks used with Rails, Hansson says. For example, Rails has used Active Record for object relational mapping, whereas Merb proponents wanted to use DataMapper or Sequel, he adds.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.