SlideShare a Scribd company logo
Ruby on Rails:
              a brief introduction

Luigi De Russis
Dipartimento di Automatica e Informatica
Politecnico di Torino
luigi.derussis@polito.it
What is Ruby on Rails?
   A web framework
    ◦   created in 2003
    ◦   open-source
    ◦   for the Ruby programming language
    ◦   based on
         the MVC (Model-View-Controller) pattern
         the CoC (Convention over Configuration) principle
         the DRY (Don’t Repeat Yourself) principle
   Website: http://rubyonrails.org/

                                                              2
Ruby on Rails
   Provides many tools to quickly develop
    common feature, such as:
    ◦ interfacing to DBMS systems
    ◦ data management and validation
    ◦ creation of user interfaces
    ◦ creation of pages according to the MVC
      pattern
    ◦ etc.
   Built-in support for Ajax

                                               3
Is Ruby on Rails used in “real-
world” application?
   Yes, for example by…
    ◦   Twitter
    ◦   Yellow Pages
    ◦   Github
    ◦   Hulu
    ◦   Groupon
    ◦   Ruby website
    ◦   SUSE studio
    ◦   Urban Dictionary
    ◦   …
                                  4
What is Ruby?
   A programming language
    ◦ released in Japan in 1995
    ◦ inspired by other programming language
      Perl, Smalltalk, Eiffel, Ada, and Lisp
    ◦ open-source
    ◦ interpreted
    ◦ object-oriented
   Website: http://www.ruby-lang.org


                                                5
Ruby vs. Java (I)
   Like Java, in Ruby:
    ◦ memory is managed for you via a garbage
      collector
    ◦ objects are strongly typed
    ◦ there are public, private, and protected
      methods
    ◦ there are embedded doc tools (RDoc)




                              Linguaggi e Ambienti Multimediali A   6
Ruby vs. Java (II)
   Unlike Java, in Ruby:
    ◦ you use the end keyword after defining things
      like classes, instead of having to put braces
      around blocks of code
    ◦ require instead of import
    ◦ all member variables are private
    ◦ nil instead of null
    ◦ there is no casting
    ◦ everything is an object

                                                      7
About variables and methods…
   Variables and constants
    ◦ variables start with lowercase letters
    ◦ constants start with uppercase letters
    ◦ typically “_” is used among terms
 No static type checking
 Methods
    ◦ must start with lowercase letters
    ◦ are defined by the keyword def… end
    ◦ return statement is optional
      they implicit return the last evaluated expression

                                                            8
Let’s try!




             9
Some resources…
 http://rubyonrails.org/
 http://www.ruby-lang.org/
 http://api.rubyonrails.org/
 http://guides.rubyonrails.org/
 http://ruby.railstutorial.org/ruby-on-rails-
  tutorial-book




                                                 10

More Related Content

What's hot

Typescript
TypescriptTypescript
Typescript
Nikhil Thomas
 
Learning typescript
Learning typescriptLearning typescript
Learning typescript
Alexandre Marreiros
 
Typescript 101 introduction
Typescript 101   introductionTypescript 101   introduction
Typescript 101 introduction
Bob German
 
HelsinkiJS - Clojurescript for Javascript Developers
HelsinkiJS - Clojurescript for Javascript DevelopersHelsinkiJS - Clojurescript for Javascript Developers
HelsinkiJS - Clojurescript for Javascript Developers
Juho Teperi
 
Intro To Ror
Intro To RorIntro To Ror
Intro To Rormyuser
 
Typescript ppt
Typescript pptTypescript ppt
Typescript ppt
akhilsreyas
 
Power Leveling your TypeScript
Power Leveling your TypeScriptPower Leveling your TypeScript
Power Leveling your TypeScript
Offirmo
 
CORE JAVA SYLLABUS FROM SHPINE
CORE JAVA SYLLABUS FROM SHPINECORE JAVA SYLLABUS FROM SHPINE
CORE JAVA SYLLABUS FROM SHPINE
SHPINE TECHNOLOGIES
 
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
raja kvk
 
TypeScript Modules
TypeScript ModulesTypeScript Modules
TypeScript Modules
Noam Kfir
 
TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!
Alessandro Giorgetti
 
Typescript in 30mins
Typescript in 30mins Typescript in 30mins
Typescript in 30mins
Udaya Kumar
 
TypeScript - An Introduction
TypeScript - An IntroductionTypeScript - An Introduction
TypeScript - An Introduction
NexThoughts Technologies
 
Typescript Fundamentals
Typescript FundamentalsTypescript Fundamentals
Typescript Fundamentals
Sunny Sharma
 
Ruby Metaprogramming - OSCON 2008
Ruby Metaprogramming - OSCON 2008Ruby Metaprogramming - OSCON 2008
Ruby Metaprogramming - OSCON 2008
Brian Sam-Bodden
 
Javascript Roadmap - The Basics
Javascript Roadmap - The BasicsJavascript Roadmap - The Basics
Javascript Roadmap - The Basics
Aswin Barath
 
Node js crash course session 1
Node js crash course   session 1Node js crash course   session 1
Node js crash course session 1
Abdul Rahman Masri Attal
 
Introducing type script
Introducing type scriptIntroducing type script
Introducing type script
Remo Jansen
 
Typescript for the programmers who like javascript
Typescript for the programmers who like javascriptTypescript for the programmers who like javascript
Typescript for the programmers who like javascript
Andrei Sebastian Cîmpean
 

What's hot (20)

Slideshow
SlideshowSlideshow
Slideshow
 
Typescript
TypescriptTypescript
Typescript
 
Learning typescript
Learning typescriptLearning typescript
Learning typescript
 
Typescript 101 introduction
Typescript 101   introductionTypescript 101   introduction
Typescript 101 introduction
 
HelsinkiJS - Clojurescript for Javascript Developers
HelsinkiJS - Clojurescript for Javascript DevelopersHelsinkiJS - Clojurescript for Javascript Developers
HelsinkiJS - Clojurescript for Javascript Developers
 
Intro To Ror
Intro To RorIntro To Ror
Intro To Ror
 
Typescript ppt
Typescript pptTypescript ppt
Typescript ppt
 
Power Leveling your TypeScript
Power Leveling your TypeScriptPower Leveling your TypeScript
Power Leveling your TypeScript
 
CORE JAVA SYLLABUS FROM SHPINE
CORE JAVA SYLLABUS FROM SHPINECORE JAVA SYLLABUS FROM SHPINE
CORE JAVA SYLLABUS FROM SHPINE
 
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
 
TypeScript Modules
TypeScript ModulesTypeScript Modules
TypeScript Modules
 
TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!
 
Typescript in 30mins
Typescript in 30mins Typescript in 30mins
Typescript in 30mins
 
TypeScript - An Introduction
TypeScript - An IntroductionTypeScript - An Introduction
TypeScript - An Introduction
 
Typescript Fundamentals
Typescript FundamentalsTypescript Fundamentals
Typescript Fundamentals
 
Ruby Metaprogramming - OSCON 2008
Ruby Metaprogramming - OSCON 2008Ruby Metaprogramming - OSCON 2008
Ruby Metaprogramming - OSCON 2008
 
Javascript Roadmap - The Basics
Javascript Roadmap - The BasicsJavascript Roadmap - The Basics
Javascript Roadmap - The Basics
 
Node js crash course session 1
Node js crash course   session 1Node js crash course   session 1
Node js crash course session 1
 
Introducing type script
Introducing type scriptIntroducing type script
Introducing type script
 
Typescript for the programmers who like javascript
Typescript for the programmers who like javascriptTypescript for the programmers who like javascript
Typescript for the programmers who like javascript
 

Viewers also liked

Ruby on Rails, a brief introduction
Ruby on Rails, a brief introductionRuby on Rails, a brief introduction
Ruby on Rails, a brief introduction
roaldnel
 
Ruby On Rails - 1. Ruby Introduction
Ruby On Rails - 1. Ruby IntroductionRuby On Rails - 1. Ruby Introduction
Ruby On Rails - 1. Ruby Introduction
Jakob
 
Hello world ios v1
Hello world ios v1Hello world ios v1
Hello world ios v1
Teodoro Alonso
 
Introduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman OrtegaIntroduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman Ortega
arman o
 
Uri Nachmias - Adopting Swift @Houzz - The good, the bad and the ugly
Uri Nachmias - Adopting Swift @Houzz - The good, the bad and the uglyUri Nachmias - Adopting Swift @Houzz - The good, the bad and the ugly
Uri Nachmias - Adopting Swift @Houzz - The good, the bad and the ugly
tlv-ios-dev
 
The World's Best Mobile App Developers 2012
The World's Best Mobile App Developers 2012The World's Best Mobile App Developers 2012
The World's Best Mobile App Developers 2012
Soko Media
 
Ruby On Rails Presentation Barcamp Antwerp.Key
Ruby On Rails Presentation Barcamp Antwerp.KeyRuby On Rails Presentation Barcamp Antwerp.Key
Ruby On Rails Presentation Barcamp Antwerp.KeyBert Goethals
 
Ruby on Rails Introduction | FEU-EAC, February 2014
Ruby on Rails Introduction | FEU-EAC, February 2014Ruby on Rails Introduction | FEU-EAC, February 2014
Ruby on Rails Introduction | FEU-EAC, February 2014Ken-Lauren Daganio
 
Ruby on rails evaluation
Ruby on rails evaluationRuby on rails evaluation
Ruby on rails evaluation
Luis Goldster
 
Swift on raspberry pi
Swift on raspberry piSwift on raspberry pi
Swift on raspberry pi
iCHEF
 
a-beginners-guide-to-namas-web_final
a-beginners-guide-to-namas-web_finala-beginners-guide-to-namas-web_final
a-beginners-guide-to-namas-web_finalUrska Trunk
 
An Introduction to Ruby on Rails 20100506
An Introduction to Ruby on Rails 20100506An Introduction to Ruby on Rails 20100506
An Introduction to Ruby on Rails 20100506Vu Hung Nguyen
 
Introduction to Rails
Introduction to RailsIntroduction to Rails
Introduction to Rails
alkeshv
 
Introduction to Rails
Introduction to RailsIntroduction to Rails
Introduction to Rails
Menno van der Sman
 
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
John Brunswick
 
devLink 2013: Beginner's Guide to Mobile Development with Xamarin
devLink 2013: Beginner's Guide to Mobile Development with XamarindevLink 2013: Beginner's Guide to Mobile Development with Xamarin
devLink 2013: Beginner's Guide to Mobile Development with Xamarin
Ben Henderson
 
Intro To Swift
Intro To SwiftIntro To Swift
Intro To Swift
Natasha Murashev
 
Rubyonrails 120409061835-phpapp02
Rubyonrails 120409061835-phpapp02Rubyonrails 120409061835-phpapp02
Rubyonrails 120409061835-phpapp02sagaroceanic11
 
Rochester on Rails: Introduction to Ruby
Rochester on Rails: Introduction to RubyRochester on Rails: Introduction to Ruby
Rochester on Rails: Introduction to Ruby
Jason Morrison
 
Beginners Guide for iPhone & iPad
Beginners Guide for iPhone & iPadBeginners Guide for iPhone & iPad
Beginners Guide for iPhone & iPad
Jonathan Bacon
 

Viewers also liked (20)

Ruby on Rails, a brief introduction
Ruby on Rails, a brief introductionRuby on Rails, a brief introduction
Ruby on Rails, a brief introduction
 
Ruby On Rails - 1. Ruby Introduction
Ruby On Rails - 1. Ruby IntroductionRuby On Rails - 1. Ruby Introduction
Ruby On Rails - 1. Ruby Introduction
 
Hello world ios v1
Hello world ios v1Hello world ios v1
Hello world ios v1
 
Introduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman OrtegaIntroduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman Ortega
 
Uri Nachmias - Adopting Swift @Houzz - The good, the bad and the ugly
Uri Nachmias - Adopting Swift @Houzz - The good, the bad and the uglyUri Nachmias - Adopting Swift @Houzz - The good, the bad and the ugly
Uri Nachmias - Adopting Swift @Houzz - The good, the bad and the ugly
 
The World's Best Mobile App Developers 2012
The World's Best Mobile App Developers 2012The World's Best Mobile App Developers 2012
The World's Best Mobile App Developers 2012
 
Ruby On Rails Presentation Barcamp Antwerp.Key
Ruby On Rails Presentation Barcamp Antwerp.KeyRuby On Rails Presentation Barcamp Antwerp.Key
Ruby On Rails Presentation Barcamp Antwerp.Key
 
Ruby on Rails Introduction | FEU-EAC, February 2014
Ruby on Rails Introduction | FEU-EAC, February 2014Ruby on Rails Introduction | FEU-EAC, February 2014
Ruby on Rails Introduction | FEU-EAC, February 2014
 
Ruby on rails evaluation
Ruby on rails evaluationRuby on rails evaluation
Ruby on rails evaluation
 
Swift on raspberry pi
Swift on raspberry piSwift on raspberry pi
Swift on raspberry pi
 
a-beginners-guide-to-namas-web_final
a-beginners-guide-to-namas-web_finala-beginners-guide-to-namas-web_final
a-beginners-guide-to-namas-web_final
 
An Introduction to Ruby on Rails 20100506
An Introduction to Ruby on Rails 20100506An Introduction to Ruby on Rails 20100506
An Introduction to Ruby on Rails 20100506
 
Introduction to Rails
Introduction to RailsIntroduction to Rails
Introduction to Rails
 
Introduction to Rails
Introduction to RailsIntroduction to Rails
Introduction to Rails
 
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
 
devLink 2013: Beginner's Guide to Mobile Development with Xamarin
devLink 2013: Beginner's Guide to Mobile Development with XamarindevLink 2013: Beginner's Guide to Mobile Development with Xamarin
devLink 2013: Beginner's Guide to Mobile Development with Xamarin
 
Intro To Swift
Intro To SwiftIntro To Swift
Intro To Swift
 
Rubyonrails 120409061835-phpapp02
Rubyonrails 120409061835-phpapp02Rubyonrails 120409061835-phpapp02
Rubyonrails 120409061835-phpapp02
 
Rochester on Rails: Introduction to Ruby
Rochester on Rails: Introduction to RubyRochester on Rails: Introduction to Ruby
Rochester on Rails: Introduction to Ruby
 
Beginners Guide for iPhone & iPad
Beginners Guide for iPhone & iPadBeginners Guide for iPhone & iPad
Beginners Guide for iPhone & iPad
 

Similar to Ruby on Rails: a brief introduction

Ruby on Rails : First Mile
Ruby on Rails : First MileRuby on Rails : First Mile
Ruby on Rails : First Mile
Gourab Mitra
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
Batzorigt Rentsen
 
Ruby On Rails Overview
Ruby On Rails OverviewRuby On Rails Overview
Ruby On Rails Overview
jonkinney
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
Barry Jones
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
iradarji
 
Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)Muhammad Haseeb Shahid
 
Cucumber in Practice(en)
Cucumber in Practice(en)Cucumber in Practice(en)
Cucumber in Practice(en)
Kyosuke MOROHASHI
 
Ruby on Rails: Outreach for Women, SF
Ruby on Rails: Outreach for Women, SFRuby on Rails: Outreach for Women, SF
Ruby on Rails: Outreach for Women, SFKaren Zeller
 
Ruby tutorial
Ruby tutorialRuby tutorial
Ruby tutorialknoppix
 
Ruby on Rails - An overview
Ruby on Rails -  An overviewRuby on Rails -  An overview
Ruby on Rails - An overview
Thomas Asikis
 
Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to Titanium
Techday7
 
Workin ontherailsroad
Workin ontherailsroadWorkin ontherailsroad
Workin ontherailsroadJim Jones
 
WorkinOnTheRailsRoad
WorkinOnTheRailsRoadWorkinOnTheRailsRoad
WorkinOnTheRailsRoadwebuploader
 
The story of language development
The story of language developmentThe story of language development
The story of language development
Hiroshi SHIBATA
 
Ruby on Rails Introduction M&P - IT Skill Development Program 07
Ruby on Rails Introduction M&P - IT Skill Development Program 07Ruby on Rails Introduction M&P - IT Skill Development Program 07
Ruby on Rails Introduction M&P - IT Skill Development Program 07
Muhammad Sunny ✈
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
mithunsasidharan
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
Batzorigt Rentsen
 

Similar to Ruby on Rails: a brief introduction (20)

Ruby on Rails : First Mile
Ruby on Rails : First MileRuby on Rails : First Mile
Ruby on Rails : First Mile
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
Ruby On Rails Overview
Ruby On Rails OverviewRuby On Rails Overview
Ruby On Rails Overview
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)
 
Cucumber in Practice(en)
Cucumber in Practice(en)Cucumber in Practice(en)
Cucumber in Practice(en)
 
Why ruby
Why rubyWhy ruby
Why ruby
 
Ruby on Rails: Outreach for Women, SF
Ruby on Rails: Outreach for Women, SFRuby on Rails: Outreach for Women, SF
Ruby on Rails: Outreach for Women, SF
 
Ruby tutorial
Ruby tutorialRuby tutorial
Ruby tutorial
 
Ruby on Rails - An overview
Ruby on Rails -  An overviewRuby on Rails -  An overview
Ruby on Rails - An overview
 
Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to Titanium
 
ruby pentest
ruby pentestruby pentest
ruby pentest
 
Workin ontherailsroad
Workin ontherailsroadWorkin ontherailsroad
Workin ontherailsroad
 
WorkinOnTheRailsRoad
WorkinOnTheRailsRoadWorkinOnTheRailsRoad
WorkinOnTheRailsRoad
 
The story of language development
The story of language developmentThe story of language development
The story of language development
 
Ruby on Rails Introduction M&P - IT Skill Development Program 07
Ruby on Rails Introduction M&P - IT Skill Development Program 07Ruby on Rails Introduction M&P - IT Skill Development Program 07
Ruby on Rails Introduction M&P - IT Skill Development Program 07
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
rubyonrails
rubyonrailsrubyonrails
rubyonrails
 

More from Luigi De Russis

Assessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Assessing Virtual Assistant Capabilities with Italian Dysarthric SpeechAssessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Assessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Luigi De Russis
 
Semantic Web: an Introduction
Semantic Web: an IntroductionSemantic Web: an Introduction
Semantic Web: an Introduction
Luigi De Russis
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic Web
Luigi De Russis
 
Semantic Web - Ontology 101
Semantic Web - Ontology 101Semantic Web - Ontology 101
Semantic Web - Ontology 101
Luigi De Russis
 
AmI 2017 - Python intermediate
AmI 2017 - Python intermediateAmI 2017 - Python intermediate
AmI 2017 - Python intermediate
Luigi De Russis
 
AmI 2017 - Python basics
AmI 2017 - Python basicsAmI 2017 - Python basics
AmI 2017 - Python basics
Luigi De Russis
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
Luigi De Russis
 
AmI 2016 - Python basics
AmI 2016 - Python basicsAmI 2016 - Python basics
AmI 2016 - Python basics
Luigi De Russis
 
Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)
Luigi De Russis
 
Ambient Intelligence: An Overview
Ambient Intelligence: An OverviewAmbient Intelligence: An Overview
Ambient Intelligence: An Overview
Luigi De Russis
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
Luigi De Russis
 
LAM 2015 - Social Networks Technologies
LAM 2015 - Social Networks TechnologiesLAM 2015 - Social Networks Technologies
LAM 2015 - Social Networks Technologies
Luigi De Russis
 
AmI 2015 - Python basics
AmI 2015 - Python basicsAmI 2015 - Python basics
AmI 2015 - Python basics
Luigi De Russis
 
PowerOnt: an ontology-based approach for power consumption estimation in Smar...
PowerOnt: an ontology-based approach for power consumption estimation in Smar...PowerOnt: an ontology-based approach for power consumption estimation in Smar...
PowerOnt: an ontology-based approach for power consumption estimation in Smar...
Luigi De Russis
 
Interacting with Smart Environments - Ph.D. Thesis Presentation
Interacting with Smart Environments - Ph.D. Thesis PresentationInteracting with Smart Environments - Ph.D. Thesis Presentation
Interacting with Smart Environments - Ph.D. Thesis Presentation
Luigi De Russis
 
Semantic Web: an introduction
Semantic Web: an introductionSemantic Web: an introduction
Semantic Web: an introduction
Luigi De Russis
 
Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)
Luigi De Russis
 
Living in Smart Environments - 3rd year PhD Report
Living in Smart Environments - 3rd year PhD ReportLiving in Smart Environments - 3rd year PhD Report
Living in Smart Environments - 3rd year PhD Report
Luigi De Russis
 
Semantic Web: an introduction
Semantic Web: an introductionSemantic Web: an introduction
Semantic Web: an introduction
Luigi De Russis
 
Social Network Technologies
Social Network TechnologiesSocial Network Technologies
Social Network Technologies
Luigi De Russis
 

More from Luigi De Russis (20)

Assessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Assessing Virtual Assistant Capabilities with Italian Dysarthric SpeechAssessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Assessing Virtual Assistant Capabilities with Italian Dysarthric Speech
 
Semantic Web: an Introduction
Semantic Web: an IntroductionSemantic Web: an Introduction
Semantic Web: an Introduction
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic Web
 
Semantic Web - Ontology 101
Semantic Web - Ontology 101Semantic Web - Ontology 101
Semantic Web - Ontology 101
 
AmI 2017 - Python intermediate
AmI 2017 - Python intermediateAmI 2017 - Python intermediate
AmI 2017 - Python intermediate
 
AmI 2017 - Python basics
AmI 2017 - Python basicsAmI 2017 - Python basics
AmI 2017 - Python basics
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
 
AmI 2016 - Python basics
AmI 2016 - Python basicsAmI 2016 - Python basics
AmI 2016 - Python basics
 
Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)
 
Ambient Intelligence: An Overview
Ambient Intelligence: An OverviewAmbient Intelligence: An Overview
Ambient Intelligence: An Overview
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 
LAM 2015 - Social Networks Technologies
LAM 2015 - Social Networks TechnologiesLAM 2015 - Social Networks Technologies
LAM 2015 - Social Networks Technologies
 
AmI 2015 - Python basics
AmI 2015 - Python basicsAmI 2015 - Python basics
AmI 2015 - Python basics
 
PowerOnt: an ontology-based approach for power consumption estimation in Smar...
PowerOnt: an ontology-based approach for power consumption estimation in Smar...PowerOnt: an ontology-based approach for power consumption estimation in Smar...
PowerOnt: an ontology-based approach for power consumption estimation in Smar...
 
Interacting with Smart Environments - Ph.D. Thesis Presentation
Interacting with Smart Environments - Ph.D. Thesis PresentationInteracting with Smart Environments - Ph.D. Thesis Presentation
Interacting with Smart Environments - Ph.D. Thesis Presentation
 
Semantic Web: an introduction
Semantic Web: an introductionSemantic Web: an introduction
Semantic Web: an introduction
 
Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)
 
Living in Smart Environments - 3rd year PhD Report
Living in Smart Environments - 3rd year PhD ReportLiving in Smart Environments - 3rd year PhD Report
Living in Smart Environments - 3rd year PhD Report
 
Semantic Web: an introduction
Semantic Web: an introductionSemantic Web: an introduction
Semantic Web: an introduction
 
Social Network Technologies
Social Network TechnologiesSocial Network Technologies
Social Network Technologies
 

Recently uploaded

Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
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
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
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
 
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
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 

Recently uploaded (20)

Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.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
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
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
 
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
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 

Ruby on Rails: a brief introduction

  • 1. Ruby on Rails: a brief introduction Luigi De Russis Dipartimento di Automatica e Informatica Politecnico di Torino luigi.derussis@polito.it
  • 2. What is Ruby on Rails?  A web framework ◦ created in 2003 ◦ open-source ◦ for the Ruby programming language ◦ based on  the MVC (Model-View-Controller) pattern  the CoC (Convention over Configuration) principle  the DRY (Don’t Repeat Yourself) principle  Website: http://rubyonrails.org/ 2
  • 3. Ruby on Rails  Provides many tools to quickly develop common feature, such as: ◦ interfacing to DBMS systems ◦ data management and validation ◦ creation of user interfaces ◦ creation of pages according to the MVC pattern ◦ etc.  Built-in support for Ajax 3
  • 4. Is Ruby on Rails used in “real- world” application?  Yes, for example by… ◦ Twitter ◦ Yellow Pages ◦ Github ◦ Hulu ◦ Groupon ◦ Ruby website ◦ SUSE studio ◦ Urban Dictionary ◦ … 4
  • 5. What is Ruby?  A programming language ◦ released in Japan in 1995 ◦ inspired by other programming language  Perl, Smalltalk, Eiffel, Ada, and Lisp ◦ open-source ◦ interpreted ◦ object-oriented  Website: http://www.ruby-lang.org 5
  • 6. Ruby vs. Java (I)  Like Java, in Ruby: ◦ memory is managed for you via a garbage collector ◦ objects are strongly typed ◦ there are public, private, and protected methods ◦ there are embedded doc tools (RDoc) Linguaggi e Ambienti Multimediali A 6
  • 7. Ruby vs. Java (II)  Unlike Java, in Ruby: ◦ you use the end keyword after defining things like classes, instead of having to put braces around blocks of code ◦ require instead of import ◦ all member variables are private ◦ nil instead of null ◦ there is no casting ◦ everything is an object 7
  • 8. About variables and methods…  Variables and constants ◦ variables start with lowercase letters ◦ constants start with uppercase letters ◦ typically “_” is used among terms  No static type checking  Methods ◦ must start with lowercase letters ◦ are defined by the keyword def… end ◦ return statement is optional  they implicit return the last evaluated expression 8
  • 10. Some resources…  http://rubyonrails.org/  http://www.ruby-lang.org/  http://api.rubyonrails.org/  http://guides.rubyonrails.org/  http://ruby.railstutorial.org/ruby-on-rails- tutorial-book 10