SlideShare a Scribd company logo
1 of 41
“Web development that doesn’t hurt”


Thursday, February 5, 2009
“Faster, Lighter, More Agile”


Thursday, February 5, 2009
Merb == Rails
                      Merb != Rails
                      Rails << Merb

Thursday, February 5, 2009
Merb == Rails


Thursday, February 5, 2009
“Rails is a Model View Controller
             web framework written in Ruby.”




Thursday, February 5, 2009
“Merb is a Model View Controller
           web framework written in Ruby.”




Thursday, February 5, 2009
merb-gen app blog   rails blog
Thursday, February 5, 2009
Merb != Rails


Thursday, February 5, 2009
Merb = Mongrel + erb




Thursday, February 5, 2009
Hey there folks-

                        I'm happy to announce the first useable release of my new pocket-
                                         Merb is a mongrel handler with
                        framework Merb.
                        built in controller and view templating with
                        erb. It has a nice routing system similar to rails but much simpler.
                        It uses some of the code from the camping handler and the rails
                        handler and then some of its own secret sauce
                        to form imho a nice fast little framework.

                                                            -- Ezra Zygmuntowicz, 10-2006




Thursday, February 5, 2009
Merb -= Mongrel
                             Merb -= erb




Thursday, February 5, 2009
Enter Rack
             “Rack provides an minimal interface between webservers
                    supporting Ruby and Ruby frameworks.”




Thursday, February 5, 2009
Camping           Passenger


                             Ramaze            Mongrel


                                        Rack
                              Merb               Thin


                             Sinatra           WEBrick


                                ...               ...

                             Handlers          Adapters


Thursday, February 5, 2009
Rails          Merb

                             ORM     ActiveRecord    Pick one!


                   Test framework     Test::Unit    Don’t care!


                Template language        erb        Your choice!


                      JS framework    Prototype     Whatever!



Thursday, February 5, 2009
rails
                                The full monty under your
                             fingertips with a single command.




Thursday, February 5, 2009
actionmailer

                              actionpack

                              activerecord

                             activeresource

                             activesupport

                                  rails




Thursday, February 5, 2009
merb
                             Small core, build your personal
                               stack with available gems.




Thursday, February 5, 2009
merb-helpers        merb-cache

                                merb-mailer                 merb-assets

                              merb-slices                 merb-action-args

                                              merb-core

                             merb-param-protection         merb-exceptions

                                 merb-auth-core        merb-auth-more

                                        merb-auth-slice-password




Thursday, February 5, 2009
“the framework”
                                   merb-helpers        merb-cache
                                                             - Router
                                                            - Controller
                                merb-mailer                 merb-assets
                                                            - Logger
                                                              - Provide hooks for plugins
                              merb-slices                 merb-action-args

                                              merb-core

                             merb-param-protection         merb-exceptions

                                 merb-auth-core        merb-auth-more

                                        merb-auth-slice-password




Thursday, February 5, 2009
merb-helpers        merb-cache

                                merb-mailer                 merb-assets

                              merb-slices                 merb-action-args

                                              merb-core

                             merb-param-protection         merb-exceptions

                                 merb-auth-core        merb-auth-more

                                        merb-auth-slice-password




Thursday, February 5, 2009
ActionController::Base   ActionMailer::Base




Thursday, February 5, 2009
Merb::AbstractController




                             Merb::Controller                  Merb::MailController




Thursday, February 5, 2009
Plugins

Thursday, February 5, 2009
Gems

Thursday, February 5, 2009
Rails << Merb


Thursday, February 5, 2009
rails-core




Thursday, February 5, 2009
Rails 3

                                  ORM             Pick one!


                              Test framework     Don’t care!


                             Template language   Your choice!


                               JS framework      Whatever!



Thursday, February 5, 2009
Rails 3

                                  ORM             Pick one!


                              Test framework     Don’t care!


                             Template language   Your choice!


                               JS framework      Whatever!



Thursday, February 5, 2009
Rails 3

                                  ORM             Pick one!


                                  Agnosticism!
                              Test framework     Don’t care!


                             Template language   Your choice!


                               JS framework      Whatever!



Thursday, February 5, 2009
Public



                                API
                             With tests to ensure it doesn’t
                              magically change overtime!

Thursday, February 5, 2009
DataMapper




Thursday, February 5, 2009
SELECT * FROM persons WHERE country = 'NL'




Thursday, February 5, 2009
SELECT * FROM persons WHERE country = 'NL'




             AR: Person.find(:all, :conditions => [quot;country = ?quot;, quot;NLquot;])




Thursday, February 5, 2009
SELECT * FROM persons WHERE country = 'NL'




             AR: Person.find(:all, :conditions => [quot;country = ?quot;, quot;NLquot;])



                             DM: Person.all(:country => quot;NLquot;)




Thursday, February 5, 2009
SELECT * FROM persons WHERE age BETWEEN 18
                 AND 21 ORDER BY AGE DESC




Thursday, February 5, 2009
SELECT * FROM persons WHERE age BETWEEN 18
                 AND 21 ORDER BY AGE DESC



       AR: Person.find(:all, :conditions => [quot;age BETWEEN ? AND ?quot;, 18,
               21], :order => quot;age DESCquot;) # => :( SQL fragments!




Thursday, February 5, 2009
SELECT * FROM persons WHERE age BETWEEN 18
                 AND 21 ORDER BY AGE DESC



       AR: Person.find(:all, :conditions => [quot;age BETWEEN ? AND ?quot;, 18,
               21], :order => quot;age DESCquot;) # => :( SQL fragments!



   DM: Person.all(:age.gt => 18, :age.lt => 21, :order => [:age.desc])




Thursday, February 5, 2009
Nice: “strategic eager loading”
                                    100 zoos; 250 exhibits

                zoos = Zoo.all
                zoos.each do |zoo|
                  zoo.exhibits.each do |exhibit|
                    puts quot;Zoo: #{zoo.name}, Exhibit: #{exhibit.name}quot;
                  end
                end


                                                       Queries
                             ActiveRecord
                             DataMapper


Thursday, February 5, 2009
Nice: “strategic eager loading”
                                    100 zoos; 250 exhibits

                zoos = Zoo.all
                zoos.each do |zoo|
                  zoo.exhibits.each do |exhibit|
                    puts quot;Zoo: #{zoo.name}, Exhibit: #{exhibit.name}quot;
                  end
                end


                                                       Queries
                                                        101
                             ActiveRecord
                             DataMapper


Thursday, February 5, 2009
Nice: “strategic eager loading”
                                    100 zoos; 250 exhibits

                zoos = Zoo.all
                zoos.each do |zoo|
                  zoo.exhibits.each do |exhibit|
                    puts quot;Zoo: #{zoo.name}, Exhibit: #{exhibit.name}quot;
                  end
                end


                                                       Queries
                                                        101
                             ActiveRecord
                                                         2
                             DataMapper


Thursday, February 5, 2009
Associations


    class Zoo
      include DataMapper::Resource
                                                  class Zoo < ActiveRecord::Base
      belongs_to :owner                             belongs_to :owner
      has 1, :cafetaria                             has_one :cafetaria
      has n, :animals                               has_many :animals
      has n, :donors, :through => Resource          has_and_belongs_to_many :donors
      has n, :zookeepers, :through => :agencies     has_many :zookeepers, :through => :agencies
    end                                           end




Thursday, February 5, 2009

More Related Content

Viewers also liked

Steve connolly pilot presentation for madrid
Steve connolly pilot presentation for madridSteve connolly pilot presentation for madrid
Steve connolly pilot presentation for madridcpremolino
 
Ball de gitanes per carnetoltes: recuperem la tradició!
Ball de gitanes per carnetoltes: recuperem la tradició!Ball de gitanes per carnetoltes: recuperem la tradició!
Ball de gitanes per carnetoltes: recuperem la tradició!gitanesantaeuliaron
 
Horizon Report Presentation Innovation Day 2014
Horizon Report Presentation Innovation Day 2014Horizon Report Presentation Innovation Day 2014
Horizon Report Presentation Innovation Day 2014National University
 
10 Thought Leaders Boiled Down 1204103143410416 4
10 Thought Leaders Boiled Down 1204103143410416 410 Thought Leaders Boiled Down 1204103143410416 4
10 Thought Leaders Boiled Down 1204103143410416 4kevin haynes
 
Legacy Case Study Garry Wilkinson 091009
Legacy  Case  Study  Garry  Wilkinson 091009Legacy  Case  Study  Garry  Wilkinson 091009
Legacy Case Study Garry Wilkinson 091009Graham Richards
 
Sandip Mukherjee CV
Sandip Mukherjee CVSandip Mukherjee CV
Sandip Mukherjee CVsandipm
 
Class Guidelines and Procedures
Class Guidelines and ProceduresClass Guidelines and Procedures
Class Guidelines and ProceduresCarlos Vázquez
 
Building research student communities: is there a role for library and learni...
Building research student communities: is there a role for library and learni...Building research student communities: is there a role for library and learni...
Building research student communities: is there a role for library and learni...Jo Webb
 
Matt King Email Marketing Core Concepts And Best Practice (Sept09)
Matt King Email Marketing   Core Concepts And Best Practice (Sept09)Matt King Email Marketing   Core Concepts And Best Practice (Sept09)
Matt King Email Marketing Core Concepts And Best Practice (Sept09)bestmarketing
 
Social Networks - Social Networking
Social Networks - Social NetworkingSocial Networks - Social Networking
Social Networks - Social Networkingmuehl
 
Legacies From Scratch Presentation Sheffield Hallam Sept 09
Legacies From Scratch Presentation   Sheffield Hallam Sept 09Legacies From Scratch Presentation   Sheffield Hallam Sept 09
Legacies From Scratch Presentation Sheffield Hallam Sept 09Graham Richards
 
In library school or job hunting: tips & tricks to build up your professional...
In library school or job hunting: tips & tricks to build up your professional...In library school or job hunting: tips & tricks to build up your professional...
In library school or job hunting: tips & tricks to build up your professional...Lisa Chow
 
AsstrA Animals English 2009 V2
AsstrA Animals English 2009 V2AsstrA Animals English 2009 V2
AsstrA Animals English 2009 V2Pavel Red'ko
 
4 SITE DIGITAL MARKETING PRESENTATION
4 SITE DIGITAL MARKETING PRESENTATION4 SITE DIGITAL MARKETING PRESENTATION
4 SITE DIGITAL MARKETING PRESENTATION4 Site Digital
 
Reconocimientos al alumnado IES ITABA 2011-2012
Reconocimientos al alumnado IES ITABA 2011-2012Reconocimientos al alumnado IES ITABA 2011-2012
Reconocimientos al alumnado IES ITABA 2011-2012iesitaba
 

Viewers also liked (20)

Steve connolly pilot presentation for madrid
Steve connolly pilot presentation for madridSteve connolly pilot presentation for madrid
Steve connolly pilot presentation for madrid
 
Ball de gitanes per carnetoltes: recuperem la tradició!
Ball de gitanes per carnetoltes: recuperem la tradició!Ball de gitanes per carnetoltes: recuperem la tradició!
Ball de gitanes per carnetoltes: recuperem la tradició!
 
Horizon Report Presentation Innovation Day 2014
Horizon Report Presentation Innovation Day 2014Horizon Report Presentation Innovation Day 2014
Horizon Report Presentation Innovation Day 2014
 
10 Thought Leaders Boiled Down 1204103143410416 4
10 Thought Leaders Boiled Down 1204103143410416 410 Thought Leaders Boiled Down 1204103143410416 4
10 Thought Leaders Boiled Down 1204103143410416 4
 
Legacy Case Study Garry Wilkinson 091009
Legacy  Case  Study  Garry  Wilkinson 091009Legacy  Case  Study  Garry  Wilkinson 091009
Legacy Case Study Garry Wilkinson 091009
 
Sandip Mukherjee CV
Sandip Mukherjee CVSandip Mukherjee CV
Sandip Mukherjee CV
 
Class Guidelines and Procedures
Class Guidelines and ProceduresClass Guidelines and Procedures
Class Guidelines and Procedures
 
Building research student communities: is there a role for library and learni...
Building research student communities: is there a role for library and learni...Building research student communities: is there a role for library and learni...
Building research student communities: is there a role for library and learni...
 
Maria Seredyszyn Hames Country
Maria Seredyszyn Hames CountryMaria Seredyszyn Hames Country
Maria Seredyszyn Hames Country
 
The Copywriter's Handbook 文案创作完全手册 Chap1
The Copywriter's Handbook 文案创作完全手册 Chap1The Copywriter's Handbook 文案创作完全手册 Chap1
The Copywriter's Handbook 文案创作完全手册 Chap1
 
Matt King Email Marketing Core Concepts And Best Practice (Sept09)
Matt King Email Marketing   Core Concepts And Best Practice (Sept09)Matt King Email Marketing   Core Concepts And Best Practice (Sept09)
Matt King Email Marketing Core Concepts And Best Practice (Sept09)
 
Social Networks - Social Networking
Social Networks - Social NetworkingSocial Networks - Social Networking
Social Networks - Social Networking
 
Guión 24 enero
Guión 24 eneroGuión 24 enero
Guión 24 enero
 
Go Zone Presentation
Go Zone PresentationGo Zone Presentation
Go Zone Presentation
 
Legacies From Scratch Presentation Sheffield Hallam Sept 09
Legacies From Scratch Presentation   Sheffield Hallam Sept 09Legacies From Scratch Presentation   Sheffield Hallam Sept 09
Legacies From Scratch Presentation Sheffield Hallam Sept 09
 
In library school or job hunting: tips & tricks to build up your professional...
In library school or job hunting: tips & tricks to build up your professional...In library school or job hunting: tips & tricks to build up your professional...
In library school or job hunting: tips & tricks to build up your professional...
 
AsstrA Animals English 2009 V2
AsstrA Animals English 2009 V2AsstrA Animals English 2009 V2
AsstrA Animals English 2009 V2
 
Best of Web 2.0
Best  of Web 2.0 Best  of Web 2.0
Best of Web 2.0
 
4 SITE DIGITAL MARKETING PRESENTATION
4 SITE DIGITAL MARKETING PRESENTATION4 SITE DIGITAL MARKETING PRESENTATION
4 SITE DIGITAL MARKETING PRESENTATION
 
Reconocimientos al alumnado IES ITABA 2011-2012
Reconocimientos al alumnado IES ITABA 2011-2012Reconocimientos al alumnado IES ITABA 2011-2012
Reconocimientos al alumnado IES ITABA 2011-2012
 

Similar to Rails and Merb

Merb The Super Bike Of Frameworks
Merb The Super Bike Of FrameworksMerb The Super Bike Of Frameworks
Merb The Super Bike Of FrameworksRowan Hick
 
Caching, Memcached And Rails
Caching, Memcached And RailsCaching, Memcached And Rails
Caching, Memcached And Railsguestac752c
 
Merb presentation at ORUG
Merb presentation at ORUGMerb presentation at ORUG
Merb presentation at ORUGMatt Aimonetti
 
Developing Cocoa Applications with macRuby
Developing Cocoa Applications with macRubyDeveloping Cocoa Applications with macRuby
Developing Cocoa Applications with macRubyBrendan Lim
 
程序员0806期敏捷与性能的博弈
程序员0806期敏捷与性能的博弈程序员0806期敏捷与性能的博弈
程序员0806期敏捷与性能的博弈Jesse Cai
 
Ruby and Rails for womens
Ruby and Rails for womensRuby and Rails for womens
Ruby and Rails for womenss4nx
 
The Future of JRuby - Baruco 2013
The Future of JRuby - Baruco 2013The Future of JRuby - Baruco 2013
The Future of JRuby - Baruco 2013Charles Nutter
 
Building Apis That Rock
Building Apis That RockBuilding Apis That Rock
Building Apis That RockJeff Eaton
 

Similar to Rails and Merb (10)

Merb The Super Bike Of Frameworks
Merb The Super Bike Of FrameworksMerb The Super Bike Of Frameworks
Merb The Super Bike Of Frameworks
 
Caching, Memcached And Rails
Caching, Memcached And RailsCaching, Memcached And Rails
Caching, Memcached And Rails
 
Merb presentation at ORUG
Merb presentation at ORUGMerb presentation at ORUG
Merb presentation at ORUG
 
ERECOMPI
ERECOMPIERECOMPI
ERECOMPI
 
Developing Cocoa Applications with macRuby
Developing Cocoa Applications with macRubyDeveloping Cocoa Applications with macRuby
Developing Cocoa Applications with macRuby
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
程序员0806期敏捷与性能的博弈
程序员0806期敏捷与性能的博弈程序员0806期敏捷与性能的博弈
程序员0806期敏捷与性能的博弈
 
Ruby and Rails for womens
Ruby and Rails for womensRuby and Rails for womens
Ruby and Rails for womens
 
The Future of JRuby - Baruco 2013
The Future of JRuby - Baruco 2013The Future of JRuby - Baruco 2013
The Future of JRuby - Baruco 2013
 
Building Apis That Rock
Building Apis That RockBuilding Apis That Rock
Building Apis That Rock
 

Recently uploaded

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Rails and Merb

  • 1. “Web development that doesn’t hurt” Thursday, February 5, 2009
  • 2. “Faster, Lighter, More Agile” Thursday, February 5, 2009
  • 3. Merb == Rails Merb != Rails Rails << Merb Thursday, February 5, 2009
  • 4. Merb == Rails Thursday, February 5, 2009
  • 5. “Rails is a Model View Controller web framework written in Ruby.” Thursday, February 5, 2009
  • 6. “Merb is a Model View Controller web framework written in Ruby.” Thursday, February 5, 2009
  • 7. merb-gen app blog rails blog Thursday, February 5, 2009
  • 8. Merb != Rails Thursday, February 5, 2009
  • 9. Merb = Mongrel + erb Thursday, February 5, 2009
  • 10. Hey there folks- I'm happy to announce the first useable release of my new pocket- Merb is a mongrel handler with framework Merb. built in controller and view templating with erb. It has a nice routing system similar to rails but much simpler. It uses some of the code from the camping handler and the rails handler and then some of its own secret sauce to form imho a nice fast little framework. -- Ezra Zygmuntowicz, 10-2006 Thursday, February 5, 2009
  • 11. Merb -= Mongrel Merb -= erb Thursday, February 5, 2009
  • 12. Enter Rack “Rack provides an minimal interface between webservers supporting Ruby and Ruby frameworks.” Thursday, February 5, 2009
  • 13. Camping Passenger Ramaze Mongrel Rack Merb Thin Sinatra WEBrick ... ... Handlers Adapters Thursday, February 5, 2009
  • 14. Rails Merb ORM ActiveRecord Pick one! Test framework Test::Unit Don’t care! Template language erb Your choice! JS framework Prototype Whatever! Thursday, February 5, 2009
  • 15. rails The full monty under your fingertips with a single command. Thursday, February 5, 2009
  • 16. actionmailer actionpack activerecord activeresource activesupport rails Thursday, February 5, 2009
  • 17. merb Small core, build your personal stack with available gems. Thursday, February 5, 2009
  • 18. merb-helpers merb-cache merb-mailer merb-assets merb-slices merb-action-args merb-core merb-param-protection merb-exceptions merb-auth-core merb-auth-more merb-auth-slice-password Thursday, February 5, 2009
  • 19. “the framework” merb-helpers merb-cache - Router - Controller merb-mailer merb-assets - Logger - Provide hooks for plugins merb-slices merb-action-args merb-core merb-param-protection merb-exceptions merb-auth-core merb-auth-more merb-auth-slice-password Thursday, February 5, 2009
  • 20. merb-helpers merb-cache merb-mailer merb-assets merb-slices merb-action-args merb-core merb-param-protection merb-exceptions merb-auth-core merb-auth-more merb-auth-slice-password Thursday, February 5, 2009
  • 21. ActionController::Base ActionMailer::Base Thursday, February 5, 2009
  • 22. Merb::AbstractController Merb::Controller Merb::MailController Thursday, February 5, 2009
  • 25. Rails << Merb Thursday, February 5, 2009
  • 27. Rails 3 ORM Pick one! Test framework Don’t care! Template language Your choice! JS framework Whatever! Thursday, February 5, 2009
  • 28. Rails 3 ORM Pick one! Test framework Don’t care! Template language Your choice! JS framework Whatever! Thursday, February 5, 2009
  • 29. Rails 3 ORM Pick one! Agnosticism! Test framework Don’t care! Template language Your choice! JS framework Whatever! Thursday, February 5, 2009
  • 30. Public API With tests to ensure it doesn’t magically change overtime! Thursday, February 5, 2009
  • 32. SELECT * FROM persons WHERE country = 'NL' Thursday, February 5, 2009
  • 33. SELECT * FROM persons WHERE country = 'NL' AR: Person.find(:all, :conditions => [quot;country = ?quot;, quot;NLquot;]) Thursday, February 5, 2009
  • 34. SELECT * FROM persons WHERE country = 'NL' AR: Person.find(:all, :conditions => [quot;country = ?quot;, quot;NLquot;]) DM: Person.all(:country => quot;NLquot;) Thursday, February 5, 2009
  • 35. SELECT * FROM persons WHERE age BETWEEN 18 AND 21 ORDER BY AGE DESC Thursday, February 5, 2009
  • 36. SELECT * FROM persons WHERE age BETWEEN 18 AND 21 ORDER BY AGE DESC AR: Person.find(:all, :conditions => [quot;age BETWEEN ? AND ?quot;, 18, 21], :order => quot;age DESCquot;) # => :( SQL fragments! Thursday, February 5, 2009
  • 37. SELECT * FROM persons WHERE age BETWEEN 18 AND 21 ORDER BY AGE DESC AR: Person.find(:all, :conditions => [quot;age BETWEEN ? AND ?quot;, 18, 21], :order => quot;age DESCquot;) # => :( SQL fragments! DM: Person.all(:age.gt => 18, :age.lt => 21, :order => [:age.desc]) Thursday, February 5, 2009
  • 38. Nice: “strategic eager loading” 100 zoos; 250 exhibits zoos = Zoo.all zoos.each do |zoo| zoo.exhibits.each do |exhibit| puts quot;Zoo: #{zoo.name}, Exhibit: #{exhibit.name}quot; end end Queries ActiveRecord DataMapper Thursday, February 5, 2009
  • 39. Nice: “strategic eager loading” 100 zoos; 250 exhibits zoos = Zoo.all zoos.each do |zoo| zoo.exhibits.each do |exhibit| puts quot;Zoo: #{zoo.name}, Exhibit: #{exhibit.name}quot; end end Queries 101 ActiveRecord DataMapper Thursday, February 5, 2009
  • 40. Nice: “strategic eager loading” 100 zoos; 250 exhibits zoos = Zoo.all zoos.each do |zoo| zoo.exhibits.each do |exhibit| puts quot;Zoo: #{zoo.name}, Exhibit: #{exhibit.name}quot; end end Queries 101 ActiveRecord 2 DataMapper Thursday, February 5, 2009
  • 41. Associations class Zoo include DataMapper::Resource class Zoo < ActiveRecord::Base belongs_to :owner belongs_to :owner has 1, :cafetaria has_one :cafetaria has n, :animals has_many :animals has n, :donors, :through => Resource has_and_belongs_to_many :donors has n, :zookeepers, :through => :agencies has_many :zookeepers, :through => :agencies end end Thursday, February 5, 2009

Editor's Notes