oxente on rails 2009
DESCRIPTION
Mais uma introdução à filosofia das comunidades Ruby e Rails, com ênfase no Ecossistema mais do que na Tecnologia. Vídeo da 37signals: http://www.vimeo.com/6028818Vídeo do Uncle Bob: http://www.vimeo.com/5196176TRANSCRIPT
![Page 1: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/1.jpg)
Ruby on RailsFriday, August 7, 2009
![Page 2: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/2.jpg)
AkitaOnRails.comslideshare.net/akitaonrails
Friday, August 7, 2009
![Page 3: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/3.jpg)
2008Friday, August 7, 2009
![Page 4: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/4.jpg)
2008Friday, August 7, 2009
![Page 5: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/5.jpg)
13 e 14Outubro
2009Friday, August 7, 2009
![Page 6: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/6.jpg)
Friday, August 7, 2009
![Page 7: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/7.jpg)
~140 slides~45 min
Friday, August 7, 2009
![Page 8: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/8.jpg)
www.slideshare.net/akitaonrails
Friday, August 7, 2009
![Page 9: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/9.jpg)
Friday, August 7, 2009
![Page 10: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/10.jpg)
Friday, August 7, 2009
![Page 11: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/11.jpg)
Friday, August 7, 2009
![Page 12: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/12.jpg)
Ruby on Rails 2.3
Ruby 1.8
Novo Ruby 1.9
Friday, August 7, 2009
![Page 13: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/13.jpg)
Ruby on Rails 2.3
Ruby 1.8
Novo Ruby 1.9
Friday, August 7, 2009
![Page 14: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/14.jpg)
Ruby on Rails 2.3
Ruby 1.8
Novo Ruby 1.9
Friday, August 7, 2009
![Page 15: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/15.jpg)
1993
“Matz”
Friday, August 7, 2009
![Page 16: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/16.jpg)
Friday, August 7, 2009
![Page 17: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/17.jpg)
2001
“Prag Dave”
Friday, August 7, 2009
![Page 18: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/18.jpg)
Friday, August 7, 2009
![Page 19: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/19.jpg)
2004
“DHH”
Friday, August 7, 2009
![Page 20: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/20.jpg)
Friday, August 7, 2009
![Page 21: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/21.jpg)
Friday, August 7, 2009
![Page 22: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/22.jpg)
2006
Charles Nutter
Friday, August 7, 2009
![Page 23: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/23.jpg)
Friday, August 7, 2009
![Page 24: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/24.jpg)
Friday, August 7, 2009
![Page 25: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/25.jpg)
Friday, August 7, 2009
![Page 26: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/26.jpg)
Friday, August 7, 2009
![Page 27: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/27.jpg)
“Tornar as coisas
simples fáceis e as
coisas complexas
possíveis”
Filosofia Ruby
Friday, August 7, 2009
![Page 28: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/28.jpg)
Friday, August 7, 2009
![Page 29: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/29.jpg)
Friday, August 7, 2009
![Page 30: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/30.jpg)
Friday, August 7, 2009
![Page 31: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/31.jpg)
Friday, August 7, 2009
![Page 32: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/32.jpg)
O que dizempor aí ...
Friday, August 7, 2009
![Page 33: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/33.jpg)
Pouco usado
Friday, August 7, 2009
![Page 34: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/34.jpg)
Rails não Escala
Friday, August 7, 2009
![Page 35: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/35.jpg)
Ruby é Lento
Friday, August 7, 2009
![Page 36: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/36.jpg)
WTF!?
Friday, August 7, 2009
![Page 37: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/37.jpg)
Pouco usado
Friday, August 7, 2009
![Page 38: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/38.jpg)
Friday, August 7, 2009
![Page 39: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/39.jpg)
Friday, August 7, 2009
![Page 40: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/40.jpg)
Friday, August 7, 2009
![Page 41: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/41.jpg)
Friday, August 7, 2009
![Page 42: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/42.jpg)
Friday, August 7, 2009
![Page 43: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/43.jpg)
Friday, August 7, 2009
![Page 44: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/44.jpg)
Friday, August 7, 2009
![Page 45: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/45.jpg)
Friday, August 7, 2009
![Page 46: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/46.jpg)
Friday, August 7, 2009
![Page 47: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/47.jpg)
Friday, August 7, 2009
![Page 48: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/48.jpg)
Friday, August 7, 2009
![Page 49: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/49.jpg)
Rails não Escala
Friday, August 7, 2009
![Page 50: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/50.jpg)
Friday, August 7, 2009
![Page 51: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/51.jpg)
Blaine Cook
http://www.akitaonrails.com/2008/6/17/chatting-with-blaine-cook-twitter
Friday, August 7, 2009
![Page 52: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/52.jpg)
Para colocar as coisas em perspectiva, o Friendster foi
escrito em Java e eles mudaram para PHP. MySpace foi escrito em ColdFusion e eles mudaram para ASP.NET.
Blaine Cook
http://www.akitaonrails.com/2008/6/17/chatting-with-blaine-cook-twitter
Friday, August 7, 2009
![Page 53: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/53.jpg)
Para colocar as coisas em perspectiva, o Friendster foi
escrito em Java e eles mudaram para PHP. MySpace foi escrito em ColdFusion e eles mudaram para ASP.NET.
Blaine Cook
http://www.akitaonrails.com/2008/6/17/chatting-with-blaine-cook-twitter
Quando as pessoas caem em problemas de escalabilidade, normalmente acham que a
linguagem é o problema, mas eu acho que isso raramente
é a realidade.
Friday, August 7, 2009
![Page 54: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/54.jpg)
http://www.computerworld.com.au/article/268003/ruby_rails_rolls_into_enterprise?fp=16&fpid=1
“O The New York Times usou Ruby on Rails para agregar, analizar e mostrar os resultados das
eleições em quase tempo real em um de seus sites mais acessados de todos os tempos.”
Friday, August 7, 2009
![Page 55: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/55.jpg)
http://www.computerworld.com.au/article/268003/ruby_rails_rolls_into_enterprise?fp=16&fpid=1
“O The New York Times usou Ruby on Rails para agregar, analizar e mostrar os resultados das
eleições em quase tempo real em um de seus sites mais acessados de todos os tempos.”
Friday, August 7, 2009
![Page 56: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/56.jpg)
Ruby é Lento
Friday, August 7, 2009
![Page 57: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/57.jpg)
x mais lento que C++
Friday, August 7, 2009
![Page 58: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/58.jpg)
0
50
100
150
200
Python 2
Ruby 1.9
Perl
JRuby
Python 3
PHP
Ruby 1.8.6
x mais lento que C++
Friday, August 7, 2009
![Page 59: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/59.jpg)
Homepage: 331 ms
Friday, August 7, 2009
![Page 60: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/60.jpg)
Homepage: 331 ms
Total: 5.45 s
Friday, August 7, 2009
![Page 61: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/61.jpg)
Friday, August 7, 2009
![Page 62: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/62.jpg)
Performance
!=Escalabilidade
Friday, August 7, 2009
![Page 63: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/63.jpg)
Ruby on Rails
Friday, August 7, 2009
![Page 64: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/64.jpg)
Friday, August 7, 2009
![Page 65: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/65.jpg)
Código que gera Código
Convention over Configuration
Don’t Repeat Yourself
Extreme Programming
Friday, August 7, 2009
![Page 66: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/66.jpg)
Código que gera Código
Convention over Configuration
Don’t Repeat Yourself
Extreme Programming
Friday, August 7, 2009
![Page 67: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/67.jpg)
Código que gera Código
Convention over Configuration
Don’t Repeat Yourself
Extreme Programming
Friday, August 7, 2009
![Page 68: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/68.jpg)
Código que gera Código
Convention over Configuration
Don’t Repeat Yourself
Extreme Programming
Friday, August 7, 2009
![Page 69: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/69.jpg)
Friday, August 7, 2009
![Page 70: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/70.jpg)
Friday, August 7, 2009
![Page 71: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/71.jpg)
Friday, August 7, 2009
![Page 72: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/72.jpg)
Friday, August 7, 2009
![Page 73: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/73.jpg)
Friday, August 7, 2009
![Page 74: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/74.jpg)
Friday, August 7, 2009
![Page 75: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/75.jpg)
Friday, August 7, 2009
![Page 76: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/76.jpg)
Friday, August 7, 2009
![Page 77: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/77.jpg)
Friday, August 7, 2009
![Page 78: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/78.jpg)
Friday, August 7, 2009
![Page 79: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/79.jpg)
Friday, August 7, 2009
![Page 80: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/80.jpg)
Friday, August 7, 2009
![Page 81: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/81.jpg)
Friday, August 7, 2009
![Page 82: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/82.jpg)
Friday, August 7, 2009
![Page 83: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/83.jpg)
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 => :permalinkend
Model
Friday, August 7, 2009
![Page 84: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/84.jpg)
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 => :permalinkend
Model
Friday, August 7, 2009
![Page 85: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/85.jpg)
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 => :permalinkend
Model
Friday, August 7, 2009
![Page 86: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/86.jpg)
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 => :permalinkend
Model
Friday, August 7, 2009
![Page 87: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/87.jpg)
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 => :permalinkend
Model
Friday, August 7, 2009
![Page 88: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/88.jpg)
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 => :permalinkend
Model
Friday, August 7, 2009
![Page 89: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/89.jpg)
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 => :permalinkend
Model
Friday, August 7, 2009
![Page 90: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/90.jpg)
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 => :permalinkend
Model
Friday, August 7, 2009
![Page 91: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/91.jpg)
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 => :permalinkend
Model
Product.find(1)
Friday, August 7, 2009
![Page 92: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/92.jpg)
<div id="product-listing"> <%= breadcrumbs(@taxon) %> <br/> <%= render :partial => "shared/products.html.erb", :locals => {:products => @products, :taxon => @taxon } %></div>
<% content_for :sidebar do %> <td id="shop-by-col" valign="top"> <%= render :partial => "shared/taxonomies" %> </td><% end %>
<%= render :partial => 'shared/paginate', :locals => {:collection => @products, :options => {}} unless @products.empty? %>
Views ERB
Friday, August 7, 2009
![Page 93: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/93.jpg)
<div id="product-listing"> <%= breadcrumbs(@taxon) %> <br/> <%= render :partial => "shared/products.html.erb", :locals => {:products => @products, :taxon => @taxon } %></div>
<% content_for :sidebar do %> <td id="shop-by-col" valign="top"> <%= render :partial => "shared/taxonomies" %> </td><% end %>
<%= render :partial => 'shared/paginate', :locals => {:collection => @products, :options => {}} unless @products.empty? %>
Views ERB
Friday, August 7, 2009
![Page 94: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/94.jpg)
<div id="product-listing"> <%= breadcrumbs(@taxon) %> <br/> <%= render :partial => "shared/products.html.erb", :locals => {:products => @products, :taxon => @taxon } %></div>
<% content_for :sidebar do %> <td id="shop-by-col" valign="top"> <%= render :partial => "shared/taxonomies" %> </td><% end %>
<%= render :partial => 'shared/paginate', :locals => {:collection => @products, :options => {}} unless @products.empty? %>
Views ERB
Friday, August 7, 2009
![Page 95: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/95.jpg)
ActionController::Routing::Routes.draw do |map|
map.resources :products map.resources :addresses map.resources :orders, :has_many => [:line_items]
map.namespace :admin do |admin| admin.resources :users admin.resources :products endend
Rotas RESTFul
Friday, August 7, 2009
![Page 96: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/96.jpg)
ActionController::Routing::Routes.draw do |map|
map.resources :products map.resources :addresses map.resources :orders, :has_many => [:line_items]
map.namespace :admin do |admin| admin.resources :users admin.resources :products endend
Rotas RESTFul
Friday, August 7, 2009
![Page 97: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/97.jpg)
ActionController::Routing::Routes.draw do |map|
map.resources :products map.resources :addresses map.resources :orders, :has_many => [:line_items]
map.namespace :admin do |admin| admin.resources :users admin.resources :products endend
Rotas RESTFul
Friday, August 7, 2009
![Page 98: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/98.jpg)
ActionController::Routing::Routes.draw do |map|
map.resources :products map.resources :addresses map.resources :orders, :has_many => [:line_items]
map.namespace :admin do |admin| admin.resources :users admin.resources :products endend
Rotas RESTFul
Friday, August 7, 2009
![Page 99: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/99.jpg)
ActionController::Routing::Routes.draw do |map|
map.resources :products map.resources :addresses map.resources :orders, :has_many => [:line_items]
map.namespace :admin do |admin| admin.resources :users admin.resources :products endend
Rotas RESTFul
GET /products/newGET /productsPOST /productsGET /products/1GET /products/1/editPUT /products/1DESTROY /products/1
Friday, August 7, 2009
![Page 100: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/100.jpg)
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
Controller
Friday, August 7, 2009
![Page 101: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/101.jpg)
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
Controller
Friday, August 7, 2009
![Page 102: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/102.jpg)
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
Controller
Friday, August 7, 2009
![Page 103: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/103.jpg)
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
Controller
Friday, August 7, 2009
![Page 104: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/104.jpg)
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
Controller
/users/1
Friday, August 7, 2009
![Page 105: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/105.jpg)
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 endend
Migrations
Friday, August 7, 2009
![Page 106: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/106.jpg)
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 endend
Migrations
Friday, August 7, 2009
![Page 107: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/107.jpg)
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 endend
Migrations
Friday, August 7, 2009
![Page 108: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/108.jpg)
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 endend
Migrations
Friday, August 7, 2009
![Page 109: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/109.jpg)
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 endend
Migrations
rake db:migrate
Friday, August 7, 2009
![Page 110: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/110.jpg)
Open Source
Friday, August 7, 2009
![Page 111: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/111.jpg)
Friday, August 7, 2009
![Page 112: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/112.jpg)
describe BankAccount do before :each do @bank_account = BankAccount.new :balance => 250 end it "should not be valid" do @bank_account.should be_valid end it "should transfer funds successfully" do @bank_account.should_receive(:transfer) .with_args(:amount => 100) .and_return(true) @bank_account.execute_transaction(:amount => 100) @bank_account.balance.should == 150 endend
Friday, August 7, 2009
![Page 113: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/113.jpg)
describe BankAccount do before :each do @bank_account = BankAccount.new :balance => 250 end it "should not be valid" do @bank_account.should be_valid end it "should transfer funds successfully" do @bank_account.should_receive(:transfer) .with_args(:amount => 100) .and_return(true) @bank_account.execute_transaction(:amount => 100) @bank_account.balance.should == 150 endend
Friday, August 7, 2009
![Page 114: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/114.jpg)
describe BankAccount do before :each do @bank_account = BankAccount.new :balance => 250 end it "should not be valid" do @bank_account.should be_valid end it "should transfer funds successfully" do @bank_account.should_receive(:transfer) .with_args(:amount => 100) .and_return(true) @bank_account.execute_transaction(:amount => 100) @bank_account.balance.should == 150 endend
Friday, August 7, 2009
![Page 115: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/115.jpg)
describe BankAccount do before :each do @bank_account = BankAccount.new :balance => 250 end it "should not be valid" do @bank_account.should be_valid end it "should transfer funds successfully" do @bank_account.should_receive(:transfer) .with_args(:amount => 100) .and_return(true) @bank_account.execute_transaction(:amount => 100) @bank_account.balance.should == 150 endend
Friday, August 7, 2009
![Page 116: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/116.jpg)
Friday, August 7, 2009
![Page 117: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/117.jpg)
Funcionalidade: Adição Para evitar erros bobos Como um péssimo matemático Eu quero saber como somar dois números Cenário: Adicionar dois números Dado que eu digitei 50 na calculadora E que eu digitei 70 na calculadora Quando eu aperto o botão de soma Então o resultado na calculadora deve ser 120
Friday, August 7, 2009
![Page 118: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/118.jpg)
Funcionalidade: Adição Para evitar erros bobos Como um péssimo matemático Eu quero saber como somar dois números Cenário: Adicionar dois números Dado que eu digitei 50 na calculadora E que eu digitei 70 na calculadora Quando eu aperto o botão de soma Então o resultado na calculadora deve ser 120
Friday, August 7, 2009
![Page 119: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/119.jpg)
Before do @calc = Calculadora.newend Dado /que eu digitei (\d+) na calculadora/ do |n| @calc.push n.to_iend Quando 'eu aperto o botão de soma' do @result = @calc.somaend Então /o resultado na calculadora deve ser (\d*)/ do |result| @result.should == result.to_iend
Friday, August 7, 2009
![Page 120: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/120.jpg)
Before do @calc = Calculadora.newend Dado /que eu digitei (\d+) na calculadora/ do |n| @calc.push n.to_iend Quando 'eu aperto o botão de soma' do @result = @calc.somaend Então /o resultado na calculadora deve ser (\d*)/ do |result| @result.should == result.to_iend
Friday, August 7, 2009
![Page 121: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/121.jpg)
Before do @calc = Calculadora.newend Dado /que eu digitei (\d+) na calculadora/ do |n| @calc.push n.to_iend Quando 'eu aperto o botão de soma' do @result = @calc.somaend Então /o resultado na calculadora deve ser (\d*)/ do |result| @result.should == result.to_iend
Friday, August 7, 2009
![Page 122: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/122.jpg)
Before do @calc = Calculadora.newend Dado /que eu digitei (\d+) na calculadora/ do |n| @calc.push n.to_iend Quando 'eu aperto o botão de soma' do @result = @calc.somaend Então /o resultado na calculadora deve ser (\d*)/ do |result| @result.should == result.to_iend
Friday, August 7, 2009
![Page 123: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/123.jpg)
class SignupTest < ActionController::IntegrationTest
def test_trial_account_sign_up visit home_path click_link "Sign up" fill_in "Email", :with => "[email protected]" select "Free account" click_button "Register" end
end
Friday, August 7, 2009
![Page 124: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/124.jpg)
Friday, August 7, 2009
![Page 125: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/125.jpg)
rspec rspec.info
cucumber cukes.info
shoulda thoughtbot.com/projects/shoulda
webrat github.com/brynary/webrat
integrity integrityapp.com
ZenTest zenspider.com
Friday, August 7, 2009
![Page 126: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/126.jpg)
• plugins de Active Record
• plugins de Views
• plugins de Localização
• CMS
• Parsers
• Autenticadores/Autorizadores
Friday, August 7, 2009
![Page 127: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/127.jpg)
“Beautiful Code”
Friday, August 7, 2009
![Page 128: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/128.jpg)
//$Id: Booking.java 5579 2007-06-27 00:06:49Z gavin $package org.jboss.seam.example.booking;
import java.io.Serializable;import java.math.BigDecimal;import java.text.DateFormat;import java.util.Date;
import javax.persistence.Basic;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.Id;import javax.persistence.ManyToOne;import javax.persistence.Temporal;import javax.persistence.TemporalType;import javax.persistence.Transient;
import org.hibernate.validator.Length;import org.hibernate.validator.NotNull;import org.hibernate.validator.Pattern;import org.jboss.seam.annotations.Name;
@Entity@Name("booking")public class Booking implements Serializable{ private Long id; private User user; private Hotel hotel; private Date checkinDate; private Date checkoutDate; private String creditCard; private String creditCardName; private int creditCardExpiryMonth; private int creditCardExpiryYear; private boolean smoking; private int beds; public Booking() {} public Booking(Hotel hotel, User user) { this.hotel = hotel; this.user = user; }
@Transient public BigDecimal getTotal() { return hotel.getPrice().multiply( new BigDecimal( getNights() ) ); }
@Transient public int getNights() { return (int) ( checkoutDate.getTime() - checkinDate.getTime() ) / 1000 / 60 / 60 / 24; }
@Id @GeneratedValue public Long getId() { return id; } public void setId(Long id) { this.id = id; } @NotNull @Basic @Temporal(TemporalType.DATE) public Date getCheckinDate() { return checkinDate; } public void setCheckinDate(Date datetime) { this.checkinDate = datetime; }
@ManyToOne @NotNull public Hotel getHotel() { return hotel; } public void setHotel(Hotel hotel) { this.hotel = hotel; } @ManyToOne @NotNull public User getUser() { return user; }
Friday, August 7, 2009
![Page 129: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/129.jpg)
public void setUser(User user) { this.user = user; } @Basic @Temporal(TemporalType.DATE) @NotNull public Date getCheckoutDate() { return checkoutDate; } public void setCheckoutDate(Date checkoutDate) { this.checkoutDate = checkoutDate; } @NotNull(message="Credit card number is required") @Length(min=16, max=16, message="Credit card number must 16 digits long") @Pattern(regex="^\\d*$", message="Credit card number must be numeric") public String getCreditCard() { return creditCard; }
public void setCreditCard(String creditCard) { this.creditCard = creditCard; } @Transient public String getDescription() { DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM); return hotel==null ? null : hotel.getName() + ", " + df.format( getCheckinDate() ) + " to " + df.format( getCheckoutDate() ); }
public boolean isSmoking() { return smoking; }
public void setSmoking(boolean smoking) { this.smoking = smoking; }
public int getBeds() { return beds; }
public void setBeds(int beds) { this.beds = beds; } @NotNull(message="Credit card name is required") @Length(min=3, max=70, message="Credit card name is required") public String getCreditCardName() { return creditCardName; }
public void setCreditCardName(String creditCardName) { this.creditCardName = creditCardName; }
public int getCreditCardExpiryMonth() { return creditCardExpiryMonth; }
public void setCreditCardExpiryMonth(int creditCardExpiryMonth) { this.creditCardExpiryMonth = creditCardExpiryMonth; }
public int getCreditCardExpiryYear() { return creditCardExpiryYear; }
public void setCreditCardExpiryYear(int creditCardExpiryYear) { this.creditCardExpiryYear = creditCardExpiryYear; } @Override public String toString() { return "Booking(" + user + ","+ hotel + ")"; }
}
Friday, August 7, 2009
![Page 130: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/130.jpg)
class Booking < ActiveRecord::Base belongs_to :hotel belongs_to :user validates_presence_of :hotel validates_presence_of :user validates_presence_of :credit_card validates_presence_of :credit_card_name validates_length_of :credit_card, :within => 16..16 validates_format_of :credit_card, :with => /^\\d*$/ validates_length_of :credit_card_name, :within => 3..70 def total hotel.price * nights end def nights ((checkout_date - checkin_date) / 1.day).round end def to_s "Booking(#{user},#{hotel})" endend
Friday, August 7, 2009
![Page 131: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/131.jpg)
class Booking < ActiveRecord::Base belongs_to :hotel belongs_to :user validates_presence_of :hotel validates_presence_of :user validates_presence_of :credit_card validates_presence_of :credit_card_name validates_length_of :credit_card, :within => 16..16 validates_format_of :credit_card, :with => /^\\d*$/ validates_length_of :credit_card_name, :within => 3..70 def total hotel.price * nights end def nights ((checkout_date - checkin_date) / 1.day).round end def to_s "Booking(#{user},#{hotel})" endend
Friday, August 7, 2009
![Page 132: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/132.jpg)
class CreateBookings < ActiveRecord::Migration def self.up create_table :bookings do |t| t.references :user t.references :hotel t.datetime :checkin t.datetime :checkout t.string :credit_card t.string :credit_card_name t.integer :credit_card_expiry_month t.integer :credit_card_expiry_year t.boolean :smoking t.integer :beds
t.timestamps end end
def self.down drop_table :bookings endend
Friday, August 7, 2009
![Page 133: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/133.jpg)
class CreateBookings < ActiveRecord::Migration def self.up create_table :bookings do |t| t.references :user t.references :hotel t.datetime :checkin t.datetime :checkout t.string :credit_card t.string :credit_card_name t.integer :credit_card_expiry_month t.integer :credit_card_expiry_year t.boolean :smoking t.integer :beds
t.timestamps end end
def self.down drop_table :bookings endend
Friday, August 7, 2009
![Page 134: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/134.jpg)
class CreateBookings < ActiveRecord::Migration def self.up create_table :bookings do |t| t.references :user t.references :hotel t.datetime :checkin t.datetime :checkout t.string :credit_card t.string :credit_card_name t.integer :credit_card_expiry_month t.integer :credit_card_expiry_year t.boolean :smoking t.integer :beds
t.timestamps end end
def self.down drop_table :bookings endend
Friday, August 7, 2009
![Page 135: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/135.jpg)
190vs
40
Friday, August 7, 2009
![Page 136: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/136.jpg)
http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails
“Eles servem mais de 23 milhões de visitantes/mês. A conversão resultou em 20 mil linhas de Ruby em vez de 125 mil linhas de Java e, mais importante,
facilitou a dificuldade que tinham em manutenção. Eles também finalizaram a reescrita do sistema em apenas 3 meses com 4 desenvolvedores. Uma vez completo e otimizado, o site deles agora é mais rápido que antes.”
Friday, August 7, 2009
![Page 137: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/137.jpg)
http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails
“Eles servem mais de 23 milhões de visitantes/mês. A conversão resultou em 20 mil linhas de Ruby em vez de 125 mil linhas de Java e, mais importante,
facilitou a dificuldade que tinham em manutenção. Eles também finalizaram a reescrita do sistema em apenas 3 meses com 4 desenvolvedores. Uma vez completo e otimizado, o site deles agora é mais rápido que antes.”
Friday, August 7, 2009
![Page 138: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/138.jpg)
http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails
“Eles servem mais de 23 milhões de visitantes/mês. A conversão resultou em 20 mil linhas de Ruby em vez de 125 mil linhas de Java e, mais importante,
facilitou a dificuldade que tinham em manutenção. Eles também finalizaram a reescrita do sistema em apenas 3 meses com 4 desenvolvedores. Uma vez completo e otimizado, o site deles agora é mais rápido que antes.”
Friday, August 7, 2009
![Page 139: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/139.jpg)
http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails
“Eles servem mais de 23 milhões de visitantes/mês. A conversão resultou em 20 mil linhas de Ruby em vez de 125 mil linhas de Java e, mais importante,
facilitou a dificuldade que tinham em manutenção. Eles também finalizaram a reescrita do sistema em apenas 3 meses com 4 desenvolvedores. Uma vez completo e otimizado, o site deles agora é mais rápido que antes.”
Friday, August 7, 2009
![Page 140: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/140.jpg)
Friday, August 7, 2009
![Page 141: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/141.jpg)
11 mil
classes!
46 só de
coleções!
Friday, August 7, 2009
![Page 142: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/142.jpg)
• Modules:
• Enumerable
• Comparable
• Classes:
• Array
• Hash
• Set
• Sorted Set
Friday, August 7, 2009
![Page 143: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/143.jpg)
• Modules:
• Enumerable
• Comparable
• Classes:
• Array
• Hash
• Set
• Sorted Set
1.400
classes
só 6 de
coleções!
Friday, August 7, 2009
![Page 144: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/144.jpg)
Mitos?
Friday, August 7, 2009
![Page 145: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/145.jpg)
Friday, August 7, 2009
![Page 146: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/146.jpg)
Mais Produtivo
“Melhor”
Anti-legado
Friday, August 7, 2009
![Page 147: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/147.jpg)
Mais Produtivo
“Melhor”
Anti-legado
Friday, August 7, 2009
![Page 148: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/148.jpg)
Mais Produtivo
“Melhor”
Anti-legado
Friday, August 7, 2009
![Page 149: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/149.jpg)
Agilidade
Friday, August 7, 2009
![Page 150: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/150.jpg)
Friday, August 7, 2009
![Page 151: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/151.jpg)
Robert C. Martin
Friday, August 7, 2009
![Page 152: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/152.jpg)
“Uncle Bob”
Friday, August 7, 2009
![Page 153: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/153.jpg)
Código Limpo
Friday, August 7, 2009
![Page 154: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/154.jpg)
Friday, August 7, 2009
![Page 155: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/155.jpg)
Test Driven Development
Friday, August 7, 2009
![Page 156: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/156.jpg)
Friday, August 7, 2009
![Page 157: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/157.jpg)
Ferramentas Ágeis
Friday, August 7, 2009
![Page 158: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/158.jpg)
Gerenciamento
Friday, August 7, 2009
![Page 159: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/159.jpg)
Friday, August 7, 2009
![Page 160: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/160.jpg)
Friday, August 7, 2009
![Page 161: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/161.jpg)
Friday, August 7, 2009
![Page 162: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/162.jpg)
Repositórios
Friday, August 7, 2009
![Page 163: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/163.jpg)
Friday, August 7, 2009
![Page 164: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/164.jpg)
Friday, August 7, 2009
![Page 165: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/165.jpg)
Integração Contínua
Friday, August 7, 2009
![Page 166: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/166.jpg)
Friday, August 7, 2009
![Page 167: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/167.jpg)
Friday, August 7, 2009
![Page 168: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/168.jpg)
Friday, August 7, 2009
![Page 169: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/169.jpg)
Deployment
Friday, August 7, 2009
![Page 170: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/170.jpg)
Friday, August 7, 2009
![Page 171: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/171.jpg)
Friday, August 7, 2009
![Page 172: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/172.jpg)
Friday, August 7, 2009
![Page 173: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/173.jpg)
Monitoramento
Friday, August 7, 2009
![Page 174: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/174.jpg)
Friday, August 7, 2009
![Page 175: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/175.jpg)
Friday, August 7, 2009
![Page 176: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/176.jpg)
Friday, August 7, 2009
![Page 177: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/177.jpg)
Comunidade
Friday, August 7, 2009
![Page 178: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/178.jpg)
Geoffrey
peepcode.com
Friday, August 7, 2009
![Page 179: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/179.jpg)
Jason e Gregg
railsenvy.com
Friday, August 7, 2009
![Page 180: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/180.jpg)
Ryan Bates
railscasts.com
Friday, August 7, 2009
![Page 181: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/181.jpg)
Pratik Naik
guias.rubyonrails.pro.br
Friday, August 7, 2009
![Page 182: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/182.jpg)
Satish Talim
rubylearning.org
Friday, August 7, 2009
![Page 183: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/183.jpg)
Peter Cooper
rubyinside.com.br
Friday, August 7, 2009
![Page 184: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/184.jpg)
_why
why.nomedojogo.com
Friday, August 7, 2009
![Page 185: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/185.jpg)
Friday, August 7, 2009
![Page 186: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/186.jpg)
Friday, August 7, 2009
![Page 187: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/187.jpg)
Friday, August 7, 2009
![Page 188: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/188.jpg)
Friday, August 7, 2009
![Page 189: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/189.jpg)
Friday, August 7, 2009
![Page 190: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/190.jpg)
Friday, August 7, 2009
![Page 191: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/191.jpg)
Friday, August 7, 2009
![Page 192: Oxente on Rails 2009](https://reader035.vdocument.in/reader035/viewer/2022081519/5551e9f9b4c90501638b5163/html5/thumbnails/192.jpg)
Obrigado!akitaonrails.com
Friday, August 7, 2009