RailsConf 2007 Keynote Notes

RailsConf 2007

May 17-20, 2007, Oregon Convention Center, 777 NE MLK Jr. Boulevard, Portland, Oregon 97232

Chad Fowler

  • setting the agenda for the year ahead
  • coming together as a community
  • arrogant bastards
  • guidebook sessions raised $12,000 for charity.
  • 1600 in attendance
  • then what?
  • success so far has been impact on the way people think
  • we have power, passion and intelligence => do something with it, instead of just pissing people off.

DHH

celebrating what we have – an economic ecosystem

  • stretching out the release cycle
  • rails has participants, contributors, not just users.
  • license to try things out
  • 600+ plugins
  • 10,000+ on rubyonrails-talk
  • job activity => 3 years of ROR experience required ;)
  • Publishing Industry
  • 6 ROR books from Japan plus French, German, Portuguese
  • Much broader than just the U.S. —65 countries on “Working with Rails”
  • Surpassed book sales of visual basic, python, perl and equal to sql.
  • IDE’s => Aptana, JetBrains, NetBeans

Rails 2.0—Not a Unicorn

  • Unicorn solves every problem you’ve ever had.
  • It will be released. A humble release. Not a complete rewrite.
  • The experiment worked!
  • The world of resources is a better, greener place.
  • REST is the default in Rails 2.0—now a convention
  • REST flows through the entire framework
  • Already in edge rails, already works => not a unicorn.
  • associations in routes.rb (has_many, has_one)

Demo

  • scaffold is resource-based by default => .xml is automatic
  • rendering format.csv or format.text needs only the :text being returned
  • require ‘active_resource’ and set a site to treat a web resource like an active_record object
  • adding search across html and xml and csv in our swoop
  • gem install—source http://gems.rubyonrails.org rails => its in there already
  • 22 of 24 controllers in highrise are REST
  • action_web_service is no longer preferred, no longer bundled but not taken out back and burned.

Friends and Allies

  • Ajax
  • REST
  • Atom
  • OpenID—open_id_authentication

9 things i like about rails 2

  1. breakpoints are back => 1.8.5 broke them
    1. ruby-debugger => debugging in console
  2. HTTP Performance => it really matters, biggest performance inhibitor
    1. bundle and gzip javascripts => 200 kb goes to 35 kb
      1. javascript_include_tag :all, :cache => true
      2. stylesheet_link_tag :all, :cache => true
    2. add multiple hosts to maximize performance
      1. add config.action_controller.asset_host = “asset%d.hostname.com” to the controller
  3. Query Cache in ActiveRecord => free on repeating queries
  4. action.mimetype_renderer
    1. index.html.erb
    2. index.xml.builder
    3. index.rss.erb
    4. index.atom.builder
  5. config/initializers => config/environment is simplified, and split into multiple initializer files
  6. sexy migrations => example of show a good idea in real working code
    1. t.integer :account_id
    2. t.string :first_name, :last_name
    3. t.timestamps
  7. HTTP Authentication => great fit for an api
    1. authenticate_or_request_with_http_basic
  8. The MIT assumption => MIT license by default
  9. Spring cleaning
    1. executing the deprecations indicated in 1.2
    2. moving in-place-editor to a plugin, other poor fits

Future History: Ruby at 30 Years – Avi Bryant, Dabble DB, Seaside

The best way to predict the future is to invent it. – Alan Kay

Smalltalk and ruby are the same.

smalltalk: (1 to: 10) collect: [:x| x * 2] 
ruby: (1..10).collect { |x| x * 2 }

Alien Technology – Squeak 0% market share

All the Best Stuff is Made in Japan – Marty McFly, Back to the Future

  • Does performance matter? At twitter it does
  • Scary core methods… implementation should be in ruby code.

What if your ruby object space were…?

  • transactional and persistent
  • transparently distributed
  • terabyte-scale
  • no restrictions on what objects blocks classes or threads could be running on them

GemStone => Up to a couple of thousand smalltalk vms sharing hundreds of gigs of persistent object memory with billions of indexed and queryable objects… Free, as in beer, up to 4GB

Object Lifecycle => Creating (hard), Using (useful), Saving (hard)

Embracing Statefulness

Acceleration Anxiety – Ze Frank

recursion => infinite fear

Tim Bray, Web Guy, Sun Microsystems

This keynote is going to mix code-slinging and business arm-waving. Tim has some real concerns about the future of big applications, and while Rails solves some of them, it ignores some and makes others worse. Tim will discuss what he sees as the pain points and offer some ideas about which directions we should be heading to get around them. He will also talk a bit at the business level, about why it’s a complete no-brainer for a big mainstream company like Sun to suddenly start investing in Ruby and Rails.

Missing ETags – needed in ruby for REST

The Atom Project – Atom Publishing Protocol

“Everything should have a Publish button.”

...Every E-mail client, spreadsheet, phone, camera, everything.

Retrieve those collection, page at a time if they’re big POST an atom entry to a collection. Get back its URI (in an http header) POST a picture (in binary), get back a uri for the bits and another for an atom entry with metadata PUT or DELETE an existing atom entry

Is REST all there is?

  • SOAP
  • WS-* – 36 specs, ~1000 pages total

The Rails WayJamis Buck, Michael Koziarski

  • models are more than a database table
  • fat models are easier to test than fat controllers
  • form_for
  • with_scope, often abused => can create an instance variable for the :current_organization
  • before_create macro makes intent clearer than merely defining a before_create
  • Time.now.beginning_of_day
  • acts_as_taggable is not-for-production
  • @cool.documents.find_by_user_id(@john.id) => 
             @cool.documents_authored_by(@john)

Don’t Forget:

  • send method, variable

Dave Thomas

  • more people contributing in the community
  • facilitate conversation => people can help each other
  • we are a cargo cult of the browser – must find a new interface for our users.
  • OOP

Have fun, do good.


About this entry