Ruby on Rails:              a brief introductionLuigi De RussisDipartimento di Automatica e InformaticaPolitecnico di Tori...
What is Ruby on Rails?   A web framework    ◦   created in 2003    ◦   open-source    ◦   for the Ruby programming langua...
Ruby on Rails   Provides many tools to quickly develop    common feature, such as:    ◦ interfacing to DBMS systems    ◦ ...
Is Ruby on Rails used in “real-world” application?   Yes, for example by…    ◦   Twitter    ◦   Yellow Pages    ◦   Githu...
What is Ruby?   A programming language    ◦ released in Japan in 1995    ◦ inspired by other programming language      P...
Ruby vs. Java (I)   Like Java, in Ruby:    ◦ memory is managed for you via a garbage      collector    ◦ objects are stro...
Ruby vs. Java (II)   Unlike Java, in Ruby:    ◦ you use the end keyword after defining things      like classes, instead ...
About variables and methods…   Variables and constants    ◦ variables start with lowercase letters    ◦ constants start w...
Let’s try!             9
Some resources… http://rubyonrails.org/ http://www.ruby-lang.org/ http://api.rubyonrails.org/ http://guides.rubyonrail...
Upcoming SlideShare
Loading in …5
×

Ruby on Rails: a brief introduction

963
-1

Published on

Introduction to Ruby on Rails for the Linguaggi e Ambienti Multimediali course at Politecnico di Torino, academic year 2011/2012

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
963
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Ruby on Rails: a brief introduction

  1. 1. Ruby on Rails: a brief introductionLuigi De RussisDipartimento di Automatica e InformaticaPolitecnico di Torinoluigi.derussis@polito.it
  2. 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. 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. 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. 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. 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. 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. 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
  9. 9. Let’s try! 9
  10. 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
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×