SlideShare uma empresa Scribd logo
1 de 37
Baixar para ler offline
Rails 3
    Cool New Things




            
* Caveats




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




                               
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.net/mattetti/rails3­
        stepping­off­of­the­golden­path




                                
.....




       
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/




                               
     
ActiveRecord & Arel




              
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)




                                
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/8/31/three­
        reasons­love­responder




                                
                      
    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 freezing native gems !
    ●   http://github.com/wycats/bundler




                               
Gemfile




        
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)



                                 
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) 
        == a Rack application”
    ●   http://yehudakatz.com/2009/12/26/the­rails­3­
        router­rack­it­up/



                               
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://blazingcloud.net/2010/01/17/notes­from­
        rails­3­bugmash
    ●   Others 
        http://wiki.rubyonrails.org/rails/version3/plugins_
        and_gems

                                 
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://hasmanyquestions.wordpress.com/2010/0
        1/17/let­your­sql­growl­in­rails­3/




                                 
XSS protection
    ●   eRB now escaped by default
    ●   Use raw to not escape
    ●   Try out the plugin 
        http://github.com/NZKoz/rails_xss




                                 
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


                               

Mais conteúdo relacionado

Mais procurados

NodeWay in my project & sails.js
NodeWay in my project & sails.jsNodeWay in my project & sails.js
NodeWay in my project & sails.js
Dmytro Ovcharenko
 

Mais procurados (18)

So R Debugging
So R DebuggingSo R Debugging
So R Debugging
 
Rails with mongodb
Rails with mongodbRails with mongodb
Rails with mongodb
 
Rango
RangoRango
Rango
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 
Effective Web Application Development with Apache Sling
Effective Web Application Development with Apache SlingEffective Web Application Development with Apache Sling
Effective Web Application Development with Apache Sling
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
 
Workshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General OverviewWorkshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General Overview
 
Impression of Rails 3
Impression of Rails 3Impression of Rails 3
Impression of Rails 3
 
Introduction to rails
Introduction to railsIntroduction to rails
Introduction to rails
 
Webpack
WebpackWebpack
Webpack
 
Ruby Isn't Just About Rails
Ruby Isn't Just About RailsRuby Isn't Just About Rails
Ruby Isn't Just About Rails
 
OSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache SlingOSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache Sling
 
Денис Евграфов. Доставка, тестирование кода и его стиля. РИФ-Воронеж 2016
Денис Евграфов. Доставка, тестирование кода и его стиля. РИФ-Воронеж 2016Денис Евграфов. Доставка, тестирование кода и его стиля. РИФ-Воронеж 2016
Денис Евграфов. Доставка, тестирование кода и его стиля. РИФ-Воронеж 2016
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack Introduction
 
Intro to Rails
Intro to Rails Intro to Rails
Intro to Rails
 
Introduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman OrtegaIntroduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman Ortega
 
NodeWay in my project & sails.js
NodeWay in my project & sails.jsNodeWay in my project & sails.js
NodeWay in my project & sails.js
 
xml-motor ~ What,Why,How
xml-motor ~ What,Why,Howxml-motor ~ What,Why,How
xml-motor ~ What,Why,How
 

Destaque (7)

Programacion 26
Programacion 26Programacion 26
Programacion 26
 
Leaders As Teachers Institute
Leaders As Teachers InstituteLeaders As Teachers Institute
Leaders As Teachers Institute
 
Aloysius11
Aloysius11Aloysius11
Aloysius11
 
Code Management
Code ManagementCode Management
Code Management
 
Code Management (Version Control)
Code Management (Version Control)Code Management (Version Control)
Code Management (Version Control)
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Git Basics Workshop Summer of Tech 2010
Git Basics Workshop Summer of Tech 2010Git Basics Workshop Summer of Tech 2010
Git Basics Workshop Summer of Tech 2010
 

Semelhante a Rails 3 : Cool New Things

Semelhante a Rails 3 : Cool New Things (20)

rubyonrails
rubyonrailsrubyonrails
rubyonrails
 
rubyonrails
rubyonrailsrubyonrails
rubyonrails
 
apachecamelk-april2019-190409093034.pdf
apachecamelk-april2019-190409093034.pdfapachecamelk-april2019-190409093034.pdf
apachecamelk-april2019-190409093034.pdf
 
Backbone 4.0
Backbone 4.0Backbone 4.0
Backbone 4.0
 
Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2
 
Apache Camel K - Copenhagen
Apache Camel K - CopenhagenApache Camel K - Copenhagen
Apache Camel K - Copenhagen
 
Non-Framework MVC sites with PHP
Non-Framework MVC sites with PHPNon-Framework MVC sites with PHP
Non-Framework MVC sites with PHP
 
JRuby, Ruby, Rails and You on the Cloud
JRuby, Ruby, Rails and You on the CloudJRuby, Ruby, Rails and You on the Cloud
JRuby, Ruby, Rails and You on the Cloud
 
Drupal 7 and RDF
Drupal 7 and RDFDrupal 7 and RDF
Drupal 7 and RDF
 
Angular 2 vs React
Angular 2 vs ReactAngular 2 vs React
Angular 2 vs React
 
Lint, coverage, doc, autocompletion, transpilation, minification... powered b...
Lint, coverage, doc, autocompletion, transpilation, minification... powered b...Lint, coverage, doc, autocompletion, transpilation, minification... powered b...
Lint, coverage, doc, autocompletion, transpilation, minification... powered b...
 
Camel Day Italy 2021 - What's new in Camel 3
Camel Day Italy 2021 - What's new in Camel 3Camel Day Italy 2021 - What's new in Camel 3
Camel Day Italy 2021 - What's new in Camel 3
 
Lupus Decoupled Drupal - Drupal Austria Meetup - 2023-04.pdf
Lupus Decoupled Drupal - Drupal Austria Meetup - 2023-04.pdfLupus Decoupled Drupal - Drupal Austria Meetup - 2023-04.pdf
Lupus Decoupled Drupal - Drupal Austria Meetup - 2023-04.pdf
 
Best practice routing in Meteor.js and beyond
Best practice routing in Meteor.js and beyondBest practice routing in Meteor.js and beyond
Best practice routing in Meteor.js and beyond
 
Performance on Rails
Performance on RailsPerformance on Rails
Performance on Rails
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
 
Drupal Deployment and Essential Development Tools
Drupal Deployment and Essential Development ToolsDrupal Deployment and Essential Development Tools
Drupal Deployment and Essential Development Tools
 
Apache Camel K - Fredericia
Apache Camel K - FredericiaApache Camel K - Fredericia
Apache Camel K - Fredericia
 
Go at Skroutz
Go at SkroutzGo at Skroutz
Go at Skroutz
 
Autolab Workshop
Autolab WorkshopAutolab Workshop
Autolab Workshop
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

Rails 3 : Cool New Things

  • 1. Rails 3 Cool New Things    
  • 3. Not ready... ● 3.0pre not released yet ● http://oscardelben.com/articles/2009/12/06/how­ to­test­rails­3.html    
  • 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. .....    
  • 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.    
  • 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. Arel     http://m.onkey.org/2010/1/22/active­record­query­interface
  • 13. Responders ● respond_to now baked in ● Can make your own responders ● http://weblog.rubyonrails.org/2009/8/31/three­ reasons­love­responder    
  • 14.     http://www.engineyard.com/blog/2009/my­five­favorite­things­about­rails­3/
  • 16. Bundler ● No more config.gem ● Gemfile ● Evaluates all dependencies at once ● Deploying and freezing native gems ! ● http://github.com/wycats/bundler    
  • 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)    
  • 22. Routing More power to the people    
  • 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/    
  • 26. ActionMailer ● Looks more like a Controller now ● http://gist.github.com/281420    
  • 27. ActionMailer     http://gist.github.com/281420
  • 29. Javascript ● Unobtrusive ● Easier to swap out with Jquery ● Uses HTML5 data­* attributes    
  • 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    
  • 34. ActiveModel Get Validations, etc by including  ActiveModel::Validations    
  • 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. XSS protection ● eRB now escaped by default ● Use raw to not escape ● Try out the plugin  http://github.com/NZKoz/rails_xss    
  • 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