Your SlideShare is downloading. ×
0
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
OSOM - Ruby on Rails
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

OSOM - Ruby on Rails

298

Published on

OSOM - Open Source Open Mind - V3.0 Back to the roots - Cluj Napoca 2012 …

OSOM - Open Source Open Mind - V3.0 Back to the roots - Cluj Napoca 2012
www.osom.ro

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

  • Be the first to like this

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

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Ruby on Rails
  • 2. Mihai Frisan● Programator● Indragostit de Ruby on Rails din 2006● Sustinator al software-ului open sourceBlog: mihai.frisan.roTwitter: @mihaifrisan
  • 3. Yukihiro Matz Matsumoto Creator Ruby
  • 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 dinamicdef 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 productivitateclass 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; } }
  • 8. Ruby on Rails
  • 9. David Heinemeier Hansson Creator Ruby on Rails
  • 10. Rails● framework destinat dezvoltarii de aplicatii Web● full-stack framework● MVC pattern● Convention over Configuration
  • 11. Arhitectura Rails
  • 12. Models
  • 13. ActiveRecord● Object Relation Mapping (ORM)● Mapeaza tabele la clase si randurile la obiecte● Database Agnostic
  • 14. ActiveRecordCREATE TABLE entries ( id int(11) NOT NULL auto_increment, name varchar(255), comments varchar(255), PRIMARY KEY (id));class Entry < ActiveRecord::Base # nothing here!endentry = Entry.newentry.name = "John"entry.comments = "What a great Web site!"entry.saveentry = Entry.find(1)puts entry.name # output: "John"
  • 15. ActiveRecordclass Entry < ActiveRecord::Base belongs_to :account has_many :comments validates_presence_of :name acts_as_taggableendentry = Entry.newentry.name = "John"entry.comments << Comment.new("What a great Web site!")entry.saveEntry = Entry.find_by_name(“John”)
  • 16. Rails programmers like fat Models
  • 17. Controler
  • 18. ActionController● Managementul request-urilor● Mapeza actiunile la metode● Separa logica de prezentare● Implementeaza resursele RESTful
  • 19. ActionController
  • 20. View
  • 21. ActionView● Prezinta utilizatorului datele● Foloseste template-uri● Mecanism de caching
  • 22. ActionView
  • 23. Proiecte dezvoltate in Rails
  • 24. Companii care folosesc Rails
  • 25. De ce as folosi Rails? ● Convention over Configuration ● Data mapping ● AJAX ● Testing Framework ● Agile Development ● Numar impresionant de librarii

×