0
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 Movilida...
Ruby Man is driven to create; I know I really love to create things.  And while I'm not good at painting, drawing, or musi...
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] => ...
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&qu...
Ruby on Rails Extraído a partir de Basecamp &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo are trademark...
Ruby on Rails Extraído a partir de Basecamp Patrón MVC &quot;Rails&quot;, &quot;Ruby on Rails&quot;, and the Rails logo ar...
Ruby on Rails Extraído a partir de Basecamp Patrón MVC DRY – Don't repeat yourself &quot;Rails&quot;, &quot;Ruby on Rails&...
Ruby on Rails Extraído a partir de Basecamp Patrón MVC DRY – Don't repeat yourself COC – Conv. Over Config. &quot;Rails&qu...
Ruby on Rails Extraído a partir de Basecamp Patrón MVC DRY – Don't repeat yourself COC – Conv. Over Config. Ágil &quot;Rai...
Instalación Linux {aptitude, yum} install ruby rubygems gem update –system geim install rails Mac OS X Leopard Gem update ...
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-...
Enlaces Presenatción basada en: Agile Web Development with Rails ed. Pragmatic Programmers http://www.slideshare.net/jmorr...
Upcoming SlideShare
Loading in...5
×

A Toda Maquina Con Ruby on Rails

1,589

Published on

Presentación sobre Ruby y Ror realizada en la Riojaparty 2009

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

No Downloads
Views
Total Views
1,589
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
23
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "A Toda Maquina Con Ruby on Rails"

  1. 1. A toda máquina con Ruby on Rails Rafael García Ortega – ASPgems [email_address]
  2. 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. 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. 4. Ruby Lenguaje dinámico Multiparadigma Orientado a objetos Lenguaje de muy alto nivel Basado en Perl, Smalltalk, Lisp, C, … ...
  5. 5. Ruby Lenguaje natural
  6. 6. Ruby Lenguaje natural Fácil de leer
  7. 7. Ruby Lenguaje natural Fácil de leer Fácil de escribir
  8. 8. Ruby Lenguaje natural Fácil de leer Fácil de escribir Productivo
  9. 9. Ruby ¡DIVERTIDO! Lenguaje natural Fácil de leer Fácil de escribir Productivo
  10. 10. Todo son objetos
  11. 11. 123 &quot;Ruby&quot; true => Fixnum => String => TrueClass
  12. 12. -123.abs &quot;Ruby&quot;.index('b') true.nil? 5 * 10 => 123 => 2 => false => 50
  13. 13. -123.abs &quot;Ruby&quot;.index('b') true.nil? 5 * 10 5.*(10) => 123 => 2 => false => 50 => 50
  14. 14. Fácil de leer
  15. 15. Time.now
  16. 16. Time.now 100.next
  17. 17. Time.now 100.next “ Cadena”.downcase.reverse
  18. 18. Time.now 100.next “ Cadena”.downcase.reverse 5.times { print 'hola mundo' }
  19. 19. Convenciones
  20. 20. current_user :login_required @activated @@counter Status
  21. 21. a = [5, 1, 9, 2] a.empty? => false
  22. 22. a a.sort a => [5, 1, 9, 2] => [1, 2, 5, 9] => [5, 1, 9, 2]
  23. 23. a a.sort! a => [5, 1, 9, 2] => [1, 2, 5, 9] => [1, 2, 5, 9]
  24. 24. Flexible
  25. 25. class String def repeat(i) self * i end end
  26. 26. &quot;hola mundo&quot;.repeat(4) class String def repeat(i) self * i end end &quot;Rioja Party 2009&quot;.repeat(4)
  27. 27. &quot;hola mundo&quot;.repeat(4) class String def repeat(i) self * i end end class String undef_method :repeat end
  28. 28. Array (Enumerable)
  29. 29. class String undef_method :repeat end foo = [1, 2, 3] foo << 4 => [1,2,3,4]
  30. 30. foo = %w(uno dos tres) foo[1] => ['uno', 'dos', 'tres'] => 'dos'
  31. 31. foo = [1, 2, 3] bar = [3, 4, 5] foo+bar => [1, 2, 3, 3, 4, 5]
  32. 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. 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. 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. 35. foo.each do |item| puts item end
  36. 36. a.inject(0){|sum,item| sum + item}
  37. 37. a.inject(0){|sum,item| sum + item} a.map{|item| item*2 }
  38. 38. a.inject(0){|sum,item| sum + item} a.map{|item| item*2 } (1..100).find_all{|item| item % 3 == 0}
  39. 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. 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. 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. 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. 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. 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. 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. 46. DEMO
  47. 47. Rafael García Ortega – ASPgems [email_address] ¿Preguntas?
  48. 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. 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.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×