RealTime IT News

Rails 3 Gets Supersized With Merb

The Ruby on Rails (RoR) open source framework is about to get more modular and faster -- thanks to some benefits of its recent merger with Ruby rival Merb.

With the upcoming RoR 3 release, Rails will be poised to deliver new features and functionality to the popular framework's users, which has won converts among developers at high-profile sites like Twitter.

For one thing, Rails 3 will bring in customization features from Merb, which had been a key area where Merb had the upper hand.

Work on the new Rails release comes as rival open source frameworks, like PHP's Zend Framework, continue to ramp up their own respective efforts for rapid application deployment.

Yehuda Katz, former leader of the Merb project and now a core Rails 3 developer, explained to InternetNews.com that Rails 3 is now really starting to take shape.

Ruby on Rails and Merb Developer Yehuda Katz
Yehuda Katz
Source: Engine Yard
Katz noted that Ruby is already a powerful language and easy to hook into, but with Rails 3, the goal is to make it easier.

"The first stage of the work so far has been on refactoring and reworking the existing code base," Katz said. "We have been focused on making it possible for plug-in developers to hook into Rails."

The e-mail system in Rails is also being re-vamped in Rails 3. Katz commented that currently Rails developers have to write a lot more code then they should in order to send e-mails.

Performance is also a key area of focus for RoR 3.

"Rails is already great on performance and is much faster than PHP, but there is work we can do to make it even faster," Katz said.

Faster, however, is a difficult term to define in absolute terms for Katz. He explained that the Rails team is working on a metric that he hopes will make sense to developers, to better show which specific attributes and function of Rails 3 will be faster than Rails 2 -- and by how much.

Rails Mashups?

Another key attribute of Rails 3 will be its ability for one application to include elements of other Rails applications. Katz noted that, to some degree, it is already possible to do -- but the full drag-and-drop modularity isn't fully integrated.

"Just dropping in a calendar is easy, but then making it look like the rest of your application isn't," Katz said.

The Merb Framework that Katz is bringing to Rails was known for being a more configurable alternative Ruby approach. Now that Merb is part of Rails 3, the same granular control and customization will be coming to Rails.

"With Merb, there was no contradiction between being configurable and also having good defaults," Katz said. "That philosophy is still the same with Rails."

Twitter on Rails

Currently, one of the most high-profile Rails sites is microblogging phenom Twitter.

While Twitter's popularity has caught the attention of nearly everyone in the industry, the site hasn't enjoyed the greatest reputation for stability: As Twitter has grown, users have found themselves encountering the so-called "fail whale" -- a notice about the site being inaccessible -- as the service tries to deal with its booming traffic.

But Katz said the problems typically aren't due to any Rails-related shortcomings.

"I think at this point, their Web site is not really their problem," said Katz, who added that he and Rails team know and have had meetings with the Twitter developers. "The vast majority of traffic comes through their API. Rails seems to be serving them well and Rails already has facilities for Web site tuning."

Katz noted that those that use Rails at massive scale like Twitter, tend to use advanced techniques like caching and HTTP optimization techniques. But that complexity isn't necessarily something that Katz and his team want to encourage.

"The thing is, in order to implement those kinds of techniques, you have to be a relatively high-skilled Ruby programmer," he said. "The next step for Rails is so that we don't have to enlist the developers in improving performance -- we can do it in the framework and spread the improvement to everyone using Rails."

Ruby on Rails 3 is currently in active development and Katz expects that the final release will be out later this year.

"The technical part is challenging but not insurmountable. It's just a matter of doing it," Katz said. "My personal goal is the end of the year, but the answer that I'm supposed to give as an open source developer is that it will be ready when it's ready."