Exploring Ruby on Rails in a conversation

Ara Howard and Doug Fales has a great article on Linux Journal exploring Rails through a conversation. They talk about how thinks work building a small blog engine and touches on many of the Ruby facilities that Rails employ to do its magic. They also talk a bit about why some of the reactions to Rails have been so explosive and what kind of fears that are triggered when new tech hits the street. Great stuff.

Moved to a brand new dedicated server

The terror reign of intermittent MySQL errors has ended. We moved to a brand new dedicated server this morning thanks once again to the kind crew at TextDrive.

UPDATE: The wiki is offline for a bit today as the server will be reconfigured to allow larger memory allocations.

O'Reilly's CTO praises Rails to the chocolate skies

Rael Dornfest seems to be having a chocolate good time digging into the crunchy Rails. As the Chief Technology Officer at O’Reilly Media, he certainly has a good touch with the pulse of the industry and this is what he’s been seeing:

The chocolate in this equation is Ruby on Rails: a framework for building database-driven web applications. But far from being yet another web development framework, Rails is known for its small footprint, low barrier to entry, flexible-yet-powerful, “more joy and less code” approach to application building.

Indeed, we’ve been seeing interest in Ruby explode over the past few months: no doubt in large part due to the swift adoption (or at least tire-kicking) of Rails.

Ruby on Rails was off to a good start even before bringing Ajax on board; and it’s only gone from strength to strength since.

Thanks a bunch, Rael!

Scaling the productivity gains on larger projects

Evan Rabble is the lead developer on the forthcoming podcasting portal Odeo. He’s being working with Rails for some time now and has just done a write-up on how the productivity of the environment scales on a larger (than a todo example) project. Great perspectives. I especially like the one on the learning curve:

Another thing which i think is important when looking at web app frameworks is learning curve. I’ve had 4 other people pick up and contribute to the code base. Three of those people working remotely. They’ve all picked up and be able to understand the system quickly. The learning curve was very short and the code was generally readable.

This contrasts to my experience with zope, perl frameworks, and java. All three of those technologies had steep learning curves which required lots of face to face collaboration to bring people up to speed. With the exception of Florian, nobody had previous experience with rails or ruby beyond building a weekend example app and reading the tutorials.

Best of luck with the launch of Odeo!

Reasonable expectations on a $12 plan

It’s great to see so many Railers sign up with TextDrive. They’re a great host and I’m happy to be associated with them. But unfortunately, it appears that there’s some mismatch in expectations around what you get for a $12 plan.

What you do get is a slice of very reasonable specs on some great machines. What you don’t get is your personal system administrators. You should have your shit together before pushing it to TextDrive. Develop on your local machine, push to TextDrive when it works.

As explained, TextDrive is a shared host. That means its somewhat like a community park where everyone is responsible for cleaning up after their visit and behave with good manners. Think of your application as a park goer. Make sure its recently well-behaved by not taxing everyone else with needlessly sloppy queries or tough computations on every request.

Most importantly, though, is to be mindful about your support requests. As nice as it would be, the TextDrive system administrators can’t be part of your development effort debugging your application. They’re there in case the system as such is broke. So just like programmers should be careful before blaming the operating system for their program troubles, you should be careful before blaming TextDrive for yours.

TextDrive is a marvelous service. You get SSH, Rails, lighttpd, FastCGI, MySQL, SVN, PostgreSQL, and so much more for twelve dollars a month. 12. On top of that, they’re taking half of the profit from that to help Rails. I’d hate to see such a resource go away because unreasonable support requests and sloppy apps.

Let’s avoid The Tragedy of The Commons. Thanks.

Production Log Analyzer: Find slow pages

Eric Hodel has released the Production Log Analyzer:

The Production Analyzer lets you find out which pages on your site are dragging you down. pl_analyze requires the use of SyslogLogger (included) because the default Logger doesn’t give any way to associate lines logged to a request.

Hodel and crew used this to locate slow running pages in 43 Things. You can learn more at at PLA site.

Going to the good video store

Josh C from the Eggplant Coop sent me the funniest switcher quote I’ve seen in a while:

We compare moving to rails from our in-house perl web framework to the scene in “Clerks” where Randall goes to the good video store ;)


Verifying encoding approach to Action Mailer

If you’re deep into all the RFCs on email, we’d like your help ensuring that the latest approach to encoding with Action Mailer is sound. We’re going for an approach where encoding to subjects and headers are only applied if necessary. Please do have a look at ticket #955.

Brian McCallister to be preset Rails at ApacheCon

Under the session title of Cheap, Fast, and Good: You can have it all with Ruby on Rails, Brian McCallister will be presented at ApacheCon Europe 2005. The session will run for 60 minutes and features this abstract:

Ruby on Rails is a new web application framework which provides tools for everything from object/relational mapping to componentized views. It provides the architectural soundness of the Java Model 2 action/view frameworks with the rapid development and expressiveness of PHP. This session will teach you how to build sophisticated, scalable applications quickly using Ruby on Rails, the Apache Web Server, and PostgreSQL

ApacheCon Europe 2005 is going on in Stuttgart, Germany on the 18th through 22nd of July.

Rails 0.11.1: More Ajax, Verifications, SQL Server updated, loads of fixes

The Ajax wave is sweeping across Rails. In this release, we’ve added a :position option to both link_to_remote and form_remote_tag that can be set to either :before, :top, :bottom, or :after. These options make it possible to add new DOM elements to existing lists without replacing the whole list. When working on big lists that are in a fixed order anyway, there’s a considerable speed increase to be had.

Yellow Fade Technique
Additionally, we’ve implemented the first in a hopefully long series of packaged effects. This is the 37signals’ Yellow Fade Technique that’s now available as Effect.Highlight(id) — perfect for highlighting a new element that was just added with Ajax. If you have the Javascript chops to do other effects, please do help out. The wiki discussion page for Ajax in Rails already has great ideas for slide, fadeout, and squish.

Verifications in a whole new module for Action Pack that allows you to specify preconditions for you actions. They come in the form of “verify that these parameters are part of the request or redirect the user somewhere else (possibly adding a message to the flash)”. Or said in code:

verify :params => "post", :only => [ :create, :update ], :redirect_to => { :action => "index" }

SQL Server adapter updated
The Micrsoft SQL Server adapter is back in top form supporting both file uploads (albeit still restricted by SQL Server’s 7KB limit) and the new limit style. Thanks to DeLynn Berry for the quick update. Now only the DB2 adapter is not supporting the new limit style.

Loads of fixes
Iconv is no longer required to install Rails (but you’ll want it if you need to send/receive UTF-8 with Action Mailer), you can clone Active Records with floats, the dispatch.fcgi has been fixed, and a bunch of other things. In total, this release has 30 new features, additions, tweaks, and fixes.

See all the changes in the changelogs for Rails, Active Record, Action Pack, Active Support, Action Mailer, and Action Web Service.

Update: No application changes should be required. Just make sure that you copy over the latest prototype.js if you’re using Ajax.

P.S.: Many thanks to Florian Gross for the wonderful code snippet that allows for uploads to RubyForge automatically. This saved me the headache of releasing 12 files by hand one more time. And many thanks to Jamis Buck for the new template used for the API documentation.