Rails 2.0 details from DHH's Keynote 1
The moment all Rails fanboys have been waiting for has come and gone: Rails inventor David Heinemeier Hansson has just concluded his keynote speech. Among topics covered, was the various enhancements to Rails that will emerge in version 2.0.
Of particular note to me was his statement that the pace of releases for Rails will continue to decelerate. As I’ve noted on this blog before, I’ve been concerned about the frequency of releases and deprecations.
Here are the highlights:
- Debugging is fixed
- The Ruby breakpointer stuff has been fixed. You can now type “debugger” anywhere in your code and it will dump you into an IRB session where you can inspect objects and more.
- New to this version is the ability to inspect code right from the irb session, jump up and down the call stack, and view stack traces.
- Focus on HTTP performance
- An increased focus on HTTP performance will bring a few features.
javascript_include_tag :all, :cache => truewill take all your javascript files and combine them into one, gzipped.- Some simple code in your environment.rb can allow your app to use multiple host names (www1.yourdomain.com, www2.yourdomain.com) which increases performance because browsers only download 2 resources from the same host simultaneously.
- ActiveRecord query caching
- ActiveRecord can now optionally cache queries. For instance, if you do a select from a database and no updates or edits happen to that record before another similar select is requested, ActiveRecord will pull that record from the cache.
- View file naming conventions
- .rhtml now becomes .html.erb.
- The idea here is that the first extension is the form (.html, .xml, .atom, .text, etc.) and the second extension is the templating provider. (.erb, .haml, etc.)
- Environment.rb consolidation
- Some junk about uncluttering stuff in environment.rb that I didn’t full understand.
- Migration changes
- Migrations have historically ended up rather repetitive, especially, when you have a lot of columns in a table you are creating.
- The declarations now get flopped so you now do
t.string :first_name, :last_name, :companyrather thant.add_column :first_name, :type => :stringx3.
- Authentication upgrades
- Rails 2.0 embraces HTTP authentication a bit more.
- Although HTTP auth sucks for a lot of stuff, it is useful for clients that are pulling XML, etc.
- An app could now allow authentication over HTTP for retrieving data in certain formats, and require application-level authentication for other resources.
- MIT license
- Just more “opinionated software” stuff showing through: The plugin generator will now include the text of the MIT license by default.
- Cleaning up shit
- Stuff that’s been deprecated for a while will finally be axed.
Comments
-
Awesome coverage!!! Thank so much Colin, any word about ActiveResource?
