Your SlideShare is downloading. ×
A Toda Maquina Con Ruby on Rails
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

A Toda Maquina Con Ruby on Rails

1,548
views

Published on

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

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,548
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
22
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 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, … ...
  • 5. Ruby Lenguaje natural
  • 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
  • 10. Todo son objetos
  • 11. 123 "Ruby" true => Fixnum => String => TrueClass
  • 12. -123.abs "Ruby".index('b') true.nil? 5 * 10 => 123 => 2 => false => 50
  • 13. -123.abs "Ruby".index('b') true.nil? 5 * 10 5.*(10) => 123 => 2 => false => 50 => 50
  • 14. Fácil de leer
  • 15. Time.now
  • 16. Time.now 100.next
  • 17. Time.now 100.next “ Cadena”.downcase.reverse
  • 18. Time.now 100.next “ Cadena”.downcase.reverse 5.times { print 'hola mundo' }
  • 19. Convenciones
  • 20. current_user :login_required @activated @@counter Status
  • 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]
  • 24. Flexible
  • 25. class String def repeat(i) self * i end end
  • 26. "hola mundo".repeat(4) class String def repeat(i) self * i end end "Rioja Party 2009".repeat(4)
  • 27. "hola mundo".repeat(4) class String def repeat(i) self * i end end class String undef_method :repeat end
  • 28. Array (Enumerable)
  • 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
  • 36. a.inject(0){|sum,item| sum + item}
  • 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.