SlideShare a Scribd company logo
Rails3




                                       RailsConf2009 - matt aimonetti
                     step off of
                     the golden path



Wednesday, May 6, 2009
WHO AM I?
                         matt aimonetti

Wednesday, May 6, 2009
“morally loose, cheese eating surrender monkey”




                           WHO AM I?
                           matt aimonetti

Wednesday, May 6, 2009
“morally loose, cheese eating surrender monkey”
                                                       Ted Han




                           WHO AM I?
                           matt aimonetti

Wednesday, May 6, 2009
“morally loose, cheese eating surrender monkey”
                                                       Ted Han
                                Ruby Addict




                           WHO AM I?
                           matt aimonetti

Wednesday, May 6, 2009
“morally loose, cheese eating surrender monkey”
                                                       Ted Han
                                Ruby Addict

                  Merb




                           WHO AM I?
                           matt aimonetti

Wednesday, May 6, 2009
“morally loose, cheese eating surrender monkey”
                                                       Ted Han
                                Ruby Addict

                  Merb                                  Rails




                           WHO AM I?
                           matt aimonetti

Wednesday, May 6, 2009
“morally loose, cheese eating surrender monkey”
                                                       Ted Han
                                Ruby Addict

                  Merb                                  Rails

                                 MacRuby


                           WHO AM I?
                           matt aimonetti

Wednesday, May 6, 2009
Rails3




                                       RailsConf2009 - matt aimonetti
                     step off of
                     the golden path



Wednesday, May 6, 2009
MERGE
Wednesday, May 6, 2009
Wednesday, May 6, 2009
Wednesday, May 6, 2009
Wednesday, May 6, 2009
RUBY




                         oscon 2003
Wednesday, May 6, 2009
RUBY




Wednesday, May 6, 2009
RUBY




Wednesday, May 6, 2009
RUBY




Wednesday, May 6, 2009
Wednesday, May 6, 2009
Wednesday, May 6, 2009
RUBY ON RAILS


                          Convention over Configuration

                              Don't repeat yourself




Wednesday, May 6, 2009
LARGE ADOPTION




Wednesday, May 6, 2009
SCHISM




Wednesday, May 6, 2009
Performance

                         Agnosticism



Wednesday, May 6, 2009
Adobe
                              Wikimedia
                           sproutcore/Apple
                         AT&T/yellowpages.com
                          powerset/microsoft
                                   ...
Wednesday, May 6, 2009
SPLIT RUBY COMMUNITY




                           ...
Wednesday, May 6, 2009
DRAMA




                           ...
Wednesday, May 6, 2009
SAT DOWN & TALKED




                                 ...
Wednesday, May 6, 2009
DIFFERENT PERSPECTIVES




Wednesday, May 6, 2009
SAME GOAL




Wednesday, May 6, 2009
MERGE
Wednesday, May 6, 2009
Wednesday, May 6, 2009
Wednesday, May 6, 2009
WHAT DO YOU GET?




Wednesday, May 6, 2009
Wednesday, May 6, 2009
vaporware
Wednesday, May 6, 2009
WHAT ARE YOU GOING TO
                    GET


                          improved
                         performance


Wednesday, May 6, 2009
WHAT ARE YOU GOING TO
                    GET


                         increased modularity



Wednesday, May 6, 2009
WHAT ARE YOU GOING TO
                    GET


                         agnosticism



Wednesday, May 6, 2009
WHAT ARE YOU GOING TO
                    GET


                         public API



Wednesday, May 6, 2009
WHAT ARE YOU GOING TO
                    GET



                         mountable apps



Wednesday, May 6, 2009
WHAT DOES IT REALLY
                               MEAN?



                                  Rails 2



Wednesday, May 6, 2009
WHAT DOES IT REALLY
                               MEAN?



   Rails 3



Wednesday, May 6, 2009
CECI N’EST PAS LA RÉALITÉ



                         html, xml, json, js




                                assert_equal(true, AwesomeApp.success?)



                                               Rails 2
Wednesday, May 6, 2009
CECI N’EST PAS LA RÉALITÉ

                                       ERB




                         html, xml, json, js




                                assert_equal(true, AwesomeApp.success?)



                                               Rails 2
Wednesday, May 6, 2009
CECI N’EST PAS LA RÉALITÉ

                                       ERB




                         html, xml, json, js




                                assert_equal(true, AwesomeApp.success?)



                                               Rails 2
Wednesday, May 6, 2009
CECI N’EST PAS LA RÉALITÉ

                                       ERB
                                                            ActiveRecord



                         html, xml, json, js




                                assert_equal(true, AwesomeApp.success?)



                                               Rails 2
Wednesday, May 6, 2009
CECI N’EST PAS LA RÉALITÉ

                                       ERB
                                                               ActiveRecord



                         html, xml, json, js


                                                      Test::Unit


                                assert_equal(true, AwesomeApp.success?)



                                               Rails 2
Wednesday, May 6, 2009
RAILS 3 DEFAULT STACK


   • ORM: ActiveRecord

   • JS: Prototype

   • Templating: ERB

   • Testing: Test::Unit




Wednesday, May 6, 2009
RAILS 3 - DEFAULT STACK



                         html, xml, json, js




                                assert_equal(true, AwesomeApp.success?)




Wednesday, May 6, 2009
RAILS 3 - DEFAULT STACK

                                       ERB




                         html, xml, json, js




                                assert_equal(true, AwesomeApp.success?)




Wednesday, May 6, 2009
RAILS 3 - DEFAULT STACK

                                       ERB




                         html, xml, json, js




                                assert_equal(true, AwesomeApp.success?)




Wednesday, May 6, 2009
RAILS 3 - DEFAULT STACK

                                       ERB
                                                            ActiveRecord



                         html, xml, json, js




                                assert_equal(true, AwesomeApp.success?)




Wednesday, May 6, 2009
RAILS 3 - DEFAULT STACK

                                       ERB
                                                               ActiveRecord



                         html, xml, json, js


                                                      Test::Unit


                                assert_equal(true, AwesomeApp.success?)




Wednesday, May 6, 2009
WHAAAT?



Wednesday, May 6, 2009
NO DRASTIC CHANGES FOR
          THE END USERS



Wednesday, May 6, 2009
RAILS WAY



Wednesday, May 6, 2009
RAILS WAYS



Wednesday, May 6, 2009
Wednesday, May 6, 2009
Wednesday, May 6, 2009
Wednesday, May 6, 2009
GAIN FLEXIBILTY
Wednesday, May 6, 2009
LESS OPINIONATED
Wednesday, May 6, 2009
WE ARE NOT ALL THE SAME
Wednesday, May 6, 2009
Wednesday, May 6, 2009
¿WHEN?




Wednesday, May 6, 2009
Use default stack?




                                is it a                           Is there a             Use the default stack
                         Y                                                           N
                                                     Y
                              question of                        reason not              and stop overthinking
                                taste?                            to use it?                    things


                                       N



                             evaluate your requirements:
                                 templating, JS, ORM,
                                     Performance


                                                         N
                                                                 is it worth it?
                                       Y




                             is it worth it?                               Y


                                                             Rails 3 custom stack

                                       N
                                                             Rails 3 default stack


Wednesday, May 6, 2009
OPTIONS




Wednesday, May 6, 2009
JAVASCRIPT FRAMEWORKS




Wednesday, May 6, 2009
TEMPLATING ENGINES




Wednesday, May 6, 2009
OBJECT RELATION MAPPER




Wednesday, May 6, 2009
ORM
     Databases
         scalar values


                         da
                         ta


                               objects
                              Object Oriented
                                Languages
Wednesday, May 6, 2009
RAW SQL


                         SELECT *
                         FROM Book
                         WHERE price > 100.00
                         ORDER BY title;



Wednesday, May 6, 2009
ACTIVERECORD


   Book.all 
       :conditions => [quot;price > ?quot;, 100.00],
       :order      => 'title'




Wednesday, May 6, 2009
DATAMAPPER


   Book.all 
       :price.gt => 100.00,
       :order    => [:title.asc]




Wednesday, May 6, 2009
SEQUEL



   Book.find{|b| b.price > 100.00}.order(:title)




Wednesday, May 6, 2009
COUCHREST



                     Book.by_price(:startkey => 100.01)




Wednesday, May 6, 2009
MANY MORE ORMS/DSLS




Wednesday, May 6, 2009
RUBY IS AWESOME




Wednesday, May 6, 2009
DATAMAPPER




Wednesday, May 6, 2009
DATAMAPPER


@parent = Parent.find_by_name(quot;Mattquot;)

@parent.children.each do |child|
  @parent.object_id.should == child.parent.object_id
end




Wednesday, May 6, 2009
DATAMAPPER


@parent = Parent.find_by_name(quot;Mattquot;)

@parent.children.each do |child|
  @parent.object_id.should == child.parent.object_id
end

                         Fails with ActiceRecord


Wednesday, May 6, 2009
DATAMAPPER


@parent = Parent.find_by_name(quot;Mattquot;)

@parent.children.each do |child|
  @parent.object_id.should == child.parent.object_id
end

                         Fails with ActiceRecord
                         Passes with DataMapper

Wednesday, May 6, 2009
DATAMAPPER

                         does what ActiveRecord does...
                                   but differently




Wednesday, May 6, 2009
DATAMAPPER




                                                               Copyright - Merb in Action - Manning
                         db drivers using 1 unified interface
Wednesday, May 6, 2009
DATAMAPPER


                • procrastination   as a value

                • Lazy   Loading

                • Strategic   Eager Loader




Wednesday, May 6, 2009
DATAMAPPER
                         students = Student.all
                         students.each do |student|
                           student.books.map{|b| b.name}
                         end




Wednesday, May 6, 2009
ACTIVERECORD
                         students = Student.all
                         students.each do |student|
                           student.books.map{|b| b.name}
                         end

                 SELECT * FROM quot;studentsquot;
                 SELECT * FROM quot;booksquot; WHERE
                                         (quot;booksquot;.student_id   = 1)
                 SELECT * FROM quot;booksquot; WHERE
                                         (quot;booksquot;.student_id   = 2)
                 SELECT * FROM quot;booksquot; WHERE
                                         (quot;booksquot;.student_id   = 3)
                 SELECT * FROM quot;booksquot; WHERE
                                         (quot;booksquot;.student_id   = X)

Wednesday, May 6, 2009
DATAMAPPER
                         students = Student.all
                         students.each do |student|
                           student.books.map{|b| b.name}
                         end



           SELECT quot;idquot;, quot;namequot; FROM quot;studentsquot; ORDER BY quot;idquot;
           SELECT quot;idquot;, quot;namequot;, quot;student_idquot; FROM quot;booksquot; WHERE
                 (quot;student_idquot; IN (1, 2, 3, X)) ORDER BY quot;idquot;




Wednesday, May 6, 2009
MULTIPLE REPOS
                production:
                  adapter:     mysql
                  encoding:    utf8
                  database:    production-app
                  username:    root
                  password:    top-s3ckrit
                  host:        localhost

                     repositories:
                       nightly_backup:
                         adapter: sqlite3
                         database: shared/nightly.db
                       weekly_backup:
                         adapter: sqlite3
                         database: shared/weekly.db



Wednesday, May 6, 2009
MULTIPLE REPOS



           Article.copy(:default, :nightly_backup,
                        :created.gt => 1.day.ago )




Wednesday, May 6, 2009
MULTIPLE REPOS
           class Page
             include DataMapper::Resource

                  property :id, Serial
                  property :name, String

             repository(:legacy) do
               property :name, String,
                               :field => quot;titlequot;
             end
           end
Wednesday, May 6, 2009
QUERY::PATH
                         Find all people
                           with an address that
                             has street in the street name

  Person.all(quot;addresses.street.likequot; =>
                                   quot;%street%quot; )

    SELECT quot;peoplequot;.quot;idquot;, quot;peoplequot;.quot;namequot; FROM quot;peoplequot;
    INNER JOIN quot;addressesquot; ON (quot;peoplequot;.quot;idquot; = quot;addressesquot;.quot;person_idquot;)
    WHERE (quot;addressesquot;.quot;streetquot; LIKE '%street%')
    ORDER BY quot;peoplequot;.quot;idquot;




Wednesday, May 6, 2009
ADAPTERS

                            RDBMS
                           file system
                              IMAP
                           Sales Force
                              YAML
                           REST APIs
                          custom APIs
                                ...


Wednesday, May 6, 2009
SEQUEL


   • Prepared               Statements

   • Sharding

   • highly              customizable SQL work

   • high          performance



Wednesday, May 6, 2009
HIBERNATE



   • ActionORM

   • JRuby




Wednesday, May 6, 2009
NON RDBMS SYSTEMS


   • AppEngine::Datastore

   • CouchDB              with CouchRest or other DSL

   • Redis, Tokyo          Cabinet etc...




Wednesday, May 6, 2009
RAILS EXTREME


                          only for a few of you




Wednesday, May 6, 2009
CUSTOMIZE RAILS TO THE
                     EXTREME




Wednesday, May 6, 2009
CREATE YOUR OWN RAILS


    • define              your own file structure

    • define              your own router DSL

    • define              your own ways to deal with requests




Wednesday, May 6, 2009
EXTEND
                         ACTIONCONTROLER

       class Presentation < ActionController::Http
         def index
           self.response_body = quot;Rails3 + MacRubyquot;
         end
       end

       Presentation.action(:index).call 
         Rack::MockRequest.env_for(quot;/railsconf10quot;)


Wednesday, May 6, 2009
EXTEND
                         ACTIONCONTROLER
         def action(&blk)
           Class.new(ActionController::Http) do
             include ActionController::Renderer
             define_method(:xtreme, &blk)
           end.action(:xtreme)
         end

         run action do
           render quot;some_templatequot;
         end

Wednesday, May 6, 2009
¿FUTURE?




Wednesday, May 6, 2009
+

                             +
                                 CouchDB
Wednesday, May 6, 2009
credits:
                   http://www.flickr.com/photos/dotdoubledot/
                               Katsushika Hokusai
                                     Delacroix
                                     Benetton
                 http://www.rubyist.net/~matz/slides/oscon2003
                                  Matt Groening
                  http://www.flickr.com/photos/derricksphotos/
                    http://www.flickr.com/photos/bogdansuditu
          http://www.flickr.com/photos/77096872@N00/2547160291/
                http://www.flickr.com/photos/edvvc/1972546648/
                 http://www.flickr.com/photos/amagill/34762677/
         http://www.flickr.com/photos/celinesphotographer/360918623/


Wednesday, May 6, 2009
Thanks
                                 Heidi Vega
                                 Rails team
                                Yehuda Katz
                                 Carl Lerche
                            Laurent Sansonetti
                                 Rich Kilmer
                           Ninh Hernandez Bui
                         Hongli not-so-MacLovin’ Lai
                                 Dan Kubb


Wednesday, May 6, 2009

More Related Content

Viewers also liked

2D Video Games with MacRuby
2D Video Games with MacRuby2D Video Games with MacRuby
2D Video Games with MacRuby
Matt Aimonetti
 
Merb presentation at ORUG
Merb presentation at ORUGMerb presentation at ORUG
Merb presentation at ORUG
Matt Aimonetti
 
CAUSE MARKETING
CAUSE MARKETINGCAUSE MARKETING
CAUSE MARKETING
pavithra gopan
 
TURKAN ARİKAN PAİNTİNGS 1
TURKAN  ARİKAN  PAİNTİNGS  1TURKAN  ARİKAN  PAİNTİNGS  1
TURKAN ARİKAN PAİNTİNGS 1
Turkan Turgut Arikan
 
Merb Plugins 101
Merb Plugins 101Merb Plugins 101
Merb Plugins 101
Matt Aimonetti
 
Lazy Indexing
Lazy IndexingLazy Indexing
Lazy Indexing
Matt Aimonetti
 
Julian Beever Fotos En El Pavimento 1204219940246584 2
Julian Beever Fotos En El Pavimento 1204219940246584 2Julian Beever Fotos En El Pavimento 1204219940246584 2
Julian Beever Fotos En El Pavimento 1204219940246584 2
Cinzia Racca
 
Calendario Per Donne
Calendario Per DonneCalendario Per Donne
Calendario Per Donne
Cinzia Racca
 
Dipinti Di Giuliano Piancastelli
Dipinti Di Giuliano PiancastelliDipinti Di Giuliano Piancastelli
Dipinti Di Giuliano Piancastelli
Cinzia Racca
 
Dichiarazione D Amore
Dichiarazione D AmoreDichiarazione D Amore
Dichiarazione D Amore
Cinzia Racca
 
GoFormz Smart Mobile Forms Overview
GoFormz Smart Mobile Forms OverviewGoFormz Smart Mobile Forms Overview
GoFormz Smart Mobile Forms Overview
Jeffrey Fildey
 
Introduction à DotNetNuke
Introduction à DotNetNukeIntroduction à DotNetNuke
Introduction à DotNetNuke
Microsoft
 
Fast and Furious XAML Apps!
Fast and Furious XAML Apps!Fast and Furious XAML Apps!
Fast and Furious XAML Apps!
Microsoft
 
Du hard et des réseaux: Les outils pour construire l'internet des objets chez...
Du hard et des réseaux: Les outils pour construire l'internet des objets chez...Du hard et des réseaux: Les outils pour construire l'internet des objets chez...
Du hard et des réseaux: Les outils pour construire l'internet des objets chez...
Microsoft
 
Java dans Windows Azure: l'exemple de Jonas
Java dans Windows Azure: l'exemple de JonasJava dans Windows Azure: l'exemple de Jonas
Java dans Windows Azure: l'exemple de Jonas
Microsoft
 
Construire des applications supportant la montée en charge avec SQL Azure (300)
Construire des applications supportant la montée en charge avec SQL Azure (300)Construire des applications supportant la montée en charge avec SQL Azure (300)
Construire des applications supportant la montée en charge avec SQL Azure (300)
Microsoft
 

Viewers also liked (18)

2D Video Games with MacRuby
2D Video Games with MacRuby2D Video Games with MacRuby
2D Video Games with MacRuby
 
Merb presentation at ORUG
Merb presentation at ORUGMerb presentation at ORUG
Merb presentation at ORUG
 
CAUSE MARKETING
CAUSE MARKETINGCAUSE MARKETING
CAUSE MARKETING
 
TURKAN ARİKAN PAİNTİNGS 1
TURKAN  ARİKAN  PAİNTİNGS  1TURKAN  ARİKAN  PAİNTİNGS  1
TURKAN ARİKAN PAİNTİNGS 1
 
Merb Plugins 101
Merb Plugins 101Merb Plugins 101
Merb Plugins 101
 
Lazy Indexing
Lazy IndexingLazy Indexing
Lazy Indexing
 
Julian Beever Fotos En El Pavimento 1204219940246584 2
Julian Beever Fotos En El Pavimento 1204219940246584 2Julian Beever Fotos En El Pavimento 1204219940246584 2
Julian Beever Fotos En El Pavimento 1204219940246584 2
 
Calendario Per Donne
Calendario Per DonneCalendario Per Donne
Calendario Per Donne
 
Dipinti Di Giuliano Piancastelli
Dipinti Di Giuliano PiancastelliDipinti Di Giuliano Piancastelli
Dipinti Di Giuliano Piancastelli
 
Dichiarazione D Amore
Dichiarazione D AmoreDichiarazione D Amore
Dichiarazione D Amore
 
Aeroporto
AeroportoAeroporto
Aeroporto
 
Julian Beever
Julian BeeverJulian Beever
Julian Beever
 
GoFormz Smart Mobile Forms Overview
GoFormz Smart Mobile Forms OverviewGoFormz Smart Mobile Forms Overview
GoFormz Smart Mobile Forms Overview
 
Introduction à DotNetNuke
Introduction à DotNetNukeIntroduction à DotNetNuke
Introduction à DotNetNuke
 
Fast and Furious XAML Apps!
Fast and Furious XAML Apps!Fast and Furious XAML Apps!
Fast and Furious XAML Apps!
 
Du hard et des réseaux: Les outils pour construire l'internet des objets chez...
Du hard et des réseaux: Les outils pour construire l'internet des objets chez...Du hard et des réseaux: Les outils pour construire l'internet des objets chez...
Du hard et des réseaux: Les outils pour construire l'internet des objets chez...
 
Java dans Windows Azure: l'exemple de Jonas
Java dans Windows Azure: l'exemple de JonasJava dans Windows Azure: l'exemple de Jonas
Java dans Windows Azure: l'exemple de Jonas
 
Construire des applications supportant la montée en charge avec SQL Azure (300)
Construire des applications supportant la montée en charge avec SQL Azure (300)Construire des applications supportant la montée en charge avec SQL Azure (300)
Construire des applications supportant la montée en charge avec SQL Azure (300)
 

Similar to Rails3: Stepping off of the golden path

The Future of the UnSummit
The Future of the UnSummitThe Future of the UnSummit
The Future of the UnSummit
Pete Barry
 
ERECOMPI
ERECOMPIERECOMPI
ERECOMPI
Fabio Akita
 
Twitter on Rails
Twitter on RailsTwitter on Rails
Twitter on Rails
Michael Bleigh
 
Uber Vu - Scrum & Startups
Uber Vu - Scrum & StartupsUber Vu - Scrum & Startups
Uber Vu - Scrum & Startups
OpenAgile Romania
 
Encontro de TI - Arteccom
Encontro de TI - ArteccomEncontro de TI - Arteccom
Encontro de TI - Arteccom
Fabio Akita
 
It's the Little Things
It's the Little ThingsIt's the Little Things
It's the Little Things
Paul Armstrong
 
Oxente on Rails 2009
Oxente on Rails 2009Oxente on Rails 2009
Oxente on Rails 2009
Fabio Akita
 
Nigel Holmes @sndnyc
Nigel Holmes @sndnycNigel Holmes @sndnyc
Nigel Holmes @sndnyc
SND Update
 
Web Expo Forum
Web Expo ForumWeb Expo Forum
Web Expo Forum
Fabio Akita
 
Session 7
Session 7 Session 7
Session 7
caseytruffo
 
Accelerating Ruby with LLVM
Accelerating Ruby with LLVMAccelerating Ruby with LLVM
Accelerating Ruby with LLVM
evanphx
 
Internet & Activism: 20 Years After Tiananmen
Internet & Activism: 20 Years After TiananmenInternet & Activism: 20 Years After Tiananmen
Internet & Activism: 20 Years After Tiananmen
rmackinnon
 
How to Feel Good About Yourself No Matter What
How to Feel Good About Yourself No Matter WhatHow to Feel Good About Yourself No Matter What
How to Feel Good About Yourself No Matter What
Tomar Levine
 

Similar to Rails3: Stepping off of the golden path (13)

The Future of the UnSummit
The Future of the UnSummitThe Future of the UnSummit
The Future of the UnSummit
 
ERECOMPI
ERECOMPIERECOMPI
ERECOMPI
 
Twitter on Rails
Twitter on RailsTwitter on Rails
Twitter on Rails
 
Uber Vu - Scrum & Startups
Uber Vu - Scrum & StartupsUber Vu - Scrum & Startups
Uber Vu - Scrum & Startups
 
Encontro de TI - Arteccom
Encontro de TI - ArteccomEncontro de TI - Arteccom
Encontro de TI - Arteccom
 
It's the Little Things
It's the Little ThingsIt's the Little Things
It's the Little Things
 
Oxente on Rails 2009
Oxente on Rails 2009Oxente on Rails 2009
Oxente on Rails 2009
 
Nigel Holmes @sndnyc
Nigel Holmes @sndnycNigel Holmes @sndnyc
Nigel Holmes @sndnyc
 
Web Expo Forum
Web Expo ForumWeb Expo Forum
Web Expo Forum
 
Session 7
Session 7 Session 7
Session 7
 
Accelerating Ruby with LLVM
Accelerating Ruby with LLVMAccelerating Ruby with LLVM
Accelerating Ruby with LLVM
 
Internet & Activism: 20 Years After Tiananmen
Internet & Activism: 20 Years After TiananmenInternet & Activism: 20 Years After Tiananmen
Internet & Activism: 20 Years After Tiananmen
 
How to Feel Good About Yourself No Matter What
How to Feel Good About Yourself No Matter WhatHow to Feel Good About Yourself No Matter What
How to Feel Good About Yourself No Matter What
 

Recently uploaded

Pigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending PlantPigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending Plant
LINUS PROJECTS (INDIA)
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Bert Blevins
 
Salesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot WorkshopSalesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot Workshop
CEPTES Software Inc
 
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSECHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
kumarjarun2010
 
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdfARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
Inglês no Mundo Digital
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
SynapseIndia
 
Using LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and MilvusUsing LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and Milvus
Zilliz
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Torry Harris
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Networks
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
Amul milk launches in US: Key details of its new products ...
Amul milk launches in US: Key details of its new products ...Amul milk launches in US: Key details of its new products ...
Amul milk launches in US: Key details of its new products ...
chetankumar9855
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
Priyanka Aash
 

Recently uploaded (20)

Pigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending PlantPigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending Plant
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
 
Salesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot WorkshopSalesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot Workshop
 
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSECHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
 
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdfARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
 
Using LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and MilvusUsing LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and Milvus
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
Amul milk launches in US: Key details of its new products ...
Amul milk launches in US: Key details of its new products ...Amul milk launches in US: Key details of its new products ...
Amul milk launches in US: Key details of its new products ...
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
 

Rails3: Stepping off of the golden path

  • 1. Rails3 RailsConf2009 - matt aimonetti step off of the golden path Wednesday, May 6, 2009
  • 2. WHO AM I? matt aimonetti Wednesday, May 6, 2009
  • 3. “morally loose, cheese eating surrender monkey” WHO AM I? matt aimonetti Wednesday, May 6, 2009
  • 4. “morally loose, cheese eating surrender monkey” Ted Han WHO AM I? matt aimonetti Wednesday, May 6, 2009
  • 5. “morally loose, cheese eating surrender monkey” Ted Han Ruby Addict WHO AM I? matt aimonetti Wednesday, May 6, 2009
  • 6. “morally loose, cheese eating surrender monkey” Ted Han Ruby Addict Merb WHO AM I? matt aimonetti Wednesday, May 6, 2009
  • 7. “morally loose, cheese eating surrender monkey” Ted Han Ruby Addict Merb Rails WHO AM I? matt aimonetti Wednesday, May 6, 2009
  • 8. “morally loose, cheese eating surrender monkey” Ted Han Ruby Addict Merb Rails MacRuby WHO AM I? matt aimonetti Wednesday, May 6, 2009
  • 9. Rails3 RailsConf2009 - matt aimonetti step off of the golden path Wednesday, May 6, 2009
  • 14. RUBY oscon 2003 Wednesday, May 6, 2009
  • 20. RUBY ON RAILS Convention over Configuration Don't repeat yourself Wednesday, May 6, 2009
  • 23. Performance Agnosticism Wednesday, May 6, 2009
  • 24. Adobe Wikimedia sproutcore/Apple AT&T/yellowpages.com powerset/microsoft ... Wednesday, May 6, 2009
  • 25. SPLIT RUBY COMMUNITY ... Wednesday, May 6, 2009
  • 26. DRAMA ... Wednesday, May 6, 2009
  • 27. SAT DOWN & TALKED ... Wednesday, May 6, 2009
  • 33. WHAT DO YOU GET? Wednesday, May 6, 2009
  • 36. WHAT ARE YOU GOING TO GET improved performance Wednesday, May 6, 2009
  • 37. WHAT ARE YOU GOING TO GET increased modularity Wednesday, May 6, 2009
  • 38. WHAT ARE YOU GOING TO GET agnosticism Wednesday, May 6, 2009
  • 39. WHAT ARE YOU GOING TO GET public API Wednesday, May 6, 2009
  • 40. WHAT ARE YOU GOING TO GET mountable apps Wednesday, May 6, 2009
  • 41. WHAT DOES IT REALLY MEAN? Rails 2 Wednesday, May 6, 2009
  • 42. WHAT DOES IT REALLY MEAN? Rails 3 Wednesday, May 6, 2009
  • 43. CECI N’EST PAS LA RÉALITÉ html, xml, json, js assert_equal(true, AwesomeApp.success?) Rails 2 Wednesday, May 6, 2009
  • 44. CECI N’EST PAS LA RÉALITÉ ERB html, xml, json, js assert_equal(true, AwesomeApp.success?) Rails 2 Wednesday, May 6, 2009
  • 45. CECI N’EST PAS LA RÉALITÉ ERB html, xml, json, js assert_equal(true, AwesomeApp.success?) Rails 2 Wednesday, May 6, 2009
  • 46. CECI N’EST PAS LA RÉALITÉ ERB ActiveRecord html, xml, json, js assert_equal(true, AwesomeApp.success?) Rails 2 Wednesday, May 6, 2009
  • 47. CECI N’EST PAS LA RÉALITÉ ERB ActiveRecord html, xml, json, js Test::Unit assert_equal(true, AwesomeApp.success?) Rails 2 Wednesday, May 6, 2009
  • 48. RAILS 3 DEFAULT STACK • ORM: ActiveRecord • JS: Prototype • Templating: ERB • Testing: Test::Unit Wednesday, May 6, 2009
  • 49. RAILS 3 - DEFAULT STACK html, xml, json, js assert_equal(true, AwesomeApp.success?) Wednesday, May 6, 2009
  • 50. RAILS 3 - DEFAULT STACK ERB html, xml, json, js assert_equal(true, AwesomeApp.success?) Wednesday, May 6, 2009
  • 51. RAILS 3 - DEFAULT STACK ERB html, xml, json, js assert_equal(true, AwesomeApp.success?) Wednesday, May 6, 2009
  • 52. RAILS 3 - DEFAULT STACK ERB ActiveRecord html, xml, json, js assert_equal(true, AwesomeApp.success?) Wednesday, May 6, 2009
  • 53. RAILS 3 - DEFAULT STACK ERB ActiveRecord html, xml, json, js Test::Unit assert_equal(true, AwesomeApp.success?) Wednesday, May 6, 2009
  • 55. NO DRASTIC CHANGES FOR THE END USERS Wednesday, May 6, 2009
  • 63. WE ARE NOT ALL THE SAME Wednesday, May 6, 2009
  • 66. Use default stack? is it a Is there a Use the default stack Y N Y question of reason not and stop overthinking taste? to use it? things N evaluate your requirements: templating, JS, ORM, Performance N is it worth it? Y is it worth it? Y Rails 3 custom stack N Rails 3 default stack Wednesday, May 6, 2009
  • 71. ORM Databases scalar values da ta objects Object Oriented Languages Wednesday, May 6, 2009
  • 72. RAW SQL SELECT * FROM Book WHERE price > 100.00 ORDER BY title; Wednesday, May 6, 2009
  • 73. ACTIVERECORD Book.all :conditions => [quot;price > ?quot;, 100.00], :order => 'title' Wednesday, May 6, 2009
  • 74. DATAMAPPER Book.all :price.gt => 100.00, :order => [:title.asc] Wednesday, May 6, 2009
  • 75. SEQUEL Book.find{|b| b.price > 100.00}.order(:title) Wednesday, May 6, 2009
  • 76. COUCHREST Book.by_price(:startkey => 100.01) Wednesday, May 6, 2009
  • 80. DATAMAPPER @parent = Parent.find_by_name(quot;Mattquot;) @parent.children.each do |child| @parent.object_id.should == child.parent.object_id end Wednesday, May 6, 2009
  • 81. DATAMAPPER @parent = Parent.find_by_name(quot;Mattquot;) @parent.children.each do |child| @parent.object_id.should == child.parent.object_id end Fails with ActiceRecord Wednesday, May 6, 2009
  • 82. DATAMAPPER @parent = Parent.find_by_name(quot;Mattquot;) @parent.children.each do |child| @parent.object_id.should == child.parent.object_id end Fails with ActiceRecord Passes with DataMapper Wednesday, May 6, 2009
  • 83. DATAMAPPER does what ActiveRecord does... but differently Wednesday, May 6, 2009
  • 84. DATAMAPPER Copyright - Merb in Action - Manning db drivers using 1 unified interface Wednesday, May 6, 2009
  • 85. DATAMAPPER • procrastination as a value • Lazy Loading • Strategic Eager Loader Wednesday, May 6, 2009
  • 86. DATAMAPPER students = Student.all students.each do |student| student.books.map{|b| b.name} end Wednesday, May 6, 2009
  • 87. ACTIVERECORD students = Student.all students.each do |student| student.books.map{|b| b.name} end SELECT * FROM quot;studentsquot; SELECT * FROM quot;booksquot; WHERE (quot;booksquot;.student_id = 1) SELECT * FROM quot;booksquot; WHERE (quot;booksquot;.student_id = 2) SELECT * FROM quot;booksquot; WHERE (quot;booksquot;.student_id = 3) SELECT * FROM quot;booksquot; WHERE (quot;booksquot;.student_id = X) Wednesday, May 6, 2009
  • 88. DATAMAPPER students = Student.all students.each do |student| student.books.map{|b| b.name} end SELECT quot;idquot;, quot;namequot; FROM quot;studentsquot; ORDER BY quot;idquot; SELECT quot;idquot;, quot;namequot;, quot;student_idquot; FROM quot;booksquot; WHERE (quot;student_idquot; IN (1, 2, 3, X)) ORDER BY quot;idquot; Wednesday, May 6, 2009
  • 89. MULTIPLE REPOS production: adapter: mysql encoding: utf8 database: production-app username: root password: top-s3ckrit host: localhost repositories: nightly_backup: adapter: sqlite3 database: shared/nightly.db weekly_backup: adapter: sqlite3 database: shared/weekly.db Wednesday, May 6, 2009
  • 90. MULTIPLE REPOS Article.copy(:default, :nightly_backup, :created.gt => 1.day.ago ) Wednesday, May 6, 2009
  • 91. MULTIPLE REPOS class Page include DataMapper::Resource property :id, Serial property :name, String repository(:legacy) do property :name, String, :field => quot;titlequot; end end Wednesday, May 6, 2009
  • 92. QUERY::PATH Find all people with an address that has street in the street name Person.all(quot;addresses.street.likequot; => quot;%street%quot; ) SELECT quot;peoplequot;.quot;idquot;, quot;peoplequot;.quot;namequot; FROM quot;peoplequot; INNER JOIN quot;addressesquot; ON (quot;peoplequot;.quot;idquot; = quot;addressesquot;.quot;person_idquot;) WHERE (quot;addressesquot;.quot;streetquot; LIKE '%street%') ORDER BY quot;peoplequot;.quot;idquot; Wednesday, May 6, 2009
  • 93. ADAPTERS RDBMS file system IMAP Sales Force YAML REST APIs custom APIs ... Wednesday, May 6, 2009
  • 94. SEQUEL • Prepared Statements • Sharding • highly customizable SQL work • high performance Wednesday, May 6, 2009
  • 95. HIBERNATE • ActionORM • JRuby Wednesday, May 6, 2009
  • 96. NON RDBMS SYSTEMS • AppEngine::Datastore • CouchDB with CouchRest or other DSL • Redis, Tokyo Cabinet etc... Wednesday, May 6, 2009
  • 97. RAILS EXTREME only for a few of you Wednesday, May 6, 2009
  • 98. CUSTOMIZE RAILS TO THE EXTREME Wednesday, May 6, 2009
  • 99. CREATE YOUR OWN RAILS • define your own file structure • define your own router DSL • define your own ways to deal with requests Wednesday, May 6, 2009
  • 100. EXTEND ACTIONCONTROLER class Presentation < ActionController::Http def index self.response_body = quot;Rails3 + MacRubyquot; end end Presentation.action(:index).call Rack::MockRequest.env_for(quot;/railsconf10quot;) Wednesday, May 6, 2009
  • 101. EXTEND ACTIONCONTROLER def action(&blk) Class.new(ActionController::Http) do include ActionController::Renderer define_method(:xtreme, &blk) end.action(:xtreme) end run action do render quot;some_templatequot; end Wednesday, May 6, 2009
  • 103. + + CouchDB Wednesday, May 6, 2009
  • 104. credits: http://www.flickr.com/photos/dotdoubledot/ Katsushika Hokusai Delacroix Benetton http://www.rubyist.net/~matz/slides/oscon2003 Matt Groening http://www.flickr.com/photos/derricksphotos/ http://www.flickr.com/photos/bogdansuditu http://www.flickr.com/photos/77096872@N00/2547160291/ http://www.flickr.com/photos/edvvc/1972546648/ http://www.flickr.com/photos/amagill/34762677/ http://www.flickr.com/photos/celinesphotographer/360918623/ Wednesday, May 6, 2009
  • 105. Thanks Heidi Vega Rails team Yehuda Katz Carl Lerche Laurent Sansonetti Rich Kilmer Ninh Hernandez Bui Hongli not-so-MacLovin’ Lai Dan Kubb Wednesday, May 6, 2009