SlideShare uma empresa Scribd logo
1 de 146
density!"!




Ruby on Rails
An Historical Introduction




Cleveland Web Sig                   June 19, 2010
Overview
Joe Fiorini
Rails Developer, Technology Evangelist, Husband, Dog
Lover
density!"!
Goals
Why to use Rails?
What’s Ruby and what’s Rails?
How does Rails make developers happy?
Where do I go for more information?
Assumptions
Assumptions
Basic HTTP knowledge
Assumptions
Basic HTTP knowledge
Basic object-oriented principles
Assumptions
Basic HTTP knowledge
Basic object-oriented principles
Dynamic web development
Assumptions
Basic HTTP knowledge
Basic object-oriented principles
Dynamic web development
SQL
#websigrails
For the Twits
Core Philosophy
DRY
Don’t Repeat Yourself
Convention Over Configuration
Get Started Faster!
REST
Your Application as an API
MVC
Model
Data Tier
View
Displayed to the user
Controller
Tying the model and view together
“
I'm trying to make Ruby natural,
not simple.



                     Yukihiro “Matz” Matsumoto
ActionPack
ActiveModel
ActionMailer
ActiveResource


ActiveSupport

Railties
ActionPack
ActiveModel
ActionMailer
ActiveResource


ActiveSupport

Railties
ActionPack
ActiveModel
ActionMailer
ActiveResource


ActiveSupport

Railties
ActionPack
ActiveModel
ActionMailer
ActiveResource


ActiveSupport

Railties
ActionPack
ActiveModel
ActionMailer
ActiveResource


ActiveSupport

Railties
ActionPack
ActiveModel
ActionMailer
ActiveResource


ActiveSupport

Railties
ActionPack
ActiveModel
ActionMailer
ActiveResource


ActiveSupport

Railties
ActionPack
ActiveModel
ActionMailer
ActiveResource


ActiveSupport

Railties
Life of a Request
http://www.densitypop.com/
ActionPack




             ActionDispatch
ActionPack



    Blog3::Application.routes.draw do |map|

     root :to => "posts#index"

    end
ActionPack




             ActionDispatch
ActionPack
 ActionDispatch
ActionPack
  ActionDispatch




                   ActionController
ActionPack
  ActionDispatch



       class PostsController < ApplicationController

        def index
         @posts = Post.order("created_at DESC").
                  limit(10)
        end

       end
ActionPack
  ActionDispatch                                   Inheritence

       class PostsController < ApplicationController


        def index
         @posts = Post.order("created_at DESC").
                  limit(10)
        end

       end
ActionPack
  ActionDispatch
                               Instance Method

             class PostsController < ApplicationController

              def index
               @posts = Post.order("created_at DESC").
                        limit(10)
              end

             end
ActionPack
  ActionDispatch
                            Instance Variable (field/private variable)

             class PostsController < ApplicationController

              def index
                 @posts
                    = Post.order("created_at DESC").
                        limit(10)
              end

             end
ActionPack
  ActionDispatch
                    Class                   Class method (static)

             class PostsController < ApplicationController

              def index
               @posts =     Post.order("created_at DESC").
                               limit(10)
              end

             end
ActionPack
  ActionDispatch




                   ActionController
ActionPack
  ActionDispatch   ActionController
ActiveModel
  ActionDispatch         ActionController




                   ActiveRecord
ActiveRecord




                  SQLite/
                  MySQL/
               PostgreSQL/…
ActiveRecord

                    SQLite/
                    MySQL/
                   MongoDB/…




                       posts
               id
               title
               body
ActiveRecord

               SQLite/
               MySQL/
              MongoDB/…




                  posts
          id              Post
          title
          body
ActiveRecord




    class Post < ActiveRecord::Base
    end
ActiveRecord



    post.title
    post.body
    post.id

    post.save
    post.destroy
ActiveRecord




    Post.find_by_title "Awesomest post ever!"

    SELECT * FROM posts WHERE title = 'Awesomest post ever!'
ActiveRecord




    Post.where("title = 'Awesomest post ever!'")

    SELECT * FROM posts WHERE title = 'Awesomest post ever!'
ActiveRecord



    Post.joins(:authors).where("authors.name = 'Joe'")

    SELECT * FROM posts INNER JOIN authors ON
      posts.author_id = authors.id
      WHERE authors.author_name = 'Joe'
ActiveRecord



    Post.find_by_title "Awesomest post ever!"

    vs.
    Post.where("title = 'Awesomest post ever!'")
ActiveRecord
    class CreatePosts < ActiveRecord::Migration
     def self.up
       create_table :posts do |t|
        t.string :title
        t.text :body

       t.timestamps
      end
     end

     def self.down
      drop_table :posts
     end
    end
ActiveRecord


    Validations
      validates_presence_of
      validates_uniqueness_of
      validates_format_of
      validates_length_of
      …
ActiveRecord




    http://guides.rails.info
    RTFM
ActiveModel
  ActionDispatch             ActionController




       class Post < ActiveRecord::Base
       end
ActiveModel
  ActionDispatch         ActionController




                   ActiveRecord
ActiveModel
  ActionDispatch   ActionController

                   ActiveRecord
ActionPack
  ActionDispatch         ActionController

                         ActiveRecord




                   ActionView
ActionPack
  ActionDispatch             ActionController

                             ActiveRecord

       <ol>

        <% @posts.each do |post| %>

         <li class="post">

           <h2><%= link_to post.title, post %></h2>
           <span><%= post.body %></span>

         </li>

        <% end %>

       </ol>
ActionPack
  ActionDispatch             Iterator (for loop)
                              ActionController

                             ActiveRecord

       <ol>



        <% @posts.each do |post| %>

         <li class="post">

           <h2><%= link_to post.title, post %></h2>
           <span><%= post.body %></span>

         </li>

        <% end %>
       </ol>
ActionPack
Block (anonymous function)
  ActionDispatch             ActionController

                             ActiveRecord        Block parameter
       <ol>

        <% @posts.each do |post| %>
                  do |post| %>
         <li class="post">

           <h2><%= link_to post.title, post %></h2>
           <span><%= post.body %></span>

         </li>

        <% end %>
        <% end %>
       </ol>
ActionPack
  ActionDispatch             ActionController

                             ActiveRecord


Helper method
    <ol>

        <% @posts.each do |post| %>

         <li class="post">

           <h2>                   </h2>
           <span><%= post.body %></span> %>
                 <%= link_to post.title, post
         </li>

        <% end %>

       </ol>
ActionPack
  ActionDispatch             ActionController

                             ActiveRecord


Helper method
    <ol>

        <% @posts.each do |post| %>

         <li class="post">

           <h2>                   </h2>
           <span><%= post.body %></span> %>
                 <%= link_to post.title, post
         </li>

        <% end %> <a href="...">Post Title</a>

       </ol>
ActionPack
  ActionDispatch         ActionController

                         ActiveRecord




                   ActionView
ActionPack
  ActionDispatch   ActionController   ActionView

                   ActiveRecord


       <html>
       ...
       </html>
http://densitypop.com/posts/22
ActionPack




             ActionDispatch
ActionPack



    Blog3::Application.routes.draw do |map|

     resources :posts

    end
GET /posts/new
Post#new
POST /posts
Post#create
GET /posts/edit/22
Post#edit
PUT /post/22
Post#update
GET /posts/22
Post#show
DELETE /posts/22
Post#destroy
ActionPack




             ActionDispatch
ActionPack
 ActionDispatch
ActionPack
  ActionDispatch




                   ActionController
ActionPack
  ActionDispatch




      class PostsController < ApplicationController

        def show
         @post = Post.find(params[:id])
        end

      end
ActionPack
  ActionDispatch

 Request Parameter Hash

       class PostsController < ApplicationController

        def show
         @post = Post.find(       )
        end                     params[:id]

       end
ActionPack
  ActionDispatch




                   ActionController
ActionPack
  ActionDispatch   ActionController
ActiveModel
  ActionDispatch         ActionController




                   ActiveRecord
ActiveModel
  ActionDispatch             ActionController




       class Post < ActiveRecord::Base
       end
ActiveModel
  ActionDispatch         ActionController




                   ActiveRecord
ActiveModel
  ActionDispatch   ActionController

                   ActiveRecord
ActionPack
  ActionDispatch         ActionController

                         ActiveRecord




                   ActionView
ActionPack
  ActionDispatch            ActionController

                            ActiveRecord




       <h1><%= link_to @post.title, @post %></h1>
       <span><%= @post.body %></span>
ActionPack
  ActionDispatch         ActionController

                         ActiveRecord




                   ActionView
ActionPack
  ActionDispatch   ActionController   ActionView

                   ActiveRecord


       <html>
       ...
       </html>
http://densitypop.com/feed.xml
ActionPack




             ActionDispatch
ActionPack



    Blog3::Application.routes.draw do |map|

     match 'feed.xml', :to => 'posts#index'

    end
ActionPack




             ActionDispatch
ActionPack
 ActionDispatch
ActionPack
  ActionDispatch




                   ActionController
ActionPack
  ActionDispatch


      class PostsController < ApplicationController
       respond_to :xml

        def index
         respond_with(@posts = Post.
                      order("created_at DESC").
                      limit(10))
        end

      end
ActionPack
  ActionDispatch




                   ActionController
ActionPack
  ActionDispatch   ActionController
ActiveModel
  ActionDispatch         ActionController




                   ActiveRecord
ActiveModel
  ActionDispatch             ActionController




       class Post < ActiveRecord::Base
       end
ActiveModel
  ActionDispatch         ActionController




                   ActiveRecord
ActiveModel
  ActionDispatch   ActionController

                   ActiveRecord
ActionPack
  ActionDispatch         ActionController

                         ActiveRecord




                   ActionView
ActionPack
  ActionDispatch              ActionController

                              ActiveRecord


       atom_feed do |feed|
        feed.title("Joe's Awesome Blog!")
        feed.updated(@posts.first.created_at)

        @posts.each do |post|
         feed.entry(post) do |entry|
          entry.title(post.title)
          entry.content(post.body, :type => 'html')
          entry.author { |author| author.name("Joe") }
         end
        end

       end
http://densitypop.com/posts.json
ActionPack




             ActionDispatch
ActionPack



    Blog3::Application.routes.draw do |map|

     resources :posts

    end
ActionPack




             ActionDispatch
ActionPack
 ActionDispatch
ActionPack
  ActionDispatch




                   ActionController
ActionPack
  ActionDispatch


      class PostsController < ApplicationController
       respond_to :xml, :json

        def index
         respond_with(@posts = Post.
                      order("created_at DESC").
                      limit(10))
        end

      end
ActionPack
  ActionDispatch




                   ActionController
ActionPack
  ActionDispatch   ActionController
ActiveModel
  ActionDispatch         ActionController




                   ActiveRecord
ActiveModel
  ActionDispatch             ActionController




       class Post < ActiveRecord::Base
       end
ActiveModel
  ActionDispatch         ActionController




                   ActiveRecord
ActiveModel
  ActionDispatch   ActionController

                   ActiveRecord
ActionPack
  ActionDispatch         ActionController

                         ActiveRecord




                   ActionView
ActionPack
  ActionDispatch                 ActionController

                                 ActiveRecord




       [This slide intentionally left blank]
There you go.
Isn’t that easy?
Digging Deeper
Nothing is Sacred
Anything can be overridden
Not all magic
Some illusions too
Enterprise Ready
http://www.workingwithrails.com/high-profile-organisations
http://bit.ly/websigrailslinks
Resources


            http://bit.ly/websigrailslinks
Cleveland Ruby Brigade
http://www.meetup.com/ClevelandRuby




                         http://bit.ly/websigrailslinks
Agile Web Dev. with Rails
http://pragprog.com/titles/rails4/




                              http://bit.ly/websigrailslinks
Rails 3 in Action
http://www.manning.com/katz/




                          http://bit.ly/websigrailslinks
http://bit.ly/websigrailslinks
The End
http://speakerrate.com/joefiorini
Please rate this talk (only if it’s good)!

Mais conteúdo relacionado

Mais procurados

[2015/2016] Local data storage for web-based mobile apps
[2015/2016] Local data storage for web-based mobile apps[2015/2016] Local data storage for web-based mobile apps
[2015/2016] Local data storage for web-based mobile appsIvano Malavolta
 
Ruby on Rails: Coding Guideline
Ruby on Rails: Coding GuidelineRuby on Rails: Coding Guideline
Ruby on Rails: Coding GuidelineNascenia IT
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Coursepeter_marklund
 
Laravel 8 export data as excel file with example
Laravel 8 export data as excel file with exampleLaravel 8 export data as excel file with example
Laravel 8 export data as excel file with exampleKaty Slemon
 
JavaScript - Chapter 7 - Advanced Functions
 JavaScript - Chapter 7 - Advanced Functions JavaScript - Chapter 7 - Advanced Functions
JavaScript - Chapter 7 - Advanced FunctionsWebStackAcademy
 
REST APIs in Laravel 101
REST APIs in Laravel 101REST APIs in Laravel 101
REST APIs in Laravel 101Samantha Geitz
 
jQuery - Chapter 3 - Effects
jQuery - Chapter 3 - Effects  jQuery - Chapter 3 - Effects
jQuery - Chapter 3 - Effects WebStackAcademy
 
JSP - Java Server Page
JSP - Java Server PageJSP - Java Server Page
JSP - Java Server PageVipin Yadav
 
Web Applications and Deployment
Web Applications and DeploymentWeb Applications and Deployment
Web Applications and DeploymentBG Java EE Course
 
Distributed Ruby and Rails
Distributed Ruby and RailsDistributed Ruby and Rails
Distributed Ruby and RailsWen-Tien Chang
 

Mais procurados (20)

[2015/2016] Local data storage for web-based mobile apps
[2015/2016] Local data storage for web-based mobile apps[2015/2016] Local data storage for web-based mobile apps
[2015/2016] Local data storage for web-based mobile apps
 
Angular JS
Angular JSAngular JS
Angular JS
 
Jsp
JspJsp
Jsp
 
Jsp
JspJsp
Jsp
 
Ruby on Rails: Coding Guideline
Ruby on Rails: Coding GuidelineRuby on Rails: Coding Guideline
Ruby on Rails: Coding Guideline
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
 
Spring Mvc Rest
Spring Mvc RestSpring Mvc Rest
Spring Mvc Rest
 
Laravel 8 export data as excel file with example
Laravel 8 export data as excel file with exampleLaravel 8 export data as excel file with example
Laravel 8 export data as excel file with example
 
JavaScript - Chapter 7 - Advanced Functions
 JavaScript - Chapter 7 - Advanced Functions JavaScript - Chapter 7 - Advanced Functions
JavaScript - Chapter 7 - Advanced Functions
 
REST APIs in Laravel 101
REST APIs in Laravel 101REST APIs in Laravel 101
REST APIs in Laravel 101
 
Implicit object.pptx
Implicit object.pptxImplicit object.pptx
Implicit object.pptx
 
Jsp presentation
Jsp presentationJsp presentation
Jsp presentation
 
jQuery - Chapter 3 - Effects
jQuery - Chapter 3 - Effects  jQuery - Chapter 3 - Effects
jQuery - Chapter 3 - Effects
 
Jsp element
Jsp elementJsp element
Jsp element
 
jQuery
jQueryjQuery
jQuery
 
JSP - Java Server Page
JSP - Java Server PageJSP - Java Server Page
JSP - Java Server Page
 
Web Applications and Deployment
Web Applications and DeploymentWeb Applications and Deployment
Web Applications and Deployment
 
Data Access with JDBC
Data Access with JDBCData Access with JDBC
Data Access with JDBC
 
Distributed Ruby and Rails
Distributed Ruby and RailsDistributed Ruby and Rails
Distributed Ruby and Rails
 

Semelhante a An Introduction to Ruby on Rails

Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkIndicThreads
 
Scala based Lift Framework
Scala based Lift FrameworkScala based Lift Framework
Scala based Lift Frameworkvhazrati
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overviewYehuda Katz
 
Ruby/Rails
Ruby/RailsRuby/Rails
Ruby/Railsrstankov
 
WordPress as the Backbone(.js)
WordPress as the Backbone(.js)WordPress as the Backbone(.js)
WordPress as the Backbone(.js)Beau Lebens
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the FinishYehuda Katz
 
Rails vs Web2py
Rails vs Web2pyRails vs Web2py
Rails vs Web2pyjonromero
 
Pourquoi ruby et rails déchirent
Pourquoi ruby et rails déchirentPourquoi ruby et rails déchirent
Pourquoi ruby et rails déchirentNicolas Ledez
 
Introduction à Ruby
Introduction à RubyIntroduction à Ruby
Introduction à RubyMicrosoft
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortalJennifer Bourey
 
Taming Core Data by Arek Holko, Macoscope
Taming Core Data by Arek Holko, MacoscopeTaming Core Data by Arek Holko, Macoscope
Taming Core Data by Arek Holko, MacoscopeMacoscope
 
jQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends ForeverjQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends Foreverstephskardal
 
Ride on the Fast Track of Web with Ruby on Rails- Part 2
Ride on the Fast Track of Web with Ruby on Rails- Part 2Ride on the Fast Track of Web with Ruby on Rails- Part 2
Ride on the Fast Track of Web with Ruby on Rails- Part 2A.K.M. Ahsrafuzzaman
 
What's new in Rails 4
What's new in Rails 4What's new in Rails 4
What's new in Rails 4Fabio Akita
 
Associations & JavaScript
Associations & JavaScriptAssociations & JavaScript
Associations & JavaScriptJoost Elfering
 

Semelhante a An Introduction to Ruby on Rails (20)

Rails is not just Ruby
Rails is not just RubyRails is not just Ruby
Rails is not just Ruby
 
Overview Of Lift Framework
Overview Of Lift FrameworkOverview Of Lift Framework
Overview Of Lift Framework
 
Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web Framework
 
Scala based Lift Framework
Scala based Lift FrameworkScala based Lift Framework
Scala based Lift Framework
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
 
Ruby/Rails
Ruby/RailsRuby/Rails
Ruby/Rails
 
WordPress as the Backbone(.js)
WordPress as the Backbone(.js)WordPress as the Backbone(.js)
WordPress as the Backbone(.js)
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
 
Rails vs Web2py
Rails vs Web2pyRails vs Web2py
Rails vs Web2py
 
Pourquoi ruby et rails déchirent
Pourquoi ruby et rails déchirentPourquoi ruby et rails déchirent
Pourquoi ruby et rails déchirent
 
Introduction à Ruby
Introduction à RubyIntroduction à Ruby
Introduction à Ruby
 
jQuery
jQueryjQuery
jQuery
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortal
 
Taming Core Data by Arek Holko, Macoscope
Taming Core Data by Arek Holko, MacoscopeTaming Core Data by Arek Holko, Macoscope
Taming Core Data by Arek Holko, Macoscope
 
jQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends ForeverjQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends Forever
 
React
React React
React
 
Ride on the Fast Track of Web with Ruby on Rails- Part 2
Ride on the Fast Track of Web with Ruby on Rails- Part 2Ride on the Fast Track of Web with Ruby on Rails- Part 2
Ride on the Fast Track of Web with Ruby on Rails- Part 2
 
What's new in Rails 4
What's new in Rails 4What's new in Rails 4
What's new in Rails 4
 
Let's react - Meetup
Let's react - MeetupLet's react - Meetup
Let's react - Meetup
 
Associations & JavaScript
Associations & JavaScriptAssociations & JavaScript
Associations & JavaScript
 

Último

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 

Último (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 

An Introduction to Ruby on Rails

Notas do Editor

  1. TAKE IT SLOW Pause after topics Take some deep breaths Walk to other side of projector when pausing
  2. Within3
  3. - Ecommerce Sites on Shopify - iPad/iPhone R&amp;D - Consulting
  4. - Ecommerce Sites on Shopify - iPad/iPhone R&amp;D - Consulting
  5. If I throw out a term that you don&amp;#x2019;t understand, please feel free to ask!
  6. If I throw out a term that you don&amp;#x2019;t understand, please feel free to ask!
  7. If I throw out a term that you don&amp;#x2019;t understand, please feel free to ask!
  8. If I throw out a term that you don&amp;#x2019;t understand, please feel free to ask!
  9. Write once, use everywhere Code is easier to consume Easier to edit later
  10. How many have not used MVC? It&amp;#x2019;s up to you to architect and organize your code in those tools. Rails makes that decision for you by implementing MVC.
  11. Code driving the UI that gets displayed to the user
  12. Interacts with model and sends the data to the view
  13. - Open source framework for developing web applications - Created by David Heinemeier Hansson - 1.0 was an extremely opinionated framework - 3.0 allows you to change many of the opinions &amp;#x2026;Written in the language
  14. - Everything has a type, but the language infers types at runtime instead of you specifying them up front
  15. Remembering names is not important; knowing how the pieces fit together &amp; interact is
  16. Utility collection and standard Ruby core extensions used both by Rails itself and your application
  17. The glue; ties together framework libraries and 3rd party plugins
  18. Build an application through the life of an HTTP request
  19. - List 10 most recent posts, newest first
  20. ...since for most of you this is your first time seeing Ruby code, let&amp;#x2019;s look at this a little bit
  21. any instance variables in a controller are automatically handed into the view
  22. ...since for most of you this is your first time seeing Ruby code, let&amp;#x2019;s look at this a little bit
  23. ActiveRecord is.... Default option, but you can use any ORM that implements ActiveModel
  24. Inheriting from ActiveRecord::Base does some pretty cool things for us
  25. Because I have a class called Post AR knows to look up... it also gives us some more time saving methods like...
  26. find_by_title will call SQL right away .where (and other query methods) will delegate the SQL call to the first time the array is used
  27. Way to go forward and backwards between versions of your database
  28. We didn&amp;#x2019;t have to write a single line of data access code
  29. &amp;#x2026;here&amp;#x2019;s some more strange Ruby syntax
  30. this helper method generates the html for a link
  31. this helper method generates the html for a link
  32. &amp;#x2026;this generates a number of helpful routes for us
  33. ...since for most of you this is your first time seeing Ruby code, let&amp;#x2019;s look at this a little bit
  34. params[:id] comes from resources route
  35. ActiveRecord is.... Default option, but you can use any ORM that implements ActiveModel
  36. We still haven&amp;#x2019;t written a single line of data access code
  37. &amp;#x2026;here&amp;#x2019;s some more strange Ruby syntax
  38. &amp;#x2026;this generates a number of helpful routes for us
  39. ...since for most of you this is your first time seeing Ruby code, let&amp;#x2019;s look at this a little bit
  40. ActiveRecord is.... Default option, but you can use any ORM that implements ActiveModel
  41. We still haven&amp;#x2019;t written a single line of data access code
  42. With builder all of our block parameters become parent XML tags and all of our method calls child tags; we define attributes by passing a hash to a tag method &amp;#x2026;what if we wanted to enable easy Javascript interaction?
  43. &amp;#x2026;this generates a number of helpful routes for us
  44. ...since for most of you this is your first time seeing Ruby code, let&amp;#x2019;s look at this a little bit
  45. ActiveRecord is.... Default option, but you can use any ORM that implements ActiveModel
  46. We still haven&amp;#x2019;t written a single line of data access code
  47. respond_with tells ActionController to format the object if it can Rails can convert any object into JSON
  48. We&amp;#x2019;ve barely scratched the surface of what Rails can do.
  49. Convention is very powerful, but sometimes it makes sense to override the defaults
  50. Rails gets most of its flexibility from the Ruby language. Uses &amp;#x201C;metaprogramming&amp;#x201D; to generate code at runtime. Optimized for the best of productivity &amp; performance.
  51. You&amp;#x2019;d be surprised to see who&amp;#x2019;s using Rails.
  52. Highly recommend some further reading to get a better feel for how you can make Rails work for you.
  53. ...in case you missed it