Rails 3
    Cool New Things




            
* Caveats




         
Not ready...
    ●   3.0pre not released yet
    ●   http://oscardelben.com/articles/2009/12/06/how­
        to­test­rails...
On to Cool Stuff...




              
Have It Your Way




            
More modular
    ●   Standard Rails will work out of the box
    ●   Swap AR with DataMapper
    ●   http://www.slideshare...
.....




       
ActionController
    ●   Based on Metal
    ●   Swap out stuff you don't need for performance
    ●   http://www.engineyar...
     
ActiveRecord & Arel




              
Arel
    ●   compose queries using relational algreba (
        http://github.com/rails/arel)
    ●   Lazy loading in 3.1 ...
Arel




      
         http://m.onkey.org/2010/1/22/active­record­query­interface
Responders
    ●   respond_to now baked in
    ●   Can make your own responders
    ●   http://weblog.rubyonrails.org/2009...
                      
    http://www.engineyard.com/blog/2009/my­five­favorite­things­about­rails­3/
New Gem Bundler




            
Bundler
    ●   No more config.gem
    ●   Gemfile
    ●   Evaluates all dependencies at once
    ●   Deploying and freezi...
Gemfile




        
Config files *
    ●   config/environment.rb shrunk
    ●   New file : config/application.rb 
    ●   Application name see...
config/environment.rb




               
config/application.rb




               
config/boot.rb




           
Routing
    More power to the people




                
Routing
    ●   More flexible
    ●   Can point to any Rack application
    ●   “main#home == MainController.action(:home)...
Routing




        
Routing




        
ActionMailer
    ●   Looks more like a Controller now
    ●   http://gist.github.com/281420




                          ...
ActionMailer




          
                   http://gist.github.com/281420
Javascript




         
Javascript
    ●   Unobtrusive
    ●   Easier to swap out with Jquery
    ●   Uses HTML5 data­* attributes




           ...
Javascript




         
Plugins




        
Plugins
    ●   rspec ­ http://github.com/dchelimsky/rspec­
        rails/tree/rails3
    ●   cucumber 
        http://bla...
By the Way....




           
ActiveModel




    Get Validations, etc by including 
       ActiveModel::Validations




                     
Rails::Subscriber
    ●   Get hooks for notifications, etc.
    ●   E.g. Output ActiveRecord SQL to Growl
    ●   http://h...
XSS protection
    ●   eRB now escaped by default
    ●   Use raw to not escape
    ●   Try out the plugin 
        http:/...
Starters
    ●   http://omgbloglol.com/post/344792822/the­path­
        to­rails­3­introduction
    ●   http://www.enginey...
Upcoming SlideShare
Loading in...5
×

Rails 3 : Cool New Things

6,464

Published on

Cool new things in Rails 3. Presented at WellRailed at 27th January 2010

Published in: Technology, Design
3 Comments
3 Likes
Statistics
Notes
  • Thanks for the updates. I thought XSS will switch from default un-escaped to default escaped? Or do you mean something else?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • The ActionMailer example on page 27 has also changed from delivers_from to default :from => '....'. Also, UJS and XSS stuff remains the same for developers, but got big rewrites recently under the hood.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Awesome. Thanks.

    You mention on page 16 that the bundler is under wycats/bundler.

    This has been moved, and the old one no longer maintained.

    The new one is now at http://github.com/carlhuda/bundler
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
6,464
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
52
Comments
3
Likes
3
Embeds 0
No embeds

No notes for slide

Rails 3 : Cool New Things

  1. 1. Rails 3 Cool New Things    
  2. 2. * Caveats    
  3. 3. Not ready... ● 3.0pre not released yet ● http://oscardelben.com/articles/2009/12/06/how­ to­test­rails­3.html    
  4. 4. On to Cool Stuff...    
  5. 5. Have It Your Way    
  6. 6. More modular ● Standard Rails will work out of the box ● Swap AR with DataMapper ● http://www.slideshare.net/mattetti/rails3­ stepping­off­of­the­golden­path    
  7. 7. .....    
  8. 8. ActionController ● Based on Metal ● Swap out stuff you don't need for performance ● http://www.engineyard.com/blog/2010/rails­and­ merb­merge­plugin­api­part­3­of­6/    
  9. 9.    
  10. 10. ActiveRecord & Arel    
  11. 11. Arel ● compose queries using relational algreba ( http://github.com/rails/arel) ● Lazy loading in 3.1  (http://m.onkey.org/2010/1/22/active­record­ query­interface)    
  12. 12. Arel     http://m.onkey.org/2010/1/22/active­record­query­interface
  13. 13. Responders ● respond_to now baked in ● Can make your own responders ● http://weblog.rubyonrails.org/2009/8/31/three­ reasons­love­responder    
  14. 14.     http://www.engineyard.com/blog/2009/my­five­favorite­things­about­rails­3/
  15. 15. New Gem Bundler    
  16. 16. Bundler ● No more config.gem ● Gemfile ● Evaluates all dependencies at once ● Deploying and freezing native gems ! ● http://github.com/wycats/bundler    
  17. 17. Gemfile    
  18. 18. Config files * ● config/environment.rb shrunk ● New file : config/application.rb  ● Application name seems to matter now  (https://rails.lighthouseapp.com/projects/8994/ti ckets/3556­app_generator­should­disallow­or­ fix­invalid­app_const)    
  19. 19. config/environment.rb    
  20. 20. config/application.rb    
  21. 21. config/boot.rb    
  22. 22. Routing More power to the people    
  23. 23. Routing ● More flexible ● Can point to any Rack application ● “main#home == MainController.action(:home)  == a Rack application” ● http://yehudakatz.com/2009/12/26/the­rails­3­ router­rack­it­up/    
  24. 24. Routing    
  25. 25. Routing    
  26. 26. ActionMailer ● Looks more like a Controller now ● http://gist.github.com/281420    
  27. 27. ActionMailer     http://gist.github.com/281420
  28. 28. Javascript    
  29. 29. Javascript ● Unobtrusive ● Easier to swap out with Jquery ● Uses HTML5 data­* attributes    
  30. 30. Javascript    
  31. 31. Plugins    
  32. 32. Plugins ● rspec ­ http://github.com/dchelimsky/rspec­ rails/tree/rails3 ● cucumber  http://blazingcloud.net/2010/01/17/notes­from­ rails­3­bugmash ● Others  http://wiki.rubyonrails.org/rails/version3/plugins_ and_gems    
  33. 33. By the Way....    
  34. 34. ActiveModel Get Validations, etc by including  ActiveModel::Validations    
  35. 35. Rails::Subscriber ● Get hooks for notifications, etc. ● E.g. Output ActiveRecord SQL to Growl ● http://hasmanyquestions.wordpress.com/2010/0 1/17/let­your­sql­growl­in­rails­3/    
  36. 36. XSS protection ● eRB now escaped by default ● Use raw to not escape ● Try out the plugin  http://github.com/NZKoz/rails_xss    
  37. 37. Starters ● http://omgbloglol.com/post/344792822/the­path­ to­rails­3­introduction ● http://www.engineyard.com/blog/2009/my­five­ favorite­things­about­rails­3/ ● http://rails3.community­ tracker.com/permalinks/5/notes­from­the­field­ upgrading­to­rails­3    
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×