The Artima Developer Community
Sponsored Link

Java Community News
Ruby on Rails 1.2 Release Candidate Available

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Ruby on Rails 1.2 Release Candidate Available Posted: Nov 24, 2006 12:15 PM
Reply to this message Reply
Summary
In the upcoming 1.2 release, Ruby on Rails, the popular Web application framework, adds support for REST-style applications as well as an easier way to work with Unicode and multi-byte character sets. Additional features simplify rendering different templates from the same controller, such as XML or HTML.
Advertisement

Although REST has gained a loyal following since Roy Fielding first formulated key principles of that Web architecture style, support for building RESTful Web applications has been lacking in popular developer tools. With the upcoming 1.2 release, Ruby on Rails may become a serious contender among RESTful development tools.

In his keynote at RailsConf earlier this year, Ruby on Rails creator David Heinemeier Hansson highlighted the benefits of RESTful Web interfaces, not only in contrast with SOAP-based Web services, but even when building Web applications that likely are accessed only via a browser interface.

Rails 1.2 makes the creation of RESTful interfaces automatic with a new code generator. According to Hansson's recent blog post on Rails 1.2: Release Candidate 1:

Start thinking about how your application could become more RESTful. How you too can transform that 15-action controller into 2-3 new controllers each embracing a single resource with CRUDing love. This is where the biggest benefit is hidden: A clear approach to controller-design that’ll reduce complexity for the implementer and result in an application that behaves as a much better citizen on the general web.

To help the transition along, we have a scaffold generator that’ll create a stub CRUD interface, just like the original scaffolder, but in a RESTful manner. You can try it out with script/generate scaffold_resource.

The scaffold_resource code generator outputs a controller with several RESTful methods, including those for HTTP's GET, POST, PUT, and DELETE methods. Rails 1.2 also maps those controller methods to appropriate, RESTful URLs.

The 1.2 release also adds better support for Unicode and multi-byte character sets:

While Rails has always been able to store and display Unicode with no beef, it’s been a little more complicated to truncate, reverse, or get the exact length of a UTF-8 string. You needed to fool around with KCODE yourself and while plenty of people made it work, it wasn’t as plug’n’play easy as you could have hoped (or perhaps even expected).

So since Ruby won’t be multibyte-aware until this time next year, Rails 1.2 introduces ActiveSupport::Multibyte for working with Unicode strings. Call the chars method on your string to start working with characters instead of bytes.

What do you think of the direction Rails is heading in its REST support? Do you agree with Hansson that a RESTful interface leads to cleaner controllers?

Topic: Insane Project Releases 1.1 Version of Java Heap Analysis Tool Previous Topic   Next Topic Topic: Scott Violet Releases Extreme Swing GUI Makeover Code

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use