DHH Keynote at RailsConf Europe 2006

9:30 David Black, Welcome

9:40 DHH
* Slides in textmate

* Rails 1.2 as beta gem today
* Dependency changes
* Big change in routing – should mean “the incident” won’t happen again
* Last major 1.x release
* Lots of deprecations – ready for 2.0

* SimplyRestful
* Full set of HTTP verbs
* Be good web citizens
* The big change is to allow us to focus on bigger issues
* Conventions for controllers:

    map.resources :posts do |p|
      p.resources :comments
    end

* New scaffolder (not shiny like Streamline, still hideously ugly by design) supplement not a replacement for old scaffold
* $ ./script/generate resources_scaffold posts
* produces a controller, a model and a migration for the model

    # GET /posts
    def index

    # GET /posts/1
    def show

    # GET /posts/1;edit
    def edit

    # POST /posts
    def create

    # PUT /posts/1
    def update

    # DELETE /posts/1
    def destroy

* out of the box scaffoldding will work with xml as well as html, just stick an .xml on the url
* Posts.xml returns <posts><post>…</post><post>…</post></posts>
[Shame it's not RSS/Atom :-(]
* ActiveResource builds on top of HTTP like ActiveRecord builds on DB.
Class is singular url is plural. All your models are exposed as a RESTful API.
* Use .xml on POSTS to, use responds_to.
* ActiveResource is not shipping with 1.2, available as an external gem, it _may_ ship with 2.0. Using it at CD Baby.

* SimplyHelpful – views by convention, available as a plugin now

    <div class="post" id="post_45">...

becomes

    <% div_for(@post) do %>...

and similarly for page[...], partials, form_for etc.
* Will be in Rails 2.0
* New functionality should be developed as a plugin first, rather than patches against the trunk.


Technorati tags: , , , , , ,


About this entry