With Ruby on Rails 2.0 just a week old, developers already are weighing in with what they like or dislike about the new release.
Ruby on Rails creator David Heinemeier Hansson announced the release of Ruby on Rails 2.0 on Dec. 7 to a developer base set on seeing the next big thing regarding the popular Web development framework. Chief among the changes in Rails 2.0 are enhanced security and support for REST (Representational State Transfer).
Steven Beales, chief software architect at Medical Decision Logic, also known as Mdlogix, in Baltimore, said Mdlogix has been using the EdgeRails releases of Rails and had already incorporated many of the Rails 2.0 features into its Rails-based solutions. Mdlogix develops a clinical research management system based on Rails.
Beales said the most useful features of Rails 2.0 for Mdlogix have been Partial Layouts, which reduce CSS (Cascading Style Sheets)/html duplication by allowing parts of pages to use common layouts, RESTful Routing Updates, which allow “prettier” URLs for custom actions, Asset Caching, which provides new tags for compressing JavaScript easily, Initializers, which separate out custom configuration into separate initializer files, and Fixtures, which provide support for using fixture names in other fixture files to relate fixtures.
However, “As important as what was added to Rails 2.0 is what was removed,” Beales said. “Earlier Rails support for pagination and form tags that were less successful than newer techniques have been removed from the Rails core, which should make it easier for newer Rails developers to follow best practices.”
Click here to read more about Ruby on Rails 2.0 and its enhancements.
Simply put, Beales said RoR (Ruby on Rails) is the most productive tool Mdlogix has for developing simple-looking Web applications with advanced functionality.
“We are engaged to build the Johns Hopkins Clinical Research Management System, and after experimenting with the usual suspects—J2EE [Java 2 Platform, Enterprise Edition], .Net, MDA [model-driven architecture], PHP, ColdFusion—we found that only RoR provided the development speed of PHP or ColdFusion with the powerful functionality and maintainability of J2EE or .Net.”
Ola Bini, a London-based developer with ThoughtWorks and a contributor to Sun Microsystems’ JRuby effort, said what he likes most about Rails 2.0 is that it has been “slimmed down” a bit.
“Stuff like extracting most of the database adapters, and making it uniform how they’re loaded from gems, makes it much easier to handle,” Bini said. “Rails 2.0 doesn’t really include anything revolutionary for me. It’s a lot of small things that makes life easier. Stuff that you could do before, but with a bit of pain—like HTTP authentication; that’s just there now,” he said.
Bini said the indications he gets suggest that the Rails framework is simply getting more mature.
“The focus has been on security, performance, profiling,” he said. “Also, making it even easier to create cleaner Rails applications” is a plus, Bini added. “Overall, there are nice things that have been added and they will make our lives easier.”
Mike Subelsky, a freelance developer and member of a Baltimore-based Ruby on Rails user group known as B’more on Rails, said he also has been working with EdgeRails so he had been able to use Rails 2.0 before most users.
Page 2: Rails 2.0 Users Give Thumbs Up
“What stands out about Rails 2.0 for me is that most of the changes it’s introduced have allowed me to get rid of my own code,” said Subelsky, who signs his e-mails with the title, “Hacker & Improviser.”
Subelsky said the built-in support for HTTP Basic Authentication meant, “I could throw away a couple of custom methods I had written to do that. It includes a helper for creating hyperlinks that go ‘back’ to the previous page a user was looking at. That’s not hard to code yourself, but now that it’s built into Rails, that’s three fewer lines of code I have to maintain.”
Subelsky said he had a lot of experience working with other scripted languages, like Perl, “but I found Ruby’s elegance very appealing. I had tried developing Web apps using things like Struts and really didn’t enjoy it, but with Rails, I was having a blast.”
Chris Selmer, director and chief evangelist at Intridea, a software product development company focused on Web applications, said that as early an early adopter, Intridea has contributed code toward the creation of Rails 2.0.
One of the enhancements to Rails 2.0 that is key to Selmer is how the new version makes it easier to support multiple output formats with multiview enhancements, Selmer said.
Using the same back-end code, a developer can easily create output formats for a variety of platforms, he said.
To read about a CodeGear IDE for Ruby on Rails, click here.
“For example, you could use the same back-end code, and then have different output formats for a normal Web browser, for an iPhone and for an RSS reader,” Selmer said. “This could have been [done] in the past, but Rails 2.0 provides new features that make this type of cross-platform development much simpler.”
Selmer also cited Rails 2.0 enhanced security to guard against CSRF (Cross-site Request Forgery) attacks. “And Rails 2.0 also includes new database caching mechanisms to help speed up your applications,” he said.
Adam Bair, a senior developer at Intridea, said Rails 2.0 doesn’t introduce major changes, but instead many smaller ones that fine-tune, optimize and increase productivity.
“These changes combine to make this release feel very polished and many of them have a positive impact on my daily development routine,” Bair said. “One example of this is a feature called ‘Sexy Migrations.'”
Joseph Gusmano, a student developer and member of the B’more on Rails group, said, “I anticipate that the most significant changes will be replacing SOAP [Simple Object Access Protocol] with REST, and having a new default session store, CookieStore. I think these will make the job of the casual programmer and student like me a lot easier, but maybe they will not please production programmers and people who need higher security.”
Eric Carr, also a B’more on Rails member, said he had seen one of Hansson’s screencasts about creating a blog in 10 or 15 minutes using Rails, and, “I have been salivating ever since.”
Check out eWEEK.com’s Application Development Center for the latest news, reviews and analysis in programming environments and developer tools.