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

A Toda Maquina Con Ruby on Rails

on

  • 2,725 views

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

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

Statistics

Views

Total Views
2,725
Views on SlideShare
2,698
Embed Views
27

Actions

Likes
1
Downloads
22
Comments
0

6 Embeds 27

http://www.slideshare.net 11
http://www.aulir.com 9
http://planeta.aspgems.com 3
http://www.linkedin.com 2
http://aulir.com 1
http://www.aulir.42 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

A Toda Maquina Con Ruby on Rails A Toda Maquina Con Ruby on Rails Presentation Transcript

  • 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.