SlideShare a Scribd company logo
Ruby on Rails
Mihai Frisan
●   Programator

●   Indragostit de Ruby on Rails din 2006

●   Sustinator al software-ului open source


Blog:    mihai.frisan.ro
Twitter: @mihaifrisan
Yukihiro 'Matz' Matsumoto
        Creator Ruby
Ruby

●   limbaj de programare orientat obiect

●   dinamic

●   focusat pe simplitate si productivitate

●   sintaxa eleganta si naturala
Totul in Ruby este obiect

 # Tipareste "MAJUSCULE"
 puts "majuscule".upcase

 # Tipareste valoarea absoluta a lui -5
 puts -5.abs

 # Tipareste de 5 ori "Ruby Rocks!"
 5.times do
  puts "Ruby Rocks!"
 End

 # Tipareste numerele de la 1 la 100
 1.upto(100) { |i| puts i }
Ruby este un limbaj de programare dinamic




def len(list)             public static int len(List list)
 x=0                      {
 list.each do |element|     int x = 0;
   x += 1                   Iterator listIterator =
 end                        list.iterator();
end                         while(listIterator.hasNext()){
                              x += 1;
                            }
                          }
Ruby este focusat pe simplitate si productivitate

class Circle                      Class Circle
 attr_accessor :center, :radius     private Coordinate center, float radius;
end                                 public void setCenter(Coordinate center){
                                      this.center = center;
                                    }
                                    public Coordinate getCenter(){
                                      return center;
                                    }
                                    public void setRadius(float radius){
                                      this.radius = radius;
                                    }
                                    public Coordinate getRadius(){
                                      return radius;
                                    }
                                  }
Ruby on Rails
David Heinemeier Hansson
     Creator Ruby on Rails
Rails

●   framework destinat dezvoltarii de aplicatii Web

●   full-stack framework

●   MVC pattern

●   Convention over Configuration
Arhitectura Rails
Models
ActiveRecord

●   Object Relation Mapping (ORM)

●   Mapeaza tabele la clase si randurile la obiecte

●   Database Agnostic
ActiveRecord
CREATE TABLE entries (
  id int(11) NOT NULL auto_increment,
  name varchar(255),
  comments varchar(255),
  PRIMARY KEY (id)
);


class Entry < ActiveRecord::Base
 # nothing here!
end

entry = Entry.new
entry.name = "John"
entry.comments = "What a great Web site!"
entry.save

entry = Entry.find(1)
puts entry.name # output: "John"
ActiveRecord
class Entry < ActiveRecord::Base
 belongs_to :account
 has_many :comments

 validates_presence_of :name

 acts_as_taggable
end

entry = Entry.new
entry.name = "John"
entry.comments << Comment.new("What a great Web site!")
entry.save

Entry = Entry.find_by_name(“John”)
Rails programmers like fat Models
Controler
ActionController

●   Managementul request-urilor

●   Mapeza actiunile la metode

●   Separa logica de prezentare

●   Implementeaza resursele RESTful
ActionController
View
ActionView

●   Prezinta utilizatorului datele

●   Foloseste template-uri

●   Mecanism de caching
ActionView
Proiecte dezvoltate in Rails
Companii care folosesc Rails
De ce as folosi Rails?

  ●   Convention over Configuration

  ●   Data mapping

  ●   AJAX

  ●   Testing Framework

  ●   Agile Development

  ●   Numar impresionant de librarii

More Related Content

PPTX
Ruby on rails for beginers
ZIP
Rails 3 (beta) Roundup
PPT
Rubyonrails 090715105949-phpapp01
PDF
Bhavesh ro r
PPTX
Java Web services
PPTX
Rubyonrails 120409061835-phpapp02
PDF
Ruby on Rails : 簡介與入門
PPT
Apache Velocity
Ruby on rails for beginers
Rails 3 (beta) Roundup
Rubyonrails 090715105949-phpapp01
Bhavesh ro r
Java Web services
Rubyonrails 120409061835-phpapp02
Ruby on Rails : 簡介與入門
Apache Velocity

What's hot (19)

PPTX
Content Modeling Behavior
PDF
Ldap introduction (eng)
PDF
遇見 Ruby on Rails
PDF
Ruby on Rails Presentation
PPT
Ruby On Rails
PDF
Xml schema
PPTX
NiFi - First approach
PDF
SQL - RDBMS Concepts
PPT
Red5 - PHUG Workshops
PDF
Change RelationalDB to GraphDB with OrientDB
PPTX
Languages and tools for web programming
PDF
mobile in the cloud with diamonds. improved.
PPTX
SBT by Aform Research, Saulius Valatka
PPT
Web Services with Objective-C
PDF
19servlets
PDF
S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010
PPTX
MSBuild Concepts
PDF
Ruby on Rails Kickstart 103 & 104
KEY
Designing a RESTful web service
Content Modeling Behavior
Ldap introduction (eng)
遇見 Ruby on Rails
Ruby on Rails Presentation
Ruby On Rails
Xml schema
NiFi - First approach
SQL - RDBMS Concepts
Red5 - PHUG Workshops
Change RelationalDB to GraphDB with OrientDB
Languages and tools for web programming
mobile in the cloud with diamonds. improved.
SBT by Aform Research, Saulius Valatka
Web Services with Objective-C
19servlets
S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010
MSBuild Concepts
Ruby on Rails Kickstart 103 & 104
Designing a RESTful web service
Ad

Similar to OSOM - Ruby on Rails (20)

ZIP
Ruby on Rails
KEY
Desarrollando aplicaciones web en minutos
ODP
A Toda Maquina Con Ruby on Rails
PPT
An introduction-to-ruby-on-rails
PPT
An Introduction to Ruby on Rails 20100506
PDF
Ruby On Rails
PDF
Ruby on Rails
PPT
AIESEC 26 Apr 2013
PDF
When To Use Ruby On Rails
PDF
Ruby - a pure object oriented language
PDF
Ruby on Rails Presentation
PDF
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
PDF
Introduction to Ruby on Rails
PPT
Rails 2010 Workshop
PPT
Intro ror
PDF
Connecting the Worlds of Java and Ruby with JRuby
PPT
Ruby On Rails Introduction
PDF
Ruby and Rails for womens
PDF
Happy Coding with Ruby on Rails
PDF
Ruby on Rails in UbiSunrise
Ruby on Rails
Desarrollando aplicaciones web en minutos
A Toda Maquina Con Ruby on Rails
An introduction-to-ruby-on-rails
An Introduction to Ruby on Rails 20100506
Ruby On Rails
Ruby on Rails
AIESEC 26 Apr 2013
When To Use Ruby On Rails
Ruby - a pure object oriented language
Ruby on Rails Presentation
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
Introduction to Ruby on Rails
Rails 2010 Workshop
Intro ror
Connecting the Worlds of Java and Ruby with JRuby
Ruby On Rails Introduction
Ruby and Rails for womens
Happy Coding with Ruby on Rails
Ruby on Rails in UbiSunrise
Ad

More from Marcela Oniga (9)

PDF
OSOM @ Programatica Open Source
PDF
OSOM - Building a community
PDF
OSOM - Operations in the Cloud
PDF
OSOM - How Open Source Can Be Your Business
PPS
OSOM - Open source catching solutions
PPT
OSOM - Open source culture
PPT
OSOM - Widely used applications on open systems
PPT
OSOM - Performance in testing by jmeter
PDF
OSOM - Project management and opensource licenses
OSOM @ Programatica Open Source
OSOM - Building a community
OSOM - Operations in the Cloud
OSOM - How Open Source Can Be Your Business
OSOM - Open source catching solutions
OSOM - Open source culture
OSOM - Widely used applications on open systems
OSOM - Performance in testing by jmeter
OSOM - Project management and opensource licenses

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
sap open course for s4hana steps from ECC to s4
PDF
cuic standard and advanced reporting.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
Review of recent advances in non-invasive hemoglobin estimation
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Empathic Computing: Creating Shared Understanding
Reach Out and Touch Someone: Haptics and Empathic Computing
sap open course for s4hana steps from ECC to s4
cuic standard and advanced reporting.pdf
MYSQL Presentation for SQL database connectivity
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation_ Review paper, used for researhc scholars
Programs and apps: productivity, graphics, security and other tools
Digital-Transformation-Roadmap-for-Companies.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
A comparative analysis of optical character recognition models for extracting...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Dropbox Q2 2025 Financial Results & Investor Presentation
Chapter 3 Spatial Domain Image Processing.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf

OSOM - Ruby on Rails

  • 2. Mihai Frisan ● Programator ● Indragostit de Ruby on Rails din 2006 ● Sustinator al software-ului open source Blog: mihai.frisan.ro Twitter: @mihaifrisan
  • 4. Ruby ● limbaj de programare orientat obiect ● dinamic ● focusat pe simplitate si productivitate ● sintaxa eleganta si naturala
  • 5. Totul in Ruby este obiect # Tipareste "MAJUSCULE" puts "majuscule".upcase # Tipareste valoarea absoluta a lui -5 puts -5.abs # Tipareste de 5 ori "Ruby Rocks!" 5.times do puts "Ruby Rocks!" End # Tipareste numerele de la 1 la 100 1.upto(100) { |i| puts i }
  • 6. Ruby este un limbaj de programare dinamic def len(list) public static int len(List list) x=0 { list.each do |element| int x = 0; x += 1 Iterator listIterator = end list.iterator(); end while(listIterator.hasNext()){ x += 1; } }
  • 7. Ruby este focusat pe simplitate si productivitate class Circle Class Circle attr_accessor :center, :radius private Coordinate center, float radius; end public void setCenter(Coordinate center){ this.center = center; } public Coordinate getCenter(){ return center; } public void setRadius(float radius){ this.radius = radius; } public Coordinate getRadius(){ return radius; } }
  • 9. David Heinemeier Hansson Creator Ruby on Rails
  • 10. Rails ● framework destinat dezvoltarii de aplicatii Web ● full-stack framework ● MVC pattern ● Convention over Configuration
  • 13. ActiveRecord ● Object Relation Mapping (ORM) ● Mapeaza tabele la clase si randurile la obiecte ● Database Agnostic
  • 14. ActiveRecord CREATE TABLE entries ( id int(11) NOT NULL auto_increment, name varchar(255), comments varchar(255), PRIMARY KEY (id) ); class Entry < ActiveRecord::Base # nothing here! end entry = Entry.new entry.name = "John" entry.comments = "What a great Web site!" entry.save entry = Entry.find(1) puts entry.name # output: "John"
  • 15. ActiveRecord class Entry < ActiveRecord::Base belongs_to :account has_many :comments validates_presence_of :name acts_as_taggable end entry = Entry.new entry.name = "John" entry.comments << Comment.new("What a great Web site!") entry.save Entry = Entry.find_by_name(“John”)
  • 18. ActionController ● Managementul request-urilor ● Mapeza actiunile la metode ● Separa logica de prezentare ● Implementeaza resursele RESTful
  • 20. View
  • 21. ActionView ● Prezinta utilizatorului datele ● Foloseste template-uri ● Mecanism de caching
  • 25. De ce as folosi Rails? ● Convention over Configuration ● Data mapping ● AJAX ● Testing Framework ● Agile Development ● Numar impresionant de librarii