SlideShare a Scribd company logo
1 of 25
Download to read offline
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

What's hot

Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails PresentationJoost Hietbrink
 
NiFi - First approach
NiFi - First approachNiFi - First approach
NiFi - First approachMickael Cassy
 
Change RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBChange RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBApaichon Punopas
 
Languages and tools for web programming
Languages and tools for web  programmingLanguages and tools for web  programming
Languages and tools for web programmingAlamelu
 
mobile in the cloud with diamonds. improved.
mobile in the cloud with diamonds. improved.mobile in the cloud with diamonds. improved.
mobile in the cloud with diamonds. improved.Oleg Shanyuk
 
SBT by Aform Research, Saulius Valatka
SBT by Aform Research, Saulius ValatkaSBT by Aform Research, Saulius Valatka
SBT by Aform Research, Saulius ValatkaVasil Remeniuk
 
Web Services with Objective-C
Web Services with Objective-CWeb Services with Objective-C
Web Services with Objective-CJuio Barros
 
S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010
S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010
S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010Arun Gupta
 
Ruby on Rails Kickstart 103 & 104
Ruby on Rails Kickstart 103 & 104Ruby on Rails Kickstart 103 & 104
Ruby on Rails Kickstart 103 & 104Heng-Yi Wu
 
Designing a RESTful web service
Designing a RESTful web serviceDesigning a RESTful web service
Designing a RESTful web serviceFilip Blondeel
 

What's hot (19)

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

Similar to OSOM - Ruby on Rails

Mac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. LimMac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. LimThoughtWorks
 
MacRuby to The Max
MacRuby to The MaxMacRuby to The Max
MacRuby to The MaxBrendan Lim
 
Introducing ruby on rails
Introducing ruby on railsIntroducing ruby on rails
Introducing ruby on railsPriceen
 
Ruby C extensions at the Ruby drink-up of Sophia, April 2012
Ruby C extensions at the Ruby drink-up of Sophia, April 2012Ruby C extensions at the Ruby drink-up of Sophia, April 2012
Ruby C extensions at the Ruby drink-up of Sophia, April 2012rivierarb
 
Дмитрий Верескун «Синтаксический сахар C#»
Дмитрий Верескун «Синтаксический сахар C#»Дмитрий Верескун «Синтаксический сахар C#»
Дмитрий Верескун «Синтаксический сахар C#»SpbDotNet Community
 
Connecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyConnecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyNick Sieger
 
Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Mark Menard
 
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011Nick Sieger
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on RailsManoj Kumar
 
Ruby on Big Data (Cassandra + Hadoop)
Ruby on Big Data (Cassandra + Hadoop)Ruby on Big Data (Cassandra + Hadoop)
Ruby on Big Data (Cassandra + Hadoop)Brian O'Neill
 
Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Henry S
 
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
 
What lies beneath the beautiful code?
What lies beneath the beautiful code?What lies beneath the beautiful code?
What lies beneath the beautiful code?Niranjan Sarade
 
Ruby on Rails introduction
Ruby on Rails introduction Ruby on Rails introduction
Ruby on Rails introduction Tran Hung
 
Big Data for Mobile
Big Data for MobileBig Data for Mobile
Big Data for MobileBugSense
 
Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#Mark Needham
 

Similar to OSOM - Ruby on Rails (20)

Android Data Persistence
Android Data PersistenceAndroid Data Persistence
Android Data Persistence
 
Mac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. LimMac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. Lim
 
MacRuby to The Max
MacRuby to The MaxMacRuby to The Max
MacRuby to The Max
 
Introducing ruby on rails
Introducing ruby on railsIntroducing ruby on rails
Introducing ruby on rails
 
Ruby C extensions at the Ruby drink-up of Sophia, April 2012
Ruby C extensions at the Ruby drink-up of Sophia, April 2012Ruby C extensions at the Ruby drink-up of Sophia, April 2012
Ruby C extensions at the Ruby drink-up of Sophia, April 2012
 
Дмитрий Верескун «Синтаксический сахар C#»
Дмитрий Верескун «Синтаксический сахар C#»Дмитрий Верескун «Синтаксический сахар C#»
Дмитрий Верескун «Синтаксический сахар C#»
 
Connecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyConnecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRuby
 
Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1
 
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
Ruby on Big Data (Cassandra + Hadoop)
Ruby on Big Data (Cassandra + Hadoop)Ruby on Big Data (Cassandra + Hadoop)
Ruby on Big Data (Cassandra + Hadoop)
 
Redis Lua Scripts
Redis Lua ScriptsRedis Lua Scripts
Redis Lua Scripts
 
Why Ruby?
Why Ruby? Why Ruby?
Why Ruby?
 
Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2
 
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...
 
What lies beneath the beautiful code?
What lies beneath the beautiful code?What lies beneath the beautiful code?
What lies beneath the beautiful code?
 
Ruby on Rails introduction
Ruby on Rails introduction Ruby on Rails introduction
Ruby on Rails introduction
 
Big Data for Mobile
Big Data for MobileBig Data for Mobile
Big Data for Mobile
 
Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#
 
Comredis
ComredisComredis
Comredis
 

More from Marcela Oniga

OSOM @ Programatica Open Source
OSOM @ Programatica Open SourceOSOM @ Programatica Open Source
OSOM @ Programatica Open SourceMarcela Oniga
 
OSOM - Building a community
OSOM - Building a communityOSOM - Building a community
OSOM - Building a communityMarcela Oniga
 
OSOM - Operations in the Cloud
OSOM - Operations in the CloudOSOM - Operations in the Cloud
OSOM - Operations in the CloudMarcela Oniga
 
OSOM - How Open Source Can Be Your Business
OSOM - How Open Source Can Be Your BusinessOSOM - How Open Source Can Be Your Business
OSOM - How Open Source Can Be Your BusinessMarcela Oniga
 
OSOM - Open source catching solutions
OSOM - Open source catching solutionsOSOM - Open source catching solutions
OSOM - Open source catching solutionsMarcela Oniga
 
OSOM - Open source culture
OSOM - Open source cultureOSOM - Open source culture
OSOM - Open source cultureMarcela Oniga
 
OSOM - Widely used applications on open systems
OSOM - Widely used applications on open systemsOSOM - Widely used applications on open systems
OSOM - Widely used applications on open systemsMarcela Oniga
 
OSOM - Performance in testing by jmeter
OSOM - Performance in testing by jmeterOSOM - Performance in testing by jmeter
OSOM - Performance in testing by jmeterMarcela Oniga
 
OSOM - Project management and opensource licenses
OSOM - Project management and opensource licensesOSOM - Project management and opensource licenses
OSOM - Project management and opensource licensesMarcela Oniga
 

More from Marcela Oniga (9)

OSOM @ Programatica Open Source
OSOM @ Programatica Open SourceOSOM @ Programatica Open Source
OSOM @ Programatica Open Source
 
OSOM - Building a community
OSOM - Building a communityOSOM - Building a community
OSOM - Building a community
 
OSOM - Operations in the Cloud
OSOM - Operations in the CloudOSOM - Operations in the Cloud
OSOM - Operations in the Cloud
 
OSOM - How Open Source Can Be Your Business
OSOM - How Open Source Can Be Your BusinessOSOM - How Open Source Can Be Your Business
OSOM - How Open Source Can Be Your Business
 
OSOM - Open source catching solutions
OSOM - Open source catching solutionsOSOM - Open source catching solutions
OSOM - Open source catching solutions
 
OSOM - Open source culture
OSOM - Open source cultureOSOM - Open source culture
OSOM - Open source culture
 
OSOM - Widely used applications on open systems
OSOM - Widely used applications on open systemsOSOM - Widely used applications on open systems
OSOM - Widely used applications on open systems
 
OSOM - Performance in testing by jmeter
OSOM - Performance in testing by jmeterOSOM - Performance in testing by jmeter
OSOM - Performance in testing by jmeter
 
OSOM - Project management and opensource licenses
OSOM - Project management and opensource licensesOSOM - Project management and opensource licenses
OSOM - Project management and opensource licenses
 

Recently uploaded

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Recently uploaded (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

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