Encontro de TI - Arteccom

800 views

Published on

Palestra sobre Agilidade e Ruby on Rails no Encontro de TI do Rio de Janeiro, pela Arteccom.

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

No Downloads
Views
Total views
800
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
20
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Encontro de TI - Arteccom

  1. 1. Ruby on Rails Ecossistema e Agilidade Wednesday, April 8, 2009
  2. 2. Ruby on Rails Ecossistema e Agilidade Wednesday, April 8, 2009
  3. 3. Wednesday, April 8, 2009
  4. 4. www.slideshare.net/akitaonrails www.akitaonrails.com Wednesday, April 8, 2009
  5. 5. 1 Wednesday, April 8, 2009
  6. 6. Wednesday, April 8, 2009
  7. 7. Aplicações vs. Frameworks Wednesday, April 8, 2009
  8. 8. Wednesday, April 8, 2009
  9. 9. Wednesday, April 8, 2009
  10. 10. Wednesday, April 8, 2009
  11. 11. “Produtividade” “Quick’n Dirty” Mantenabilidade DÉBITO TÉCNICO Wednesday, April 8, 2009
  12. 12. “Produtividade” “Quick’n Dirty” Mantenabilidade DÉBITO TÉCNICO Wednesday, April 8, 2009
  13. 13. “Produtividade” “Quick’n Dirty” Mantenabilidade DÉBITO TÉCNICO Wednesday, April 8, 2009
  14. 14. “Produtividade” “Quick’n Dirty” Mantenabilidade DÉBITO TÉCNICO Wednesday, April 8, 2009
  15. 15. Wednesday, April 8, 2009
  16. 16. Codificadores x Desenvolvedores Wednesday, April 8, 2009
  17. 17. Wednesday, April 8, 2009
  18. 18. Martin Fowler Wednesday, April 8, 2009
  19. 19. Agile Wednesday, April 8, 2009
  20. 20. AGILIDADE Wednesday, April 8, 2009
  21. 21. Wednesday, April 8, 2009
  22. 22. Estamos “descobrindo” maneiras melhores de desenvolver software na prática e ajudando outros a desenvolver. Wednesday, April 8, 2009
  23. 23. Wednesday, April 8, 2009
  24. 24. Big Design Up Front “Waterfall” (Cascata) Escopo Fechado “Change Requests” Wednesday, April 8, 2009
  25. 25. Big Design Up Front “Waterfall” (Cascata) Escopo Fechado “Change Requests” Wednesday, April 8, 2009
  26. 26. Big Design Up Front “Waterfall” (Cascata) Escopo Fechado “Change Requests” Wednesday, April 8, 2009
  27. 27. Big Design Up Front “Waterfall” (Cascata) Escopo Fechado “Change Requests” Wednesday, April 8, 2009
  28. 28. Wednesday, April 8, 2009
  29. 29. Ceticismo Wednesday, April 8, 2009
  30. 30. Wednesday, April 8, 2009
  31. 31. Winston W. Royce - 1970 Wednesday, April 8, 2009
  32. 32. “Eu acredito neste conceito mas a implementação descrita acima é arriscada e convida falhas.” Winston W. Royce - 1970 Wednesday, April 8, 2009
  33. 33. “Eu acredito neste conceito mas a implementação descrita acima é arriscada e convida falhas.” Winston W. Royce - 1970 Wednesday, April 8, 2009
  34. 34. “Eu acredito neste conceito mas a implementação descrita acima é arriscada e convida falhas.” Winston W. Royce - 1970 Wednesday, April 8, 2009
  35. 35. “Cargo Cult” Wednesday, April 8, 2009
  36. 36. Wednesday, April 8, 2009
  37. 37. Wednesday, April 8, 2009
  38. 38. “SOFT”WARE Wednesday, April 8, 2009
  39. 39. Wednesday, April 8, 2009
  40. 40. Wednesday, April 8, 2009
  41. 41. Agilidade NÃO é metodologia Wednesday, April 8, 2009
  42. 42. Agilidade são valores, cultura. Wednesday, April 8, 2009
  43. 43. 1 Wednesday, April 8, 2009
  44. 44. 2 Wednesday, April 8, 2009
  45. 45. “Matz” 1993 Wednesday, April 8, 2009
  46. 46. “Prag Dave” 2001 Wednesday, April 8, 2009
  47. 47. “DHH” 2004 Wednesday, April 8, 2009
  48. 48. Wednesday, April 8, 2009
  49. 49. Wednesday, April 8, 2009
  50. 50. Wednesday, April 8, 2009
  51. 51. “Tornar as coisas simples fáceis e as coisas complexas possíveis” Filosofia Ruby do 80/20 Wednesday, April 8, 2009
  52. 52. Ruby on Rails Wednesday, April 8, 2009
  53. 53. RUBY Wednesday, April 8, 2009
  54. 54. ActiveSupport Rails RUBY Wednesday, April 8, 2009
  55. 55. ActionController ActionPack ActionView ActiveSupport Rails RUBY Wednesday, April 8, 2009
  56. 56. ActiveRecord ActionController ActionPack ActionView ActiveSupport Rails RUBY Wednesday, April 8, 2009
  57. 57. ActionMailer ActiveRecord ActionController ActionPack ActionView ActiveSupport Rails RUBY Wednesday, April 8, 2009
  58. 58. ActiveResource ActionWebService ActionMailer ActiveRecord ActionController ActionPack ActionView ActiveSupport Rails RUBY Wednesday, April 8, 2009
  59. 59. Wednesday, April 8, 2009
  60. 60. Wednesday, April 8, 2009
  61. 61. Wednesday, April 8, 2009
  62. 62. Wednesday, April 8, 2009
  63. 63. Wednesday, April 8, 2009
  64. 64. Wednesday, April 8, 2009
  65. 65. Wednesday, April 8, 2009
  66. 66. Wednesday, April 8, 2009
  67. 67. Model class Product < ActiveRecord::Base after_create :set_initial_inventory has_many :variants, :dependent => :destroy has_many :images, :as => :viewable, :order => :position, :dependent => :destroy has_many :properties, :through => :product_properties belongs_to :tax_category validates_presence_of :name validates_presence_of :master_price validates_presence_of :description make_permalink :with => :name, :field => :permalink end Wednesday, April 8, 2009
  68. 68. Model class Product < ActiveRecord::Base after_create :set_initial_inventory has_many :variants, :dependent => :destroy has_many :images, :as => :viewable, :order => :position, :dependent => :destroy has_many :properties, :through => :product_properties Product.find(1) belongs_to :tax_category validates_presence_of :name validates_presence_of :master_price validates_presence_of :description make_permalink :with => :name, :field => :permalink end Wednesday, April 8, 2009
  69. 69. Views ERB <div id=quot;product-listingquot;> <%= breadcrumbs(@taxon) %> <br/> <%= render :partial => quot;shared/products.html.erbquot;, :locals => {:products => @products, :taxon => @taxon } %> </div> <% content_for :sidebar do %> <td id=quot;shop-by-colquot; valign=quot;topquot;> <%= render :partial => quot;shared/taxonomiesquot; %> </td> <% end %> <%= render :partial => 'shared/paginate', :locals => {:collection => @products, :options => {}} unless @products.empty? %> Wednesday, April 8, 2009
  70. 70. Views HAML #product-listing =breadcrumbs(@taxon) %br =render :partial => quot;shared/products.html.erbquot;, :locals => {:products => @products, :taxon => @taxon} -content_for :sidebar do %td#shop-by-col(:valign => quot;topquot;) =render :partial => quot;shared/taxonomiesquot; =render :partial => 'shared/paginate', :locals => {:collection => @products, :options => {}} unless @products.empty? Wednesday, April 8, 2009
  71. 71. Controller class UsersController < Spree::BaseController resource_controller before_filter :initialize_extension_partials actions :all, :except => [:index, :destroy] show.before do @orders = Order.checkout_completed(true) .find_all_by_user_id(current_user.id) end create.after { self.current_user = @user } create.response do |wants| wants.html { redirect_back_or_default(products_path) } end end Wednesday, April 8, 2009
  72. 72. Controller class UsersController < Spree::BaseController resource_controller before_filter :initialize_extension_partials actions :all, :except => [:index, :destroy] show.before do @orders = Order.checkout_completed(true) /users/1 .find_all_by_user_id(current_user.id) end create.after { self.current_user = @user } create.response do |wants| wants.html { redirect_back_or_default(products_path) } end end Wednesday, April 8, 2009
  73. 73. Rotas RESTFul ActionController::Routing::Routes.draw do |map| map.connect ':controller/service.wsdl', :action => 'wsdl' map.resources :products, :member => {:change_image => :post} map.resources :addresses map.resources :orders, :has_many => [:line_items] map.namespace :admin do |admin| admin.resources :users admin.resources :products end end Wednesday, April 8, 2009
  74. 74. Rotas RESTFul ActionController::Routing::Routes.draw do |map| GET /products/new map.connect ':controller/service.wsdl', :action => 'wsdl' GET /products map.resources :products, POST /products :member => {:change_image => :post} GET /products/1 map.resources :addresses map.resources :orders, GET /products/1/edit :has_many => [:line_items] PUT /products/1 map.namespace :admin do |admin| DESTROY /products/1 admin.resources :users admin.resources :products end end Wednesday, April 8, 2009
  75. 75. Migrations class RenameAppConfiguration < ActiveRecord::Migration def self.up rename_table :app_configurations, :configurations change_table :configurations do |t| t.string :type end end def self.down change_table :configurations do |t| t.remove :type end rename_table :configurations, :app_configurations end end Wednesday, April 8, 2009
  76. 76. Migrations class RenameAppConfiguration < ActiveRecord::Migration def self.up rename_table :app_configurations, :configurations change_table :configurations do |t| t.string :type end rake db:migrate end def self.down change_table :configurations do |t| t.remove :type end rename_table :configurations, :app_configurations end end Wednesday, April 8, 2009
  77. 77. RSpec describe Product do include ProductSpecHelper before(:each) do @product = Product.new end it quot;should not be valid when emptyquot; do @product.should_not be_valid end it quot;should be valid when having correct informationquot; do @product.attributes = valid_product_attributes @product.should be_valid end end Wednesday, April 8, 2009
  78. 78. RSpec describe Product do include ProductSpecHelper before(:each) do @product = Product.new end it quot;should not be valid when emptyquot; do rake spec @product.should_not be_valid end it quot;should be valid when having correct informationquot; do @product.attributes = valid_product_attributes @product.should be_valid end end Wednesday, April 8, 2009
  79. 79. Cucumber Funcionalidade: Criar Post no Blog Para conseguir divulgar minhas idéias Como um blogger Eu quero conseguir criar um post no meu blog Cenário: Criando um novo Post Dado que estou na página de Administração E que eu preencho o formulário de novo post Então quero conseguir visualizar o título do novo post na homepage Wednesday, April 8, 2009
  80. 80. “Beautiful Code” Wednesday, April 8, 2009
  81. 81. Wednesday, April 8, 2009
  82. 82. Wednesday, April 8, 2009
  83. 83. Wednesday, April 8, 2009
  84. 84. 11 mil classes! 46 só de Collections! Wednesday, April 8, 2009
  85. 85. • Classes: • • Modules: Array • • Enumerable Hash • • Comparable Set • Sorted Set Wednesday, April 8, 2009
  86. 86. 1.400 Classes: • classes Array • • Modules: • • Hash Enumerable só 6 de Set • • Comparable Collections! Set • Sorted Wednesday, April 8, 2009
  87. 87. • Convention over Configuration • Don’t Repeat Yourself • You Ain’t Gonna Need It • Boas Práticas • Escalabilidade • Segurança • Automação Wednesday, April 8, 2009
  88. 88. 2 Wednesday, April 8, 2009
  89. 89. 3 Wednesday, April 8, 2009
  90. 90. Mitos Wednesday, April 8, 2009
  91. 91. Rails não Escala Wednesday, April 8, 2009
  92. 92. Wednesday, April 8, 2009
  93. 93. Para colocar as coisas em perspectiva, o Friendster foi escrito em Java no começo, mas mudou para PHP. O MySpace foi escrito em ColdFusion e transicionou para ASP.NET. Quando as pessoas caem em problemas de escalabilidade, costumam pensar sempre que o problema é a linguagem, mas eu acho que esse raramente é o Blaine Cook caso. http://www.akitaonrails.com/2008/6/17/chatting-with-blaine-cook-twitter Wednesday, April 8, 2009
  94. 94. “O New York Times usou Ruby on Rails para juntar, analisar e mostrar resultados das eleições quase em real time em um dos dias mais congestionados de tráfego que já se viu. ” http://www.computerworld.com.au/article/268003/ruby_rails_rolls_into_enterprise?fp=16&fpid=1 Wednesday, April 8, 2009
  95. 95. “Eles servem mais de 23 milhões de visitantes por mês. A conversão resultou em 20 mil linhas de código Ruby em vez de 125 mil de Java, e mais importante, facilitou a dificuldade que tinham em manter isso. Uma vez finalizado e otimizado o site deles agora é mais rápido que antes. Eles também finalizaram a re-escrita em 3 meses com 4 desenvolvedores.” http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails Wednesday, April 8, 2009
  96. 96. Wednesday, April 8, 2009
  97. 97. Wednesday, April 8, 2009
  98. 98. Mitos Wednesday, April 8, 2009
  99. 99. Rails é mal documentado Wednesday, April 8, 2009
  100. 100. Geoffrey Wednesday, April 8, 2009
  101. 101. Jason e Gregg Wednesday, April 8, 2009
  102. 102. Pratik Naik Wednesday, April 8, 2009
  103. 103. Satish Talim Wednesday, April 8, 2009
  104. 104. Peter Cooper Wednesday, April 8, 2009
  105. 105. Peter Cooper Wednesday, April 8, 2009
  106. 106. _why Wednesday, April 8, 2009
  107. 107. Ryan Bates Wednesday, April 8, 2009
  108. 108. Wednesday, April 8, 2009
  109. 109. Wednesday, April 8, 2009
  110. 110. 3 Wednesday, April 8, 2009
  111. 111. 4 Wednesday, April 8, 2009
  112. 112. Open Source Wednesday, April 8, 2009
  113. 113. Chris Wanstrath Wednesday, April 8, 2009
  114. 114. Wednesday, April 8, 2009
  115. 115. Wednesday, April 8, 2009
  116. 116. Wednesday, April 8, 2009
  117. 117. Wednesday, April 8, 2009
  118. 118. Wednesday, April 8, 2009
  119. 119. Wednesday, April 8, 2009
  120. 120. Wednesday, April 8, 2009
  121. 121. 4 Wednesday, April 8, 2009
  122. 122. “Especialista de uma coisa só é um amador em todo o resto.” Wednesday, April 8, 2009
  123. 123. Obrigado! fabio.akita@locaweb.com.br Wednesday, April 8, 2009

×