SlideShare ist ein Scribd-Unternehmen logo
1 von 105
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Andere mochten auch

2D Video Games with MacRuby
2D Video Games with MacRuby2D Video Games with MacRuby
2D Video Games with MacRubyMatt Aimonetti
 
Merb presentation at ORUG
Merb presentation at ORUGMerb presentation at ORUG
Merb presentation at ORUGMatt 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 2Cinzia Racca
 
Calendario Per Donne
Calendario Per DonneCalendario Per Donne
Calendario Per DonneCinzia Racca
 
Dipinti Di Giuliano Piancastelli
Dipinti Di Giuliano PiancastelliDipinti Di Giuliano Piancastelli
Dipinti Di Giuliano PiancastelliCinzia Racca
 
Dichiarazione D Amore
Dichiarazione D AmoreDichiarazione D Amore
Dichiarazione D AmoreCinzia Racca
 
GoFormz Smart Mobile Forms Overview
GoFormz Smart Mobile Forms OverviewGoFormz Smart Mobile Forms Overview
GoFormz Smart Mobile Forms OverviewJeffrey Fildey
 
Introduction à DotNetNuke
Introduction à DotNetNukeIntroduction à DotNetNuke
Introduction à DotNetNukeMicrosoft
 
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 JonasMicrosoft
 
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
 

Andere mochten auch (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)
 

Ähnlich wie 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 UnSummitPete Barry
 
Encontro de TI - Arteccom
Encontro de TI - ArteccomEncontro de TI - Arteccom
Encontro de TI - ArteccomFabio Akita
 
It's the Little Things
It's the Little ThingsIt's the Little Things
It's the Little ThingsPaul Armstrong
 
Oxente on Rails 2009
Oxente on Rails 2009Oxente on Rails 2009
Oxente on Rails 2009Fabio Akita
 
Nigel Holmes @sndnyc
Nigel Holmes @sndnycNigel Holmes @sndnyc
Nigel Holmes @sndnycSND Update
 
5 Must Haves for Developing Corporate Social Media Strategy
5 Must Haves for Developing Corporate Social Media Strategy5 Must Haves for Developing Corporate Social Media Strategy
5 Must Haves for Developing Corporate Social Media StrategyBob Hazlett
 
Accelerating Ruby with LLVM
Accelerating Ruby with LLVMAccelerating Ruby with LLVM
Accelerating Ruby with LLVMevanphx
 
Internet & Activism: 20 Years After Tiananmen
Internet & Activism: 20 Years After TiananmenInternet & Activism: 20 Years After Tiananmen
Internet & Activism: 20 Years After Tiananmenrmackinnon
 
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 WhatTomar Levine
 

Ähnlich wie Rails3: Stepping off of the golden path (14)

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
 
5 Must Haves for Developing Corporate Social Media Strategy
5 Must Haves for Developing Corporate Social Media Strategy5 Must Haves for Developing Corporate Social Media Strategy
5 Must Haves for Developing Corporate Social Media Strategy
 
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
 

Kürzlich hochgeladen

VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 

Kürzlich hochgeladen (20)

VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
201610817 - edge part1
201610817 - edge part1201610817 - edge part1
201610817 - edge part1
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 

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