SlideShare a Scribd company logo
A toda máquina con  Ruby on Rails Rafael García Ortega – ASPgems [email_address]
CSS XHTML Web 2.0 Usabilidad Wiki Standards AJAX Redes Sociales RSS APIs REST Mashups Folksonomy Soap Clouds ASAP Movilidad Tags Avatar Dinámico Estático CMS ASP SaaS Networking Microblogging Streaming Colaboración Open Social
Ruby Man is driven to create; I know I really love to create things.  And while I'm not good at painting, drawing, or music,  I can write software. Yukihiro Matsumoto, a.k.a. “Matz”
Ruby Lenguaje dinámico Multiparadigma Orientado a objetos Lenguaje de muy alto nivel Basado en Perl, Smalltalk, Lisp, C, … ...
Ruby Lenguaje natural
Ruby Lenguaje natural Fácil de leer
Ruby Lenguaje natural Fácil de leer Fácil de escribir
Ruby Lenguaje natural Fácil de leer Fácil de escribir Productivo
Ruby ¡DIVERTIDO! Lenguaje natural Fácil de leer Fácil de escribir Productivo
Todo son objetos
123 "Ruby" true =>  Fixnum =>  String =>  TrueClass
-123.abs "Ruby".index('b') true.nil? 5 * 10 => 123 => 2 => false => 50
-123.abs "Ruby".index('b') true.nil? 5 * 10 5.*(10) => 123 => 2 => false => 50 => 50
Fácil de leer
Time.now
Time.now 100.next
Time.now 100.next “ Cadena”.downcase.reverse
Time.now 100.next “ Cadena”.downcase.reverse 5.times { print 'hola mundo' }
Convenciones
current_user :login_required @activated @@counter Status
a = [5, 1, 9, 2] a.empty?  => false
a a.sort a => [5, 1, 9, 2] => [1, 2, 5, 9] => [5, 1, 9, 2]
a a.sort! a => [5, 1, 9, 2] => [1, 2, 5, 9] => [1, 2, 5, 9]
Flexible
class String  def repeat(i) self * i end end
"hola mundo".repeat(4) class String  def repeat(i) self * i end end "Rioja Party 2009".repeat(4)
"hola mundo".repeat(4) class String  def repeat(i) self * i end end class String undef_method :repeat end
Array (Enumerable)
class String undef_method :repeat end foo = [1, 2, 3] foo << 4 =>  [1,2,3,4]
foo = %w(uno dos tres)  foo[1] => ['uno', 'dos', 'tres'] => 'dos'
foo = [1, 2, 3] bar = [3, 4, 5] foo+bar => [1, 2, 3, 3, 4, 5]
foo = [1, 2, 3] bar = [3, 4, 5] foo+bar foo * 2 => [1, 2, 3, 3, 4, 5] => [1, 2, 3, 1, 2, 3]
foo = [1, 2, 3] bar = [3, 4, 5] foo+bar foo * 2 foo & bar => [1, 2, 3, 3, 4, 5] => [1, 2, 3, 1, 2, 3] => [3]
foo = [1, 2, 3] bar = [3, 4, 5] foo+bar foo * 2 foo & bar foo | bar => [1, 2, 3, 3, 4, 5] => [1, 2, 3, 1, 2, 3] => [3] => [1, 2, 3, 4, 5]
foo.each do |item| puts item end
a.inject(0){|sum,item| sum + item}
a.inject(0){|sum,item| sum + item} a.map{|item| item*2 }
a.inject(0){|sum,item| sum + item} a.map{|item| item*2 } (1..100).find_all{|item| item % 3 == 0}
Ruby on Rails The best way to predict the future is to implement it. David Heinemeier Hansson, a.k.a. “DHH” &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
Ruby on Rails Extraído a partir de Basecamp &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
Ruby on Rails Extraído a partir de Basecamp Patrón MVC &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
Ruby on Rails Extraído a partir de Basecamp Patrón MVC DRY – Don't repeat yourself &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
Ruby on Rails Extraído a partir de Basecamp Patrón MVC DRY – Don't repeat yourself COC – Conv. Over Config. &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
Ruby on Rails Extraído a partir de Basecamp Patrón MVC DRY – Don't repeat yourself COC – Conv. Over Config. Ágil &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
Instalación Linux {aptitude, yum} install ruby rubygems gem update –system geim install rails Mac OS X Leopard Gem update –system Gem install rails Mac OS X Tiger Locomotive One-Click Installer Windows InstantRails One Click Installer
DEMO
Rafael García Ortega – ASPgems [email_address] ¿Preguntas?
Enlaces Para aprender: Rails – Guides -  http://guides.rubyonrails.org/ Página principal de Ruby: Ruby -  http://www.ruby-lang.org/ Página principal de RoR: Ruby on Rails -  http://rubyonrails.org/ API: Ruby(API) -  http://ruby-doc.org/core/ RoR(API) -  http://api.rubyonrails.org/ Consulta: Google -  http://google.com Lista RoR-es -  http://lists.simplelogica.net/mailman/listinfo/ror-es &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
Enlaces Presenatción basada en: Agile Web Development with Rails ed. Pragmatic Programmers http://www.slideshare.net/jmorrison/rochester-on-rails-introduction-to-ruby http://www.slideshare.net/agnessa/introduction-to-ruby-on-rails http://www.slideshare.net/herval/love-ruby-each-i-p-i http://rubisobrerieles.blogspot.com/2007/01/introduccin-rails-por-thecocktail.html http://www.slideshare.net/sergio.gil/ruby-mola-y-por-qu http://www.slideshare.net/rafaelgaspar/ruby-on-rails-embarque-nesse-framework-web ... &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.

More Related Content

PDF
Be Happy With Ruby on Rails - Ecosystem
PPTX
Ruby on Rails - An overview
PPT
Ruby on Rails workshop for beginner
PPT
Intro to Ruby on Rails
PDF
Intro to Rack
PDF
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
PDF
The Evolution of Airbnb's Frontend
PDF
Project Fedena and Why Ruby on Rails - ArvindArvind G S
Be Happy With Ruby on Rails - Ecosystem
Ruby on Rails - An overview
Ruby on Rails workshop for beginner
Intro to Ruby on Rails
Intro to Rack
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
The Evolution of Airbnb's Frontend
Project Fedena and Why Ruby on Rails - ArvindArvind G S

What's hot (19)

PDF
How to dockerize rails application compose and rails tutorial
PDF
FITC - Here Be Dragons: Advanced JavaScript Debugging
PDF
Ruby conf 2011, Create your own rails framework
PDF
Building web framework with Rack
PDF
AngularJS meets Rails
PDF
How angularjs saves rails
PDF
Laravel Restful API and AngularJS
PDF
Web a Quebec - JS Debugging
PPTX
Spring Boot Update
PPTX
Module design pattern i.e. express js
PDF
Introduction to Ruby on Rails
PDF
Ruby On Rails Introduction
DOCX
Rails Concept
PDF
Getting to know Laravel 5
PDF
Laravel presentation
PPTX
Node JS Express : Steps to Create Restful Web App
PPTX
Intro to Laravel
PDF
Rails Girls: Programming, Web Applications and Ruby on Rails
PDF
Laravel 5 Annotations: RESTful API routing
How to dockerize rails application compose and rails tutorial
FITC - Here Be Dragons: Advanced JavaScript Debugging
Ruby conf 2011, Create your own rails framework
Building web framework with Rack
AngularJS meets Rails
How angularjs saves rails
Laravel Restful API and AngularJS
Web a Quebec - JS Debugging
Spring Boot Update
Module design pattern i.e. express js
Introduction to Ruby on Rails
Ruby On Rails Introduction
Rails Concept
Getting to know Laravel 5
Laravel presentation
Node JS Express : Steps to Create Restful Web App
Intro to Laravel
Rails Girls: Programming, Web Applications and Ruby on Rails
Laravel 5 Annotations: RESTful API routing
Ad

Similar to A Toda Maquina Con Ruby on Rails (20)

PDF
Impacta - Show Day de Rails
PDF
Happy Coding with Ruby on Rails
PPT
PHP 5 Sucks. PHP 5 Rocks.
PDF
Arulalan Ruby An Intro
PDF
Rack Middleware
PPTX
Intro To Ruby
PDF
Integrating Flex And Rails With Ruby Amf
PDF
Flex With Rubyamf
PDF
When To Use Ruby On Rails
ODP
Modern Perl
PDF
Ruby presentasjon på NTNU 22 april 2009
PDF
Ruby presentasjon på NTNU 22 april 2009
PDF
Ruby presentasjon på NTNU 22 april 2009
PPT
2007 09 10 Fzi Training Groovy Grails V Ws
PPT
Perl Presentation
PDF
Ruby Isn't Just About Rails
PPT
Ruby Hell Yeah
PDF
Ruby on Rails Presentation
PDF
Good Evils In Perl
PDF
Ruby and rails - Advanced Training (Cybage)
Impacta - Show Day de Rails
Happy Coding with Ruby on Rails
PHP 5 Sucks. PHP 5 Rocks.
Arulalan Ruby An Intro
Rack Middleware
Intro To Ruby
Integrating Flex And Rails With Ruby Amf
Flex With Rubyamf
When To Use Ruby On Rails
Modern Perl
Ruby presentasjon på NTNU 22 april 2009
Ruby presentasjon på NTNU 22 april 2009
Ruby presentasjon på NTNU 22 april 2009
2007 09 10 Fzi Training Groovy Grails V Ws
Perl Presentation
Ruby Isn't Just About Rails
Ruby Hell Yeah
Ruby on Rails Presentation
Good Evils In Perl
Ruby and rails - Advanced Training (Cybage)
Ad

More from Rafael García (7)

PDF
¿Por qué Ruby? Descubre su expresividad (y peculiaridades)
PDF
Quiero ser informatico, ¿que hago?
PDF
Jugando con gosu
PDF
Loading...git
ODP
Loading... Ruby on Rails 3
PDF
Un Trocito De Google
ODP
Taller de Capistrano
¿Por qué Ruby? Descubre su expresividad (y peculiaridades)
Quiero ser informatico, ¿que hago?
Jugando con gosu
Loading...git
Loading... Ruby on Rails 3
Un Trocito De Google
Taller de Capistrano

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Mushroom cultivation and it's methods.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Machine Learning_overview_presentation.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
1. Introduction to Computer Programming.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Approach and Philosophy of On baking technology
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
Tartificialntelligence_presentation.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
Unlocking AI with Model Context Protocol (MCP)
Reach Out and Touch Someone: Haptics and Empathic Computing
Mushroom cultivation and it's methods.pdf
Spectroscopy.pptx food analysis technology
Machine learning based COVID-19 study performance prediction
Encapsulation_ Review paper, used for researhc scholars
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Machine Learning_overview_presentation.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
cloud_computing_Infrastucture_as_cloud_p
Building Integrated photovoltaic BIPV_UPV.pdf
MIND Revenue Release Quarter 2 2025 Press Release
1. Introduction to Computer Programming.pptx
A Presentation on Artificial Intelligence
Approach and Philosophy of On baking technology
A comparative study of natural language inference in Swahili using monolingua...
Tartificialntelligence_presentation.pptx
NewMind AI Weekly Chronicles - August'25-Week II
Mobile App Security Testing_ A Comprehensive Guide.pdf
Advanced methodologies resolving dimensionality complications for autism neur...

A Toda Maquina Con Ruby on Rails

  • 1. A toda máquina con Ruby on Rails Rafael García Ortega – ASPgems [email_address]
  • 2. CSS XHTML Web 2.0 Usabilidad Wiki Standards AJAX Redes Sociales RSS APIs REST Mashups Folksonomy Soap Clouds ASAP Movilidad Tags Avatar Dinámico Estático CMS ASP SaaS Networking Microblogging Streaming Colaboración Open Social
  • 3. Ruby Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software. Yukihiro Matsumoto, a.k.a. “Matz”
  • 4. Ruby Lenguaje dinámico Multiparadigma Orientado a objetos Lenguaje de muy alto nivel Basado en Perl, Smalltalk, Lisp, C, … ...
  • 6. Ruby Lenguaje natural Fácil de leer
  • 7. Ruby Lenguaje natural Fácil de leer Fácil de escribir
  • 8. Ruby Lenguaje natural Fácil de leer Fácil de escribir Productivo
  • 9. Ruby ¡DIVERTIDO! Lenguaje natural Fácil de leer Fácil de escribir Productivo
  • 11. 123 &quot;Ruby&quot; true => Fixnum => String => TrueClass
  • 12. -123.abs &quot;Ruby&quot;.index('b') true.nil? 5 * 10 => 123 => 2 => false => 50
  • 13. -123.abs &quot;Ruby&quot;.index('b') true.nil? 5 * 10 5.*(10) => 123 => 2 => false => 50 => 50
  • 17. Time.now 100.next “ Cadena”.downcase.reverse
  • 18. Time.now 100.next “ Cadena”.downcase.reverse 5.times { print 'hola mundo' }
  • 21. a = [5, 1, 9, 2] a.empty? => false
  • 22. a a.sort a => [5, 1, 9, 2] => [1, 2, 5, 9] => [5, 1, 9, 2]
  • 23. a a.sort! a => [5, 1, 9, 2] => [1, 2, 5, 9] => [1, 2, 5, 9]
  • 25. class String def repeat(i) self * i end end
  • 26. &quot;hola mundo&quot;.repeat(4) class String def repeat(i) self * i end end &quot;Rioja Party 2009&quot;.repeat(4)
  • 27. &quot;hola mundo&quot;.repeat(4) class String def repeat(i) self * i end end class String undef_method :repeat end
  • 29. class String undef_method :repeat end foo = [1, 2, 3] foo << 4 => [1,2,3,4]
  • 30. foo = %w(uno dos tres) foo[1] => ['uno', 'dos', 'tres'] => 'dos'
  • 31. foo = [1, 2, 3] bar = [3, 4, 5] foo+bar => [1, 2, 3, 3, 4, 5]
  • 32. foo = [1, 2, 3] bar = [3, 4, 5] foo+bar foo * 2 => [1, 2, 3, 3, 4, 5] => [1, 2, 3, 1, 2, 3]
  • 33. foo = [1, 2, 3] bar = [3, 4, 5] foo+bar foo * 2 foo & bar => [1, 2, 3, 3, 4, 5] => [1, 2, 3, 1, 2, 3] => [3]
  • 34. foo = [1, 2, 3] bar = [3, 4, 5] foo+bar foo * 2 foo & bar foo | bar => [1, 2, 3, 3, 4, 5] => [1, 2, 3, 1, 2, 3] => [3] => [1, 2, 3, 4, 5]
  • 35. foo.each do |item| puts item end
  • 37. a.inject(0){|sum,item| sum + item} a.map{|item| item*2 }
  • 38. a.inject(0){|sum,item| sum + item} a.map{|item| item*2 } (1..100).find_all{|item| item % 3 == 0}
  • 39. Ruby on Rails The best way to predict the future is to implement it. David Heinemeier Hansson, a.k.a. “DHH” &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
  • 40. Ruby on Rails Extraído a partir de Basecamp &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
  • 41. Ruby on Rails Extraído a partir de Basecamp Patrón MVC &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
  • 42. Ruby on Rails Extraído a partir de Basecamp Patrón MVC DRY – Don't repeat yourself &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
  • 43. Ruby on Rails Extraído a partir de Basecamp Patrón MVC DRY – Don't repeat yourself COC – Conv. Over Config. &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
  • 44. Ruby on Rails Extraído a partir de Basecamp Patrón MVC DRY – Don't repeat yourself COC – Conv. Over Config. Ágil &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
  • 45. Instalación Linux {aptitude, yum} install ruby rubygems gem update –system geim install rails Mac OS X Leopard Gem update –system Gem install rails Mac OS X Tiger Locomotive One-Click Installer Windows InstantRails One Click Installer
  • 46. DEMO
  • 47. Rafael García Ortega – ASPgems [email_address] ¿Preguntas?
  • 48. Enlaces Para aprender: Rails – Guides - http://guides.rubyonrails.org/ Página principal de Ruby: Ruby - http://www.ruby-lang.org/ Página principal de RoR: Ruby on Rails - http://rubyonrails.org/ API: Ruby(API) - http://ruby-doc.org/core/ RoR(API) - http://api.rubyonrails.org/ Consulta: Google - http://google.com Lista RoR-es - http://lists.simplelogica.net/mailman/listinfo/ror-es &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.
  • 49. Enlaces Presenatción basada en: Agile Web Development with Rails ed. Pragmatic Programmers http://www.slideshare.net/jmorrison/rochester-on-rails-introduction-to-ruby http://www.slideshare.net/agnessa/introduction-to-ruby-on-rails http://www.slideshare.net/herval/love-ruby-each-i-p-i http://rubisobrerieles.blogspot.com/2007/01/introduccin-rails-por-thecocktail.html http://www.slideshare.net/sergio.gil/ruby-mola-y-por-qu http://www.slideshare.net/rafaelgaspar/ruby-on-rails-embarque-nesse-framework-web ... &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademarks of David Heinemeier Hansson.