Your SlideShare is downloading. ×
0
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upgrading to rails3
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Upgrading to rails3

1,768

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,768
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
25
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Upgrading to Rails 3
  • 2. About Me • a.k.a “xdite” • http://blog.xdite.net • http://plurk.com/xdite • http://github.com/xdite • Ruby on Rails Developer since 2007 • Rails Developer of HTC
  • 3. Rails 3
  • 4. http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3
  • 5. It’s a big bang rewrite ...
  • 6. What will change?
  • 7. see ihower’s slide!
  • 8. Basis • ActiveRecord Query API • ActiveRecord Validation API • View: XSS • View: Javascript • Routing • Bundler
  • 9. Upgrade is dangerous
  • 10. But !
  • 11. rails3 [*****] XDXD 6/09 3:33:08 ihower
  • 12. Cost: 3h4m
  • 13. Prerequisites • Test Coverage • Rails 1.8.7 and Rails 3 • RackEnv ( using Passenger ) • git remote branch • Strong Heart and Excellent Ruby Skill.
  • 14. What will you face? (major) • Query API change. • HTML auto Escape • Routing Changes • Unobtrusive Javascript • Plugin Broken ( internal API Channges )
  • 15. What can you do? ( major) • use Rails Best Practice. • writing tests • move config.gem to Gemfile • move rjs to unobtrusive javascripts. • organize the same logic in HTML to helpers. • replacing plugin to gem. • survey plugin for rails3 ( railsplugins.org)
  • 16. Rails Best Practices • Move code from Controller to Model • Extract into Module • Never logic code in Views • Organize Helper files
  • 17. STEP • install rails3 • modified httpd for RackEnv • git branch rails3 • run rails-upgrade check, and document it. • backup files ( route.rb, application.rb ... ) • rails new . • run test, and fix. till finish......
  • 18. Normally, you will fail...
  • 19. Because... • Not writing test (!!!) • Writing model logic in views.(!!!) • Post.find(:all).map{ |c| [c.name, c.id] } • Copy & Paste anywhere(!!!) • broken everywhere based on the same thing • Fixing bug and refactoring project in the same time.(!!!!!!!!!!!!!)
  • 20. prepare well before starting
  • 21. Resources • The Rails 3 Upgrade Handbook • Bundler • RailsPlugins.org • The Lowdown on Routes in Rails. • Unobtrusive Javascript in Rails 3
  • 22. We are hiring!! xdite_cheng@htc.com

×