= Keynote by David Heinemeier Hansson: What do party hats, James Dean, and french cheese have to do with Ruby on Rails 2.0 Partly about Rails 2.0, and partly about other stuff == Party Hats Noticed a pattern in previous presentations: - Party hats - 2 gazzillion books written - Job market is freakin' fantastic That's usually how I start out; by celebrating how frekin' fantastic we are To be honest I'm getting bored with putting the same slides together and updating the numbers Most people in the audience probably have a job doing Ruby on Rails if they want to Who am I trying to convince, what's the marginal value? We have reached the point where we are three years into this thing now Starting to think that perhaps we should be happy with what we have First they ignore you, then they laugh at you, then they fight you, then you win ... and then what? - Ruby on Rails went through these phases way to fast - what are going to do now I was having a lot of fun going through these phases, I'm kind of sad that it is over From one day to another, we won If you want to adopt Rails today, it's pretty up to you We have documentation, we have programmers, all barriers has been removed This leaves evangilism in kind of a strange spot The purpose of my evangilism was to convince people that this was the fact, even if it wasn't We were pushing - Convention over configuration - AJAX - REST There is no big case right now, these focal points were adopted very fast 1,5 years ago REST was a really wird thing for many people That leaves Ruby 2.0 in a really wird spot, it has no such cause In the future it could be: - OpenID - Document databases == James Dean The rebellion is just a role, a jacket (picture of James Dean) When you take off that jacket, there is the craftsman underneath (picture of old bearded guy) The transition of taking of that jacket is about focusing inwards instead of outwards The craftsman is happy with his techniques Where is that rebellion and revolution? It is over in first tier - Rails is not longer controversional Means we can change our focus to somewhere else But there is definitely more tiers to come Once you reach this point were we are now, you don't have to sell anymore We are in a pretty good spot right now regarding the community - if I went away, if the core group went away, nothing to terrible would happen == Wine and cheese There is also time to rest You get time to enjoying the wine and cheese I haven't been working so much on Rails lately Small iterations as opposed to big revolutions Even though that is an off-switch for me, it's not about me anymore (picture of Time person of the year: You) In the past we have not been setup for tiny evolutions, we've setup for big revolutions We have been rewamping the community for the past two month == Report #12: Verified patches Spreading out the work with patches Instead of having New rule: Any patch you want to get into Rails, get three people to look at your patch, at the code, and then get a +1 in a comment. - This removes a huge bottleneck == Comparably What changed since Rails was released a little more than 3 years ago Focus on the minor stuff Shows the original video for showing off Ruby in Rails: - You unpackeged a tar file - Made it look very easy to setup Apache - There is a lot of silly mechanics we don't have to do anymore The big highlights I want to highlight - Database integration: Manual renaming and so on We are about three minutes in, we haven't really got to the coding yet, I'm really loosing my patience with this These days we just run the rails command - It's a great lift from back that we can dive directly into the code - These days we == News in Rails 2.0 In Rails 2.0, the scaffold command has the creation of the database table baked in A new kind of migration syntax called "sexy migrations" create_table :blogs do |t| t.string :title t.text :body t.timestamps # Adds created_at and updated_at end rake db:create:all - Creates all the databases we have declared in YAML We have been creating models for three years, now timestamps are the default in migrations These days we are using mongrel Instead of having default sessions to be server-based, they are now pr. default cookie-based (encrypted cookie) - Good if you follow best practice with only storing id's in the cooking, bad for big and sensitive data - The cookies are stamped in such a way that they can only be used with the current application New in routes.rb: - map.root :controller => "posts" instead of map.connect '', :controller => "posts" The scaffolding look hasn't changed much since back then - We really don't want to prettify it at all - this is scaffolding - Scaffolding is not about hiding the implementation, but showing it so you can modify it === Admin interface How do you best map and admin interface RESTful? - Common pattern with two different namespaces: map.namespace :admin do |admin| admin.resources :admin end Struggeling between new controller or admin in same controller - I want to have the admin actions in a seperate controllers You can pretty much do what you want, and it is not a 1:1 mapping ./script/generate controller admin::posts --> /controllers/admin/posts_controller.rb Not a big fan of namespaces for models, but pretty for splitting up controllers A new convention in file names, we use - index.html.erb (mime-type and renderer are two different things - name of the file, name of the mime-type, name of the renderer In the index view: <%= render :partial => @posts %> In _posts.html.erb: <%= div_for(post) do %> # automagically add