SlideShare a Scribd company logo
Rails Summer of Code
                                     Week 1




Richard Schneeman - @ThinkBohemian
Rails - Week 1
              • Rails Architecture
               • MVC (Model View Controller)
               • ORM (Object Relational Mapping)
               • RESTful (REpresentational STate)
              • Ruby
               • Versus Rails
               • Is Object Oriented
Richard Schneeman - @ThinkBohemian
Rails Architecture
            • Terminology
             • DRY
             • Convention over Configuration
            • Rails Architecture
             • MVC (Model View Controller)
             • ORM (Object Relational Mapping)
             • RESTful (REpresentational State Transfer)
Richard Schneeman - @ThinkBohemian
DRY
                           Don’t Repeat Yourself




                       Reuse, don’t re-invent the...



Richard Schneeman - @ThinkBohemian
Convention over
                    Configuration



             Decrease the number of decisions needed,
         gaining simplicity but without losing flexibility.

Richard Schneeman - @ThinkBohemian
Model-View-Controller
    • Isolates “Domain Logic”
     • Can I See it?
        • View
     • Is it Business Logic?
        • Controller
     • Is it a Reusable Class Logic?
        • Model
Richard Schneeman - @ThinkBohemian
Model-View-Controller
    • Generated By Rails
     • Grouped by Folders
     • Connected “AutoMagically”
       • Models
       • Views
       • Controllers
     • Multiple Views Per Controller
Richard Schneeman - @ThinkBohemian
Object Relational Mapping
    • Maps database backend to ruby objects
    • ActiveRecord (Rail’s Default ORM)
            >> userVariable = User.where(:name => "Bob")
                 Generates:
                    SELECT "users".* FROM "users"
                    WHERE (name = 'bob')
            >> userVariable.name
            => Bob



Richard Schneeman - @ThinkBohemian
Object Relational Mapping
    •   >> userVariable = User .where(:name => "Bob")


                          models/user.rb
             class User < ActiveRecord::Base
             end

         the User class inherits from ActiveRecord::Base




Richard Schneeman - @ThinkBohemian
Object Relational Mapping

      •   >> userVariable = User. where(:name => "Bob")

              where is the method that looks in the database
              AutoMagically in the User Table (if you made one)




Richard Schneeman - @ThinkBohemian
RESTful
                       REpresentational State Transfer

          •   The state of the message matters

              •    Different state = different message




                  “You Again?”                   “You Again?”
Richard Schneeman - @ThinkBohemian
RESTful
                       REpresentational State Transfer

        •   Servers don’t care about smiles

        •   They do care about how you access them

        •   (HTTP Methods)

            •   GET

            •   PUT

            •   POST

            •   DELETE

Richard Schneeman - @ThinkBohemian
RESTful
                       REpresentational State Transfer
        •   Rails Maps Actions to HTTP Methods

            •   GET - index, show, new

            •   PUT - update

            •   POST - create

            •   DELETE - destroy




Richard Schneeman - @ThinkBohemian
Ruby Versus Rails
        •   Ruby - Is a programming Language

            •   Like C# or Python

            •   Can be used to program just about anything,

        •   Rails - Is a Framework

            •   Written using Ruby

            •   Provides common web functionality



Richard Schneeman - @ThinkBohemian
Questions?




Richard Schneeman - @ThinkBohemian

More Related Content

Similar to UT on Rails3 2010- Week 1 (20)

PPT
Ruby on rails
chamomilla
 
PPT
Ruby On Rails
guest4faf46
 
KEY
Modern Webdevelopment With Ruby On Rails
Robert Glaser
 
PDF
Ruby on Rails : 簡介與入門
Wen-Tien Chang
 
PPT
Rails 101
The Active Network
 
PDF
Ruby On Rails
Balint Erdi
 
PDF
Ruby on Rails Vs. ASP.NET MVC
Shay Friedman
 
PDF
When To Use Ruby On Rails
dosire
 
PDF
Ruby on rails vs asp.net mvc
Umar Ali
 
PPT
Ruby On Rails
iradarji
 
PDF
VTi Knowledge Database: a LinkedData project
Tom Klaasen
 
PDF
Introduction to Ruby on Rails
Agnieszka Figiel
 
PDF
Rails 2.0 Presentation
Scott Chacon
 
PPTX
Day 2 - Intro to Rails
Barry Jones
 
PDF
Ruby On Rails Basics
Amit Solanki
 
PDF
遇見 Ruby on Rails
Wen-Tien Chang
 
KEY
Why ruby and rails
Reuven Lerner
 
PPTX
RoR: What is it Good For?: Absolutely Something
kdmcclin
 
PPTX
12 Introduction to Rails
Deepak Hagadur Bheemaraju
 
PPT
MVC Demystified: Essence of Ruby on Rails
codeinmotion
 
Ruby on rails
chamomilla
 
Ruby On Rails
guest4faf46
 
Modern Webdevelopment With Ruby On Rails
Robert Glaser
 
Ruby on Rails : 簡介與入門
Wen-Tien Chang
 
Ruby On Rails
Balint Erdi
 
Ruby on Rails Vs. ASP.NET MVC
Shay Friedman
 
When To Use Ruby On Rails
dosire
 
Ruby on rails vs asp.net mvc
Umar Ali
 
Ruby On Rails
iradarji
 
VTi Knowledge Database: a LinkedData project
Tom Klaasen
 
Introduction to Ruby on Rails
Agnieszka Figiel
 
Rails 2.0 Presentation
Scott Chacon
 
Day 2 - Intro to Rails
Barry Jones
 
Ruby On Rails Basics
Amit Solanki
 
遇見 Ruby on Rails
Wen-Tien Chang
 
Why ruby and rails
Reuven Lerner
 
RoR: What is it Good For?: Absolutely Something
kdmcclin
 
12 Introduction to Rails
Deepak Hagadur Bheemaraju
 
MVC Demystified: Essence of Ruby on Rails
codeinmotion
 

More from Richard Schneeman (10)

PDF
Scaling the Web: Databases & NoSQL
Richard Schneeman
 
PDF
Rails 3 Beginner to Builder 2011 Week 8
Richard Schneeman
 
PDF
Rails 3 Beginner to Builder 2011 Week 6
Richard Schneeman
 
PDF
Rails 3 Beginner to Builder 2011 Week 4
Richard Schneeman
 
PDF
Rails 3 Beginner to Builder 2011 Week 3
Richard Schneeman
 
PDF
Rails 3 Beginner to Builder 2011 Week 2
Richard Schneeman
 
PDF
Rails 3 Beginner to Builder 2011 Week 1
Richard Schneeman
 
KEY
Potential Friend Finder
Richard Schneeman
 
KEY
Rails3 Summer of Code 2010 - Week 6
Richard Schneeman
 
KEY
UT on Rails3 2010- Week 2
Richard Schneeman
 
Scaling the Web: Databases & NoSQL
Richard Schneeman
 
Rails 3 Beginner to Builder 2011 Week 8
Richard Schneeman
 
Rails 3 Beginner to Builder 2011 Week 6
Richard Schneeman
 
Rails 3 Beginner to Builder 2011 Week 4
Richard Schneeman
 
Rails 3 Beginner to Builder 2011 Week 3
Richard Schneeman
 
Rails 3 Beginner to Builder 2011 Week 2
Richard Schneeman
 
Rails 3 Beginner to Builder 2011 Week 1
Richard Schneeman
 
Potential Friend Finder
Richard Schneeman
 
Rails3 Summer of Code 2010 - Week 6
Richard Schneeman
 
UT on Rails3 2010- Week 2
Richard Schneeman
 
Ad

Recently uploaded (14)

PDF
self love, mindfulness, psychology, growth
tanya99budhiraja
 
PPTX
UP SDRF History English.pptxdownload it is easy to understand
aanyatiwari1015
 
PPTX
09CHAPTER-O1-Areas-Exposed-to-Hazards-Disaster-from-Difft.-Perspectives.pptx
jeromedmangino23
 
PPTX
Banking_Fraud_Presentation_with_Visuals.
johnwick25061999
 
PDF
Make an IMPACT: A Framework to Transform People, Teams, and Futures
Chandan Patary
 
PPTX
Positive Role Modeling for Personal Growth.pptx
StrengthsTheatre
 
PPTX
Jurnal international conferences ISSRESTEC
TheodoraSinta
 
DOCX
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
ERKhelemba
 
PPT
Assessment according to 19011-3 presentation.ppt
ibr1722011
 
PDF
Why Tripura Now Relies Heavily on Civil Services Over IAS Officers.pdf
blogging022
 
PPTX
Emotional Intelligence Understanding and Recognition
ssuser9fcca3
 
PPTX
why-journaling-helps-in-self-growth.pptx
StrengthsTheatre
 
PPTX
what is personality and Personality Development.pptx
Teenu10
 
PPTX
Presentatiof local anaesthesiaonon1.pptx
harmanjotsingh483731
 
self love, mindfulness, psychology, growth
tanya99budhiraja
 
UP SDRF History English.pptxdownload it is easy to understand
aanyatiwari1015
 
09CHAPTER-O1-Areas-Exposed-to-Hazards-Disaster-from-Difft.-Perspectives.pptx
jeromedmangino23
 
Banking_Fraud_Presentation_with_Visuals.
johnwick25061999
 
Make an IMPACT: A Framework to Transform People, Teams, and Futures
Chandan Patary
 
Positive Role Modeling for Personal Growth.pptx
StrengthsTheatre
 
Jurnal international conferences ISSRESTEC
TheodoraSinta
 
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
ERKhelemba
 
Assessment according to 19011-3 presentation.ppt
ibr1722011
 
Why Tripura Now Relies Heavily on Civil Services Over IAS Officers.pdf
blogging022
 
Emotional Intelligence Understanding and Recognition
ssuser9fcca3
 
why-journaling-helps-in-self-growth.pptx
StrengthsTheatre
 
what is personality and Personality Development.pptx
Teenu10
 
Presentatiof local anaesthesiaonon1.pptx
harmanjotsingh483731
 
Ad

UT on Rails3 2010- Week 1

  • 1. Rails Summer of Code Week 1 Richard Schneeman - @ThinkBohemian
  • 2. Rails - Week 1 • Rails Architecture • MVC (Model View Controller) • ORM (Object Relational Mapping) • RESTful (REpresentational STate) • Ruby • Versus Rails • Is Object Oriented Richard Schneeman - @ThinkBohemian
  • 3. Rails Architecture • Terminology • DRY • Convention over Configuration • Rails Architecture • MVC (Model View Controller) • ORM (Object Relational Mapping) • RESTful (REpresentational State Transfer) Richard Schneeman - @ThinkBohemian
  • 4. DRY Don’t Repeat Yourself Reuse, don’t re-invent the... Richard Schneeman - @ThinkBohemian
  • 5. Convention over Configuration Decrease the number of decisions needed, gaining simplicity but without losing flexibility. Richard Schneeman - @ThinkBohemian
  • 6. Model-View-Controller • Isolates “Domain Logic” • Can I See it? • View • Is it Business Logic? • Controller • Is it a Reusable Class Logic? • Model Richard Schneeman - @ThinkBohemian
  • 7. Model-View-Controller • Generated By Rails • Grouped by Folders • Connected “AutoMagically” • Models • Views • Controllers • Multiple Views Per Controller Richard Schneeman - @ThinkBohemian
  • 8. Object Relational Mapping • Maps database backend to ruby objects • ActiveRecord (Rail’s Default ORM) >> userVariable = User.where(:name => "Bob") Generates: SELECT "users".* FROM "users" WHERE (name = 'bob') >> userVariable.name => Bob Richard Schneeman - @ThinkBohemian
  • 9. Object Relational Mapping • >> userVariable = User .where(:name => "Bob") models/user.rb class User < ActiveRecord::Base end the User class inherits from ActiveRecord::Base Richard Schneeman - @ThinkBohemian
  • 10. Object Relational Mapping • >> userVariable = User. where(:name => "Bob") where is the method that looks in the database AutoMagically in the User Table (if you made one) Richard Schneeman - @ThinkBohemian
  • 11. RESTful REpresentational State Transfer • The state of the message matters • Different state = different message “You Again?” “You Again?” Richard Schneeman - @ThinkBohemian
  • 12. RESTful REpresentational State Transfer • Servers don’t care about smiles • They do care about how you access them • (HTTP Methods) • GET • PUT • POST • DELETE Richard Schneeman - @ThinkBohemian
  • 13. RESTful REpresentational State Transfer • Rails Maps Actions to HTTP Methods • GET - index, show, new • PUT - update • POST - create • DELETE - destroy Richard Schneeman - @ThinkBohemian
  • 14. Ruby Versus Rails • Ruby - Is a programming Language • Like C# or Python • Can be used to program just about anything, • Rails - Is a Framework • Written using Ruby • Provides common web functionality Richard Schneeman - @ThinkBohemian