It’s time to upgrade to Ruby 1.8.2, folks. Rails 0.10.0 includes various bits that require this version of Ruby, so if you want to run the latest Rails, you’ll have to get on the latest Ruby too. You’ll be glad you updated anyway. Ruby 1.8.2 contains a year’s worth of fixes, additions, and goodies from the Ruby masters. It’s an insult to them if don’t get jiggy with the goods (and Rails developers have other things to worry about that testing across old Ruby versions). Oh, when you upgrade, be sure to patch test/unit.
David Young from the San Francisco start-up Joyent are looking for 4 developers with Rails experience:
We’re looking for four exceptional people, they should have deep experience writing good GUI applications and/or understand the integration of various open-source server products including mail, calendar, directory, samba, and rails. Some experience with Mozilla’s XUL is a big plus (it’s a bigger plus if they understand why XUL isn’t a complete solution). We will provide relocation (and visa, etc. sponsorship) assistance, but relocation is not necessary for the first phase. If desired, relocation would happen in the September, 2005 timeframe.
If you’re interested, get in touch with david at joyent dot com.
We’re plowing through the road map at lightning speed with the release of Rails 0.10.0. There’s so much good stuff in here this time it’s really hard to pick just a few bits to focus on for the overview, but still I have. With Rails 0.10.0, you’ll get:
- Routing: Pretty URLs of all flavors and fashions can now be specified using an easy to understand Routing syntax made in Ruby. This means no more wrestling with mod_rewrite in Apache to get custom URL schemes. It means you’re not bound to the traditional /controller/action/id form (the controller and action names don’t even have to be part of the URL!). It also means that the URL parsing and generation is handled by the same configuration, which removes all the labor previously involved in getting your Ruby code to sync with your rewrite rules. That makes it possible to share the same URL configuration across all the web servers supported by Rails. You can seemlessly develop your application on WEBrick and without changes move it to Apache or lighttpd. Read more in the Routing book, see a bunch of routes explained, or dig into the ActionController::Base#url_for API documentation.
- Web Services: Action Web Service is a whole new add-on framework for Action Pack that enables SOAP with WSDL and XML-RPC web services to be made with Rails ease. You can either describe an existing controller with an API, and let the clients interact with the same methods used to do the HTTP interface, or you can create dedicated service classes that can be bound to a controller. In addition to the support for building web services, we’ve also added convenient wrappers for calling other web services from your application. For getting started, there’s a whole book on Action Web Service that explains how to define, implement, and interact with the web serivce APIs. We also got examples using the GoogleSearch API and the metaWeblogApi.
- Components: With components it’s possible to call other actions and controllers for their rendered response while executing another action. You can either delegate the entire response rendering or you can mix a partial response in with your other content. This makes it possible to package functionality in reusable parts and to keep more DRY on application elements that integrate from many sources (like a dashboard). To learn more about components, we have another book, a video showing how to make and call components, and the API docs.
- Oracle: In addition to the existing adapters for MySQL, PostgreSQL, SQLite, SQL Server, and DB2, we now also support Oracle as a database option for Active Record. The adapter that made it in is built on top of OCI8 and has been confirmed to work great with Oracle 8i and 9i. Our sixth database adapter is documented in the API.
Honoring Nicholas Seckar and Leon Breedt
The two most important features in this release has been contributed to two relative newcomers to the Rails scene. Nicholas Seckar tried at least three attempts at Routing before we found the one that felt like the best Rails fit. He put an enormous amount of energy into sorting out all the complications and have since helped to improve all parts of Rails. You’ve done a superb job, Nicholas. May potential employeers looking for talent see your name.
Equal thanks goes to Leon Breedt that popped out of nowhere with a whole new framework that followed our established conventions and approach to the dot. The quality of the code and documentation has made a big impression on the existing team of core contributors. And the work has contributed to make us all the much closer to 1.0. Thanks for the excellent work, Leon!
So how far away is Rails 1.0?
Rails 1.0 moved much closer today as we knocked off well over half of the previously announced road map. What we primarily lack now is Packaging and Performance alongside the aim to bring the number of uninvestigated and/or fixed fault tickets down to zero. The current tentative date is end of March/start of April.
Upgrading from Rails 0.9.5 to 0.10.0
If you don’t have any custom URLs defined in your existing application, then it’s a fairly straight forward process to upgrade. If you do have custom URLs, it’s a bit more work, but definitely manageable. Basecamp used a lot of custom URL tricks and it took me under an hour and resulted in 100 lines of code being stripped from the application. In any case, we’ve created a book to guide the upgrade process.
Matt Grayson is another Python programmer that despite his love for Python “…haven’t done much Python lately”. He blames Rails, which he declares “…is worth the hype.”. On the prospect of seeing Python on Rails, he offers:
The closest thing I’d found to Rails in Python is a combination of CherryPy, SQLObject and Cheetah. But as much as I like each one of those pieces individually, they won’t ever fit together like Rails – which is why I don’t have a lot of optimism for things like Subway. I’ve got nothing against Subway. Could they pull it off and put together a really good Python web framework? Sure. But, given the track record of past attempts at web frameworks within the Python community, I won’t hold my breath.
Every time my work took extra time, it’s because I was expecting a level of complexity that wasn’t there. Wow. It’s not often that one of the tools I use humbles me, but finally I’ve found something that allows me to write code as fast as I think.
Schubert has been working on a program that’ll extract a UML diagram from your Rails application. On his weblog, Schubert has an example of how it looks right now with an extraction from Lutke’s Typo weblog engine:
He promises a release this weekend!
Xavier Defrang characterizes himself as a “…a frustrated Python-lover writing object-oriented PHP code”. He has contributed to the O’Reilly Python Cookbook and initiated the french translation of Dive Into Python. Despite his pythonic love, he has also managed to post the single most flattering article about Rails I’ve yet to stumble across in which he compares Ruby on Rails to Java, Python, and PHP.
The number of quotes and passages I want to pull out are so plentiful that I can hardly decide. Here goes a few:
- The recent Trails video walktrough just showed that J2EE zealots were definetly not getting it: the What is as important as the How
- I consider myself a real Pythonistas… and I’ve never thought of Ruby as attractive because of its syntax I (still) find a bit too sweet… But now that there is a killer app for Ruby which appears to square the circle of web development, can you think of a better time to look at it?
- I predict that a lot of high-profile PHP developers will soon or later switch to RoR. As a frustrated Python-lover writing object-oriented PHP code, Rails really fits as the best-of-both-world solution.
- The productivity boost offered by Rails is similar to what I experienced when switching from C++ to Python as my main development language. Everything is so simple and natural that it feels just like your own framework you would have grown yourself after years of trials and errors.
Anyway, go read the whole thing before I reveal all of it through quotes. It’s either a man who really gets it or a terrible suck up. Depending on your own personal enthusiasm about Rails :)
Scott Baron explains the twelve routing rules that connects his Elite Journal weblogging system. Routing is the mod_rewrite replacement coming in Rails 0.10.
Rails is built upon the foundation of a model-view-control split of responsibilities. The MVC pattern can be quite bewildering if you’re coming from procedural PHP, other non-OOP environments, or are just starting out with programming. But now you can learn it all. Amy Hoy has written a great introduction to the pattern and how it relates to Rails: MVC: The Most Vexing Conundrum.
Despite my recent case against high-level components, I do find low-to-medium level components useful when restricted within a narrow context. I could easily foresee abstracting some of the stuff in our 37signals applications into components and then reuse them across our similar products.
But what ever you believe that components will herald the second coming or remain skeptical as I, the infrastructure to build and use components have now come to Rails! It’s incredibly easy to use and components can either render complete screens or parts of other screens.
To demonstrate I’ve made a little movie: Components in Rails.
Components will be part of the forth coming Rails 0.10.0 release (which is due any day now).
Florian Weber has been working on his benchmark extension to test/unit for quite a while, but real life got in the way with the development of Bellybutton. He’s now making his comeback as a contributor to Rails and the first task is to finish his benchmark reporting tool: