Power Flash and Flex from Rails

Jon Shumate introduces WebORB:

WebORB for Rails is server-side technology enabling connectivity between Flex and Flash Remoting clients and Ruby on Rails applications. WebORB for Rails can be installed as a plugin into any Rails application to expose Ruby classes as remote services. The product provides a complete implementation of the Adobe’s AMF0 and AMF3 messaging protocols and thus supports any Flash Remoting or Flex client.

Working with Flash and Flex? Check it out.

The Rails Edge

I’ve been wracking my brain trying to come up with something to say about The Rails Edge that isn’t already obvious. The problem is that everyone already knows that Dave Thomas and Mike Clark have been delivering top-notch Ruby on Rails training since last year, so I don’t have to say what a good deal this event will be. All the speakers are already famous Rails peeps in their own rights and don’t need their virtues extolled (even Marcel). And I certainly don’t need to tell anyone how much fun it is hanging out with a bunch of Rails folks for three days.

One thing I can offer is a personal testimonial as to the quality of the Pragmatic Studio programs. I took the Rails Studio back in January. Up until then I’d only dabbled with Rails. After taking the studio I had the knowledge to build real applications, and now I’ve got a job doing Rails development full time and am an author on the official Rails blog.. One can never know what might have been so I can’t say I owe it all to that training, but I certainly got a lot from it and happily give it credit for getting me going in the right direction.

This year, RailsConf and RubyConf both sold out in a matter of hours. There is a huge demand for conferences - people want to learn what’s up in the Rails world, to meet other Rails developers, and to improve their Rails development skills. We’ve started to see some regional conferences being organized which could potentially be pretty cool, but there is always a place for a professional production like The Rails Edge. If you’re looking to get more involved in Rails, you should check it out.

Unobtrusive Javascript Plugin

Dan Webb and Luke Redpath have release the latest version of their Unobtrusive Javascript Plugin for Rails. It solves several of the main problems people run into when working with unobtrusive javascript:

  • Development isn’t as intuitive with Rails when you’re defining your custom javascript behaviors in an external file.
  • When working with pages with lots of images and content, the behaviors won’t be enabled until everything is downloaded and window.onload is called. It’s been solved with some nasty cross-browser javascript hacks, all handled transparently by Dan’s LowPro extension for prototype. This has been a big deal for me personally, so it’s nice to see it all solved.

UJS attempts to solve this by taking defined behaviors in the view and creating a tailored javascript file for it. Smart conditional GET and page caching techniques can be used to save bandwidth and time.

All in all, it looks like Dan and Luke did an excellent job on the plugin. Anyone using it? How’s it working out for everyone?

Filtered parameter logging

Now that the hubbub about the recent security issues has died down, I think it’s worth pointing out a little jewel that was snuck into the 1.1.6 security release of Rails that most people missed.

ActionController#filter_parameter_logging lets you filter form data that you don’t want saved in the log. This is useful for preventing sensitive data like passwords and credit card numbers from being logged in the clear, for keeping huge pieces of data from clogging the log file, and so on.

If your application accepts passwords, paste this line into your ApplicationController class:

filter_parameter_logging "password"

That will prevent any field with a name matching the pattern /password/i from being logged, so both [user][password] and [user][password_confirmation] will be filtered out. If you care about preventing exposure of passwords, go do that right now.

Credit to Jeremy Evans for his patch!

Trac and SVN gets new powerful machine

After an extended period of troublesome Trac times, we’ve finally addressed the problem once and for all. Courtesy of TextDrive, we now have a new mega-powerful super machine dedicated to Trac and SVN. Instead of loads in the 30’es, it’s now below 1. So get all of your pending patches and tickets into the system. It now actually works.

And thanks to the move of the mailing list to Google Groups, there’s still enough power on the old server to run the wiki, the manuals site, and the weblog without slowdowns. We ruffled a few feathers during the move (some people took it harder than others, one guy wanted to hunt down and kill the responsible, eeks!), but we’re happy to report that in terms of providing breathing room for the overloaded servers, it worked like a charm.

Official Mailing List Move

Don’t worry if you see some mailing list subscriptions in your inbox, we’re simply transferring everything to Google Groups. This takes the incredible load off the Ruby on Rails server so it can focus on Trac, and gives everyone a Google-powered search engine for the archives. Atom feeds are also available if that’s your preference. Here are the new Google Groups:

Hey everyone, lets give the new rubyonrails-security list a warm welcome. It is an announcement-only list spawned from the lessons learned during the recent security incident.

By the way, it’s possible to subscribe to a Google Group without a Google account.

Streamlined: Taking admins beyond scaffolding

Justin Gehtland and Stuart Halloway has been moving along at a rapid pace on Streamlined since its unveiling at RailsConf in June. There’s now a public repository with the code available and they’ve put together a convincing screencast of its use.

I really like their approach of using separate UI classes instead of contaminating the model classes with administrative concerns. It has a great feel and look to it. Exciting to see it move forward.

Recent Rails job postings from the Job Board

We’re going to start posting a summary of recent Rails job postings from the 37signals Job Board every few weeks. All of these positions are for Rails programmers, but be sure to click through for individual listings on the additional requirements:

If you’re looking for Rails programmers, you can post a listing at the 37signals Job Board. The price is $250 for 30 days of air time.

Reloading Revamped

A few days ago I checked in a significant improvement to Rails’ dependencies and reloading code. In the past, changes to dependencies.rb have shed the blood of those courageous enough to ride edge; We’ve worked hard to prevent accidental breakage this time, but there may be some changes that could break your app.

Before you freeze edge to the prior revision, I should explain that most breakage will be extremely simple to fix. Prior to this revision, Rails would happily load files from Ruby’s standard lib via const_missing; you will now need to explicitly require such files. (Rails’ autoloading was intended as a replacement for require_dependency; its replacement of Ruby’s require is unfortunate and undesired.)

This change is not the only one that has occurred. Rails’ Reloadable module has been deprecated, and the previously independent systems of automatic loading and unloading have been brought together in a happy union.

Dependencies’ new behavior should be more reliable and less annoying. Annoyances such as the lack of module reloading have been fixed. Accidentally loading stdlib packages will no longer occur.

The actual mechanics of Dependencies are now relatively simple. Instead of using Reloadable to decide which classes to unload, Rails records which constants are loaded via const_missing. When the request is completed, each autoloaded constant is removed, leaving the process in a clean state. The actual mechanics are slightly more complex, but not inordinately so. Feel free to open dependencies.rb and peruse the code.

Hopefully the newfound simplicity of this approach will improve the transparency of Dependencies — some software is best when not noticed. If you’re running on trunk this change does cause your application to error, please do open and assign Ulysses a ticket.

Before I depart, I’d like to mention another (independent) change to dependencies: When Rails fails to find a missing constant, you will now see a fully qualified constant name in the description. For example, if a method in your User class references Acount, (rather than Account,) Rails will state that User::Acount is missing rather than ::Acount. Rest assured that Rails has looked for Acount in Object as well as User, and is merely reporting the fully qualified constant name, as Ruby’s own const_missing does.

New dedicated Trac server on the way

Our current web and mail server has been buckling under the load of the recent frenzy. Especially Trac and mailman is taking it to its knees. So we’re going to add another server. Hopefully this can be completed within the next few days. It’s going to be dedicated to just running the repository and Trac. Thanks to TextDrive for their continued support of Ruby on Rails.