SlideShare a Scribd company logo
Ruby on Rails
Overview




                   Jon Kinney
                Avastone Technologies
What is it?
Ruby the
         Programming
         Language


       Rails the
Web Framework
Language   Framework
  Ruby        Rails
   C#       WebForms

   C#      ASP.NET MVC

  PHP         Zend

  Java        Struts

  Java     Spring MVC
What’s the
 big deal?
Fun!
Easy!
Productive!
Why
should I
 care?
Broaden your Horizons
Learn from other frameworks
and languages

                  Be a better
What is Ruby?
Object Oriented
                       Java




Ruby                  Python
             VB.NET
       C++             C#
Dynamically
               Typed
Not compiled



 
        Code is executed at
run time
The Ruby
Language
The .each Method
Everything’s an objec
Defining
                                    methods




Everything in ruby is true except nil and false

Ruby automatically returns the last statement in a
method
The “unless”
statement
“if” at the end




“else” at the end
Garbage
 Object
               Collection
Oriented




     Good
                 Public and
     IDE’s
                   Private
                  Methods




      Similar to C#
No curly         No
 braces or     Compile-
 semicolon       time
     s         checking




     Dynamic              Interpreted
      Typing




Different from C#
What is Rails?
Ruby on Rails is an open-source web
framework that's optimized for
programmer happiness and sustainable
productivity.

It lets you write beautiful code by
favoring convention over configuration
Model
View
Controller
Framework
Model

req
   ues
      t
              Controller


res
   po
      n  se


                    View
All in one!         ASP.NET    Ruby on Rails
                       MVC
   Presentation       ASP.NET        Rails
                       MVC
Database migrations   T-SQL          Rails

   Data access &      LINQ to        Rails
    persistence       Entities
    Unit testing       NUnit         Rails

Testing web pages       (?)          Rails

Testing cookies and     (?)          Rails
   session state
Opinionated Software


                    Not
                    Academic

Convention
over Configuration
Conventions
• Singular camel cased model/class
names
• Plural lower case and underscored
   • Db table names
   • Variable names
   • Method names
• Primary key called “id”
• Db fields called created_at and
updated_at
   • Get free timestamps when performing
D.R.Y.
Don’t Repeat
Yourself




                  Each piece of knowledge should
               have one and only one place to live
An object that wraps a row in a
database table or view,
encapsulates the database access,
and adds domain logic on that
data. ~ Martin Fowler                Active
                                    Record
Running Rails
Runs on ….
Store stuff in …




                   And others …
Write code with ….
Walkthrough
 Creating a
Rails Project
 in 3 Steps
Step 1
They ALL look like
Step 2 (optional)
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000
Step 3 – Boot Mongrel




            Or use the Passenger Preference Pane for
         Apache2
Tada!!
DEMO
Cookbook

More Related Content

KEY
Wed Development on Rails
PPTX
Introduction to Ruby on Rails
PPT
Introduction to Ruby on Rails
PDF
Ruby an overall approach
PDF
Ruby and Rails short motivation
ODP
Ruby on Rails 3
PDF
Vim 讓你寫 Ruby 的速度飛起來
PDF
Ruby Metaprogramming 08
Wed Development on Rails
Introduction to Ruby on Rails
Introduction to Ruby on Rails
Ruby an overall approach
Ruby and Rails short motivation
Ruby on Rails 3
Vim 讓你寫 Ruby 的速度飛起來
Ruby Metaprogramming 08

What's hot (20)

PDF
Ruby On Rails
KEY
Learn Ruby 2011 - Session 1
PPT
Introduction to Ruby on Rails
PPTX
Coffee scripts with rails
PDF
Ruby Beyond Rails
PDF
My experience of Ruby Education in Taiwan
KEY
Learn Ruby 2011 - Session 2
PPT
Intro To Ror
PDF
Ruby Metaprogramming - OSCON 2008
PPT
PDF
Ruby formatters
PPTX
Javascript
PPTX
Optimizing for programmer happiness
PDF
FGCU Camp Talk
PDF
When Javascript isn't Javascript
PDF
Introduction to Scala
KEY
Opal - Ruby Style!! Ruby in the browser
PPTX
Go for Rubyists. August 2018. RUG-B Meetup
PDF
PHP Frameworks Review - Mar 19 2015
PPT
Ruby versus Rails
Ruby On Rails
Learn Ruby 2011 - Session 1
Introduction to Ruby on Rails
Coffee scripts with rails
Ruby Beyond Rails
My experience of Ruby Education in Taiwan
Learn Ruby 2011 - Session 2
Intro To Ror
Ruby Metaprogramming - OSCON 2008
Ruby formatters
Javascript
Optimizing for programmer happiness
FGCU Camp Talk
When Javascript isn't Javascript
Introduction to Scala
Opal - Ruby Style!! Ruby in the browser
Go for Rubyists. August 2018. RUG-B Meetup
PHP Frameworks Review - Mar 19 2015
Ruby versus Rails
Ad

Similar to Ruby On Rails Overview (20)

PDF
ruby-cocoa
PDF
ruby-cocoa
KEY
Ruby On Rails
PPT
Ruby On Rails
PPTX
Ruby On Rails For .Net Developers
PPTX
Ruby on rails
PPTX
Ruby on Rails : First Mile
PDF
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
PDF
Ruby on rails vs asp.net mvc
PPTX
Server-side Web development via Ruby on Rails
PPTX
Exploring Ruby on Rails and PostgreSQL
PDF
2.3 (Architecture) Moving to Managed Code
PPTX
Ruby on Rails All Hands Meeting
PPTX
IronRuby: Ruby on the .NET Platform
PPTX
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
PPT
Viridians on Rails
PPTX
Beginners' guide to Ruby on Rails
PPTX
Ruby on rails
PPTX
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
PDF
Bhavesh ro r
ruby-cocoa
ruby-cocoa
Ruby On Rails
Ruby On Rails
Ruby On Rails For .Net Developers
Ruby on rails
Ruby on Rails : First Mile
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on rails vs asp.net mvc
Server-side Web development via Ruby on Rails
Exploring Ruby on Rails and PostgreSQL
2.3 (Architecture) Moving to Managed Code
Ruby on Rails All Hands Meeting
IronRuby: Ruby on the .NET Platform
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
Viridians on Rails
Beginners' guide to Ruby on Rails
Ruby on rails
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
Bhavesh ro r
Ad

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
PPTX
Cloud computing and distributed systems.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
cuic standard and advanced reporting.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Modernizing your data center with Dell and AMD
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Dropbox Q2 2025 Financial Results & Investor Presentation
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
Cloud computing and distributed systems.
The Rise and Fall of 3GPP – Time for a Sabbatical?
cuic standard and advanced reporting.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Network Security Unit 5.pdf for BCA BBA.
Modernizing your data center with Dell and AMD
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
The AUB Centre for AI in Media Proposal.docx
20250228 LYD VKU AI Blended-Learning.pptx

Ruby On Rails Overview

Editor's Notes

  • #7: http://www.flickr.com/photos/foreversouls/2357763471/sizes/l/
  • #19: def is_friday? today = Date.today friday = today.end_of_week - 2.days today == friday end today = Date.today puts "I'm in a good mood” if today.is_friday? puts "I'm in a bad mood" unless today.is_friday? today.is_friday? ? "great mood" : "bad mood"
  • #20: Public and private methods don’t “really” exist… you can use send to call them. Private and protected are really just ideas… I intend for you not to call this because I may change this and you should not rely on it
  • #27: Rails isn’t academic software. Every feature is extracted from a plugin or a working project from 37signals
  • #29: http://www.flickr.com/photos/dotdoubledot/1979443914/sizes/l/
  • #30: http://www.flickr.com/photos/redjar/113152393/