Palestra "Do PHP ao Rails"

3,461 views

Published on

Palestra sobre experiência pessoal da migração do PHP para Rails. Ministrada no CEET Vasco Coutinho (http://ceetvascocoutinho.com.br/) - Ciclo de Palestras

Published in: Technology, Sports
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,461
On SlideShare
0
From Embeds
0
Number of Embeds
1,789
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Palestra "Do PHP ao Rails"

  1. 1. Almir 'm3nd3s' @m3nd3s http://www.almirmendes.com m3nd3s@gmail.com http://www.flickr.com/photos/tswicegood/3483353187 Do PHP ao Rails
  2. 2. http://www.flickr.com/photos/mysticpenguin/3310104535/ Quem esse kra mesmo? Como vou saber? Ele não se apresentou.
  3. 3. Sou eu!
  4. 4. http://www.flickr.com/photos/chealion/2349587639
  5. 5. http://www.flickr.com/photos/rdohms/4103026062 PHP
  6. 6. http://www.flickr.com/photos/hlegius/3544338710 Linux + PHP
  7. 7. Oi!
  8. 9. Por que mudar?
  9. 10. 10 .times { | i | puts i }
  10. 12. CI http://www.dojosp.org/?p=59 TDD
  11. 13. http://www.flickr.com/photos/dhaun/5626938236 CI
  12. 14. Agilidade http://www.flickr.com/photos/eriwst/3448608210
  13. 15. Tempo é dinheiro http://www.flickr.com/photos/lindenbaum/345980717
  14. 16. 10 .class => Fixnum OO
  15. 17. Gambiarras http://www.flickr.com/photos/ricardo_ferreira/233163380/
  16. 18. <?php echo “2Patos” + “1Galinha” + “2Codornas” == “5 Pássaros?” ?>
  17. 19. Mercado
  18. 21. http://www.flickr.com/photos/hongiiv/2937154327
  19. 22. http://www.100loop.com/flex/mvc-e-flex/ MVC
  20. 23. $ rails –help Usage: rails COMMAND [ARGS] The most common rails commands are: generate Generate new code (short-cut alias: &quot;g&quot;) console Start the Rails console (short-cut alias: &quot;c&quot;) server Start the Rails server (short-cut alias: &quot;s&quot;) dbconsole Start a console for the database (short-cut alias: &quot;db&quot;) new Create a new Rails application. Comandos
  21. 24. Migrations http://www.flickr.com/photos/nickpix2008/2209582828/
  22. 25. Migrations
  23. 26. class Usuario < ActiveRecord :: Base end Model app/models/usuarios/usuario.rb
  24. 27. u = Usuario .new( :login => 'm3nd3s' ) Model
  25. 28. u.save() u.valid?() u.destroy Usuario .all Usuario .last(5) Usuario .find(1) Model ...
  26. 29. class UsuariosController < ApplicationController def index @usuario = Usuario .all end end Controller app/controllers/usuarios/usuarios_controller.rb
  27. 30. View <h1> <%= @usuario.title %> </h1> app/views/usuarios/index.html.rb
  28. 31. http://www.flickr.com/photos/laserstars/3086132328 Gostei, Por onde começo?!
  29. 32. Rails for zumbies
  30. 33. Rails 3 screencasts
  31. 34. Rails for zumbies
  32. 35. RailsGuides
  33. 36. Gems
  34. 37. RailsRumble
  35. 38. Adena
  36. 39. Almir 'm3nd3s' @m3nd3s http://www.almirmendes.com [email_address]

×