SlideShare a Scribd company logo
Ruby On Rails
Building Web Applications Is Fun!
What is Ruby on Rails?

Rails is a full-stack framework for developing
 database-backed web applications according
       to the Model-View-Control pattern.

– www.rubyonrails.org - Ruby on Rails official site
RoR Trivia

• Written in Ruby
• Creator of Ruby on Rails
    – David Heinemeier Hansson
•   Birth: July 2004
•   Latest: 2.1.1: 4 September 2008
•   Based on SmallTalk, Perl, Lisp
•   Not strongly typed
What is Ruby?

 Dynamic, high level, interpreted, pure object-
             orientated language.

“Ruby is designed to make programmers happy”
         Yukihiro Matsumoto aka Matz
Ruby Trivia

• Creator of Ruby
  – Yukihiro Matsumoto aka Matz
• Birthday: 24 February 1993
• Originated in Japan and Rapidly
  Gaining Mindshare in US and Europe.
Design Principles
Design Principles

                    Model - View - Controller

    • Separate data (model) from user interface (view)

    • Model
         – data access and business logic
         – independent of the view and controller
    • View
         – data presentation and user interaction
         – read-only access to the model
    • Controller
         – handling events
         – operating on model and view
Design Principles

                    Database Persistence

    • OR mapping
         – Active Record design pattern
    • migrations
         – incremental schema management
    • multiple db adapters
         – MySQL, PostgreSQL, SQLite, SQL Server, IBM DB2,
           Informix, Oracle
Design Principles

                    Full Stack Framework

    •   MVC suite
    •   built-in webserver
    •   default db adapter
    •   AJAX, web services, email
    •   test framework
    •   plugins
Design Principles

                    Convention over Configuration

    • fixed directory structure
         – everything has its place – source files, libs, plugins,
           database files, documentation etc
    • file naming conventions
         – e.g. camel case class name, underscore file name
    • database naming conventions
         – table names, primary and foreign keys
    • standard configuration files
         – e.g. database connections, environment setting definitions
           (development, production, test)
Design Principles

                    DRY - Don’t Repeat Yourself

    • reusing code
         – e.g. view elements
    • reusing data
         – e.g. no need to declare table field names – can be read
           from the database
    • making each line of code work harder
         – e.g. mini languages for specific domains
    • object-relational mapping
    • metaprogramming
         – dynamically created methods
MVC Architecture
MVC Architecture

                   MVC Architecture
MVC Architecture

                   Model - ActiveRecord

    • Object Relational Mapping
        – “ActiveRecord”
    • Less Database “glue” Code
    • Logging for Performance Checking
MVC Architecture

                        Model : Rules

    • Table Names
        – Plurals
    • Attribute Names
        – id for primary key in table
        – table_id for foreign key in other table
MVC Architecture

                       View - ActionView

    • multiple template types
        – oldest and basic: erb (embedded ruby), similar to e.g. jsp
        – remote javascript templates
        – xml templates
    • easy reuse of view elements
        – file inclusion – layouts, templates, partials
        – multiple standard "helpers" – common html element
          generators (e.g. form elements, paginators)
    • easy AJAX integration
MVC Architecture

                   Controller : ActionController

    • Method name matches view folder
        – users_controller.rb works for
          /views/users/***.rhtml
        – called “actions”
        – all view’s methods will sit there
    • Ability to
        – CRUD
        – Flash
        – Redirect
Some Comparisons
RoR vs. Java
 Comparison of Rails and J2EE stacks
Usage & Support
Usage & Support

                   Web Servers

    •   Lighttpd
    •   Mongrel
    •   WEBrick
    •   Apache
Usage & Support

                      RoR Databases

    •   Mysql
    •   Oracle
    •   Postgre Sql
    •   SqlLite
Usage & Support

                  Websites on Rails
Usage & Support

                  Companies Using Rails
References
•   www.slideshare.net
•   www.youtube.com
•   www.google.com
•   http://www.netbeans.org/kb/docs/ruby/rapid-rub
•   http://guides.rails.info/getting_started.html
•   www.rubyonrails.org
•   http://www.tutorialspoint.com/ruby-on-rails-2.1
Thank You.!!

More Related Content

What's hot

Lecture #5 Introduction to rails
Lecture #5 Introduction to railsLecture #5 Introduction to rails
Lecture #5 Introduction to rails
Evgeniy Hinyuk
 
Shooting rabbits with sling
Shooting rabbits with slingShooting rabbits with sling
Shooting rabbits with sling
Tomasz Rękawek
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
Alfresco Software
 
9 Months Web Development Diploma Course in North Delhi
9 Months Web Development Diploma Course in North Delhi9 Months Web Development Diploma Course in North Delhi
9 Months Web Development Diploma Course in North Delhi
Jessica Smith
 
itPage LDC 09 Presentation
itPage LDC 09 PresentationitPage LDC 09 Presentation
itPage LDC 09 Presentation
Eric Landmann
 
Bhavesh ro r
Bhavesh ro rBhavesh ro r
Bhavesh ro r
bhavesh-gloscon
 
Keystone.js 101
Keystone.js 101Keystone.js 101
Keystone.js 101
Alexander Roche
 
A Custom Drupal Theme in 40 Minutes
A Custom Drupal Theme in 40 MinutesA Custom Drupal Theme in 40 Minutes
A Custom Drupal Theme in 40 Minutes
Snake Hill Web Agency
 
Project First presentation about introduction to technologies to be used
Project First presentation about introduction to technologies to be usedProject First presentation about introduction to technologies to be used
Project First presentation about introduction to technologies to be used
arya krazydude
 
Introduction to Monsoon PHP framework
Introduction to Monsoon PHP frameworkIntroduction to Monsoon PHP framework
Introduction to Monsoon PHP framework
Krishna Srikanth Manda
 
Mastering asp.net mvc - Dot Net Tricks
Mastering asp.net mvc - Dot Net TricksMastering asp.net mvc - Dot Net Tricks
Mastering asp.net mvc - Dot Net Tricks
Gaurav Singh
 
Psd 2 Drupal
Psd 2 DrupalPsd 2 Drupal
Psd 2 Drupal
Nicolas Borda
 
Start using less css
Start using less cssStart using less css
Start using less css
Ali MasudianPour
 
Alfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursAlfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy Behaviours
J V
 
Why ruby and rails
Why ruby and railsWhy ruby and rails
Why ruby and rails
Reuven Lerner
 
October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101
Eric Sembrat
 
Introduction to Browser DOM
Introduction to Browser DOMIntroduction to Browser DOM
Introduction to Browser DOMSiva Arunachalam
 
Open Source CMS Playroom
Open Source CMS PlayroomOpen Source CMS Playroom
Open Source CMS Playroomlibrarywebchic
 

What's hot (20)

Lecture #5 Introduction to rails
Lecture #5 Introduction to railsLecture #5 Introduction to rails
Lecture #5 Introduction to rails
 
Shooting rabbits with sling
Shooting rabbits with slingShooting rabbits with sling
Shooting rabbits with sling
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
 
9 Months Web Development Diploma Course in North Delhi
9 Months Web Development Diploma Course in North Delhi9 Months Web Development Diploma Course in North Delhi
9 Months Web Development Diploma Course in North Delhi
 
itPage LDC 09 Presentation
itPage LDC 09 PresentationitPage LDC 09 Presentation
itPage LDC 09 Presentation
 
Web Ninja
Web NinjaWeb Ninja
Web Ninja
 
Bhavesh ro r
Bhavesh ro rBhavesh ro r
Bhavesh ro r
 
Keystone.js 101
Keystone.js 101Keystone.js 101
Keystone.js 101
 
A Custom Drupal Theme in 40 Minutes
A Custom Drupal Theme in 40 MinutesA Custom Drupal Theme in 40 Minutes
A Custom Drupal Theme in 40 Minutes
 
Project First presentation about introduction to technologies to be used
Project First presentation about introduction to technologies to be usedProject First presentation about introduction to technologies to be used
Project First presentation about introduction to technologies to be used
 
Introduction to Monsoon PHP framework
Introduction to Monsoon PHP frameworkIntroduction to Monsoon PHP framework
Introduction to Monsoon PHP framework
 
Mastering asp.net mvc - Dot Net Tricks
Mastering asp.net mvc - Dot Net TricksMastering asp.net mvc - Dot Net Tricks
Mastering asp.net mvc - Dot Net Tricks
 
Psd 2 Drupal
Psd 2 DrupalPsd 2 Drupal
Psd 2 Drupal
 
Start using less css
Start using less cssStart using less css
Start using less css
 
Efficient theming in Drupal
Efficient theming in DrupalEfficient theming in Drupal
Efficient theming in Drupal
 
Alfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursAlfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy Behaviours
 
Why ruby and rails
Why ruby and railsWhy ruby and rails
Why ruby and rails
 
October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101
 
Introduction to Browser DOM
Introduction to Browser DOMIntroduction to Browser DOM
Introduction to Browser DOM
 
Open Source CMS Playroom
Open Source CMS PlayroomOpen Source CMS Playroom
Open Source CMS Playroom
 

Viewers also liked

Honeypots
HoneypotsHoneypots
Honeypots
HoneypotsHoneypots
Honeypots
SARANYA S
 
Honey Pot
Honey PotHoney Pot
Honey Pot
iradarji
 
Honeypots
HoneypotsHoneypots
Honeypots
Jayant Gandhi
 

Viewers also liked (6)

Honeypots
HoneypotsHoneypots
Honeypots
 
Honeypots
HoneypotsHoneypots
Honeypots
 
Honeypot
Honeypot Honeypot
Honeypot
 
Honey Pot
Honey PotHoney Pot
Honey Pot
 
Honeypots
HoneypotsHoneypots
Honeypots
 
Honeypots
HoneypotsHoneypots
Honeypots
 

Similar to Ruby On Rails

Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails_zaMmer_
 
Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails_zaMmer_
 
6 weeks 6 months live project summer industrial training in cmc limited 2012
6 weeks  6 months live project summer industrial training in cmc limited  20126 weeks  6 months live project summer industrial training in cmc limited  2012
6 weeks 6 months live project summer industrial training in cmc limited 2012
CMC Limited
 
Client Side MVC with Backbone and Rails
Client Side MVC with Backbone and RailsClient Side MVC with Backbone and Rails
Client Side MVC with Backbone and Rails
Tom Z Zeng
 
JCR - Java Content Repositories
JCR - Java Content RepositoriesJCR - Java Content Repositories
JCR - Java Content Repositories
Carsten Ziegeler
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
Agnieszka Figiel
 
Rails - getting started
Rails - getting startedRails - getting started
Rails - getting started
True North
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Review
netc2012
 
Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門Wen-Tien Chang
 
Full Stack Developer Course | Infinite Graphix Technologies
Full Stack Developer Course | Infinite Graphix TechnologiesFull Stack Developer Course | Infinite Graphix Technologies
Full Stack Developer Course | Infinite Graphix Technologies
Infinite Graphix Technologies
 
Melbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDBMelbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDB
Yuval Ararat
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Nilesh Panchal
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an Overview
Matt Weaver
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
Derek Jacoby
 
Demystifying Ruby on Rails
Demystifying Ruby on Rails Demystifying Ruby on Rails
Demystifying Ruby on Rails
Johan Pretorius
 
Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Wen-Tien Chang
 
Intro to Big Data and NoSQL
Intro to Big Data and NoSQLIntro to Big Data and NoSQL
Intro to Big Data and NoSQLDon Demcsak
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecturedrewz lin
 
Qcon 090408233824-phpapp01
Qcon 090408233824-phpapp01Qcon 090408233824-phpapp01
Qcon 090408233824-phpapp01jgregory1234
 

Similar to Ruby On Rails (20)

Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails
 
Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails
 
6 weeks 6 months live project summer industrial training in cmc limited 2012
6 weeks  6 months live project summer industrial training in cmc limited  20126 weeks  6 months live project summer industrial training in cmc limited  2012
6 weeks 6 months live project summer industrial training in cmc limited 2012
 
Client Side MVC with Backbone and Rails
Client Side MVC with Backbone and RailsClient Side MVC with Backbone and Rails
Client Side MVC with Backbone and Rails
 
JCR - Java Content Repositories
JCR - Java Content RepositoriesJCR - Java Content Repositories
JCR - Java Content Repositories
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
Rails - getting started
Rails - getting startedRails - getting started
Rails - getting started
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Review
 
Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門
 
Full Stack Developer Course | Infinite Graphix Technologies
Full Stack Developer Course | Infinite Graphix TechnologiesFull Stack Developer Course | Infinite Graphix Technologies
Full Stack Developer Course | Infinite Graphix Technologies
 
Melbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDBMelbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDB
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an Overview
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
 
Demystifying Ruby on Rails
Demystifying Ruby on Rails Demystifying Ruby on Rails
Demystifying Ruby on Rails
 
Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3
 
Revision
RevisionRevision
Revision
 
Intro to Big Data and NoSQL
Intro to Big Data and NoSQLIntro to Big Data and NoSQL
Intro to Big Data and NoSQL
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecture
 
Qcon 090408233824-phpapp01
Qcon 090408233824-phpapp01Qcon 090408233824-phpapp01
Qcon 090408233824-phpapp01
 

Recently uploaded

MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 

Recently uploaded (20)

MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 

Ruby On Rails

  • 1. Ruby On Rails Building Web Applications Is Fun!
  • 2. What is Ruby on Rails? Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. – www.rubyonrails.org - Ruby on Rails official site
  • 3. RoR Trivia • Written in Ruby • Creator of Ruby on Rails – David Heinemeier Hansson • Birth: July 2004 • Latest: 2.1.1: 4 September 2008 • Based on SmallTalk, Perl, Lisp • Not strongly typed
  • 4. What is Ruby? Dynamic, high level, interpreted, pure object- orientated language. “Ruby is designed to make programmers happy” Yukihiro Matsumoto aka Matz
  • 5. Ruby Trivia • Creator of Ruby – Yukihiro Matsumoto aka Matz • Birthday: 24 February 1993 • Originated in Japan and Rapidly Gaining Mindshare in US and Europe.
  • 6.
  • 8. Design Principles Model - View - Controller • Separate data (model) from user interface (view) • Model – data access and business logic – independent of the view and controller • View – data presentation and user interaction – read-only access to the model • Controller – handling events – operating on model and view
  • 9. Design Principles Database Persistence • OR mapping – Active Record design pattern • migrations – incremental schema management • multiple db adapters – MySQL, PostgreSQL, SQLite, SQL Server, IBM DB2, Informix, Oracle
  • 10. Design Principles Full Stack Framework • MVC suite • built-in webserver • default db adapter • AJAX, web services, email • test framework • plugins
  • 11. Design Principles Convention over Configuration • fixed directory structure – everything has its place – source files, libs, plugins, database files, documentation etc • file naming conventions – e.g. camel case class name, underscore file name • database naming conventions – table names, primary and foreign keys • standard configuration files – e.g. database connections, environment setting definitions (development, production, test)
  • 12. Design Principles DRY - Don’t Repeat Yourself • reusing code – e.g. view elements • reusing data – e.g. no need to declare table field names – can be read from the database • making each line of code work harder – e.g. mini languages for specific domains • object-relational mapping • metaprogramming – dynamically created methods
  • 14. MVC Architecture MVC Architecture
  • 15. MVC Architecture Model - ActiveRecord • Object Relational Mapping – “ActiveRecord” • Less Database “glue” Code • Logging for Performance Checking
  • 16. MVC Architecture Model : Rules • Table Names – Plurals • Attribute Names – id for primary key in table – table_id for foreign key in other table
  • 17. MVC Architecture View - ActionView • multiple template types – oldest and basic: erb (embedded ruby), similar to e.g. jsp – remote javascript templates – xml templates • easy reuse of view elements – file inclusion – layouts, templates, partials – multiple standard "helpers" – common html element generators (e.g. form elements, paginators) • easy AJAX integration
  • 18. MVC Architecture Controller : ActionController • Method name matches view folder – users_controller.rb works for /views/users/***.rhtml – called “actions” – all view’s methods will sit there • Ability to – CRUD – Flash – Redirect
  • 22. Usage & Support Web Servers • Lighttpd • Mongrel • WEBrick • Apache
  • 23. Usage & Support RoR Databases • Mysql • Oracle • Postgre Sql • SqlLite
  • 24. Usage & Support Websites on Rails
  • 25. Usage & Support Companies Using Rails
  • 26. References • www.slideshare.net • www.youtube.com • www.google.com • http://www.netbeans.org/kb/docs/ruby/rapid-rub • http://guides.rails.info/getting_started.html • www.rubyonrails.org • http://www.tutorialspoint.com/ruby-on-rails-2.1