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

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 

Recently uploaded (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 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
 

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