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

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

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