What to Learn: Rails 1.2.4 & # 8594; Rails 3
I recently convinced management that our outdated version of Rails (1.2.4) slows us down enough to warrant an upgrade. The approach we are taking is to start a new project with modern technology, not a painful upgrade. Our project requirements have changed and it will be much easier.
The biggest problem is that my Rails knowledge is outdated. I've only worked with Rails 1.2.4 at work, while the rest of the world has long been moving. What topics have I missed by being buried in my work instead of keeping up with the current Rails regime?
I hesitate to delve into the blogs at random because I'm not sure how much has changed between intermediate Rails versions. No need to learn Rails 2.1-2.3 specific things that are no longer useful for Rails 3.
a source to share
Notable changes for app developers:
- New ActiveRecord Query API
- Lowdown on Routes in Rails 3
- Bundler for managing gems dependencies
- Mailer action in Rails 3
- Unobtrusive Javascript
- XSS Protection in Rails 3
- Rails 3 tutorials from Submitting Rails
Other conventions and APIs that you are aware of if shipping from Rails 1.X, which were introduced in Rails 2.X and exist in Rails 3.
- RESTful controllers
- Scope (formally named area)
- Caching requests
- Nested attributes
It cannot be stressed enough how RESTful controllers and scopes will allow you to write cleaner rails with more reuse. A ton of information spreading on these topics.
Further reading about Rails 3 development:
- http://www.engineyard.com/blog/2009/rails-and-merb-merge-the-anniversary-part-1-of-6/
- http://www.engineyard.com/blog/2009/rails-and-merb-merge-performance-part-2-of-6/
- http://www.engineyard.com/blog/2010/rails-and-merb-merge-plugin-api-part-3-of-6/
- http://www.engineyard.com/blog/2010/rails-and-merb-merge-rails-core-part-4-of-6/
- http://www.engineyard.com/blog/2010/rails-and-merb-merge-orm-agnosticism-part-5-of-6/
- http://www.engineyard.com/blog/2010/rails-and-merb-merge-rack-part-6-of-6/
a source to share
I would watch Peepcodes live upgrade video . In it, they upgrade your Rails 2 application to Rails 3. This should give you some idea of ββwhat you have (even if your upgrade looks very different) so you can make a somewhat informed decision.
a source to share
Also worth checking out Ryan Bates' excellent Railscasts at http://railscasts.com/
It covers a lot of new features in Rails when they come out (with recent screencasts focusing on Rails 3), so they're a good way to get up to speed.
a source to share