SlideShare une entreprise Scribd logo
1  sur  183
Télécharger pour lire hors ligne
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Filosofia Ruby

Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
“Eu inventei o termo
                                 ʻorientação a
                               objetosʼ, e posso
                               lhes dizer que eu
                                   não estava
                              pensando em C++.”



Tuesday, September 15, 2009
Tuesday, September 15, 2009
by Dave Thomas
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
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




Tuesday, September 15, 2009
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




Tuesday, September 15, 2009
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




Tuesday, September 15, 2009
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




Tuesday, September 15, 2009
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




Tuesday, September 15, 2009
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




Tuesday, September 15, 2009
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




Tuesday, September 15, 2009
<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? %>



Tuesday, September 15, 2009
<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? %>



Tuesday, September 15, 2009
<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? %>



Tuesday, September 15, 2009
#product-listing
       =breadcrumbs(@taxon)
       %br
       =render :partial => "shared/products.html.erb",
       :locals => {:products => @products, :taxon => @taxon}

     -content_for :sidebar do
       %td#shop-by-col(:valign => "top")
         =render :partial => "shared/taxonomies"

     =render :partial => 'shared/paginate',
       :locals => {:collection => @products, :options => {}}
       unless @products.empty?




Tuesday, September 15, 2009
Tuesday, September 15, 2009
@Transient
                                                                 public BigDecimal getTotal()
      //$Id: Booking.java 5579 2007-06-27 00:06:49Z gavin $      {
      package org.jboss.seam.example.booking;                       return hotel.getPrice().multiply( new BigDecimal( getNights() ) );
                                                                 }
      import   java.io.Serializable;
      import   java.math.BigDecimal;                             @Transient
      import   java.text.DateFormat;                             public int getNights()
      import   java.util.Date;                                   {
                                                                    return (int) ( checkoutDate.getTime() - checkinDate.getTime() ) /
      import   javax.persistence.Basic;                       1000 / 60 / 60 / 24;
      import   javax.persistence.Entity;                         }
      import   javax.persistence.GeneratedValue;
      import   javax.persistence.Id;                             @Id @GeneratedValue
      import   javax.persistence.ManyToOne;                      public Long getId()
      import   javax.persistence.Temporal;                       {
      import   javax.persistence.TemporalType;                      return id;
      import   javax.persistence.Transient;                      }
                                                                 public void setId(Long id)
      import   org.hibernate.validator.Length;                   {
      import   org.hibernate.validator.NotNull;                     this.id = id;
      import   org.hibernate.validator.Pattern;                  }
      import   org.jboss.seam.annotations.Name;
                                                                 @NotNull
      @Entity                                                    @Basic @Temporal(TemporalType.DATE)
      @Name("booking")                                           public Date getCheckinDate()
      public class Booking implements Serializable               {
      {                                                             return checkinDate;
         private Long id;                                        }
         private User user;                                      public void setCheckinDate(Date datetime)
         private Hotel hotel;                                    {
         private Date checkinDate;                                  this.checkinDate = datetime;
         private Date checkoutDate;                              }
         private String creditCard;
         private String creditCardName;                          @ManyToOne @NotNull
         private int creditCardExpiryMonth;                      public Hotel getHotel()
         private int creditCardExpiryYear;                       {
         private boolean smoking;                                   return hotel;
         private int beds;                                       }
                                                                 public void setHotel(Hotel hotel)
         public Booking() {}                                     {
                                                                    this.hotel = hotel;
         public Booking(Hotel hotel, User user)                  }
         {
            this.hotel = hotel;                                  @ManyToOne @NotNull
            this.user = user;                                    public User getUser()
         }                                                       {
                                                                    return user;
                                                                 }

Tuesday, September 15, 2009
public int getBeds()
  public void setUser(User user)
                                                                                  {
  {
                                                                                     return beds;
     this.user = user;
                                                                                  }
  }

                                                                                  public void setBeds(int beds)
  @Basic @Temporal(TemporalType.DATE)
                                                                                  {
  @NotNull
                                                                                     this.beds = beds;
  public Date getCheckoutDate()
                                                                                  }
  {
                                                                                  @NotNull(message="Credit card name is required")
     return checkoutDate;
                                                                                  @Length(min=3, max=70, message="Credit card name is required")
  }
                                                                                  public String getCreditCardName()
  public void setCheckoutDate(Date checkoutDate)
                                                                                  {
  {
                                                                                     return creditCardName;
     this.checkoutDate = checkoutDate;
                                                                                  }
  }

                                                                                  public void setCreditCardName(String creditCardName)
  @NotNull(message="Credit card number is required")
                                                                                  {
  @Length(min=16, max=16, message="Credit card number must 16 digits long")
                                                                                     this.creditCardName = creditCardName;
  @Pattern(regex="^d*$", message="Credit card number must be numeric")
                                                                                  }
  public String getCreditCard()
  {
                                                                                  public int getCreditCardExpiryMonth()
     return creditCard;
                                                                                  {
  }
                                                                                     return creditCardExpiryMonth;
                                                                                  }
  public void setCreditCard(String creditCard)
  {
                                                                                  public void setCreditCardExpiryMonth(int creditCardExpiryMonth)
     this.creditCard = creditCard;
                                                                                  {
  }
                                                                                     this.creditCardExpiryMonth = creditCardExpiryMonth;
                                                                                  }
  @Transient
  public String getDescription()
                                                                                  public int getCreditCardExpiryYear()
  {
                                                                                  {
     DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM);
                                                                                     return creditCardExpiryYear;
     return hotel==null ? null : hotel.getName() +
                                                                                  }
           ", " + df.format( getCheckinDate() ) +
           " to " + df.format( getCheckoutDate() );
                                                                                  public void setCreditCardExpiryYear(int creditCardExpiryYear)
  }
                                                                                  {
                                                                                     this.creditCardExpiryYear = creditCardExpiryYear;
  public boolean isSmoking()
                                                                                  }
  {
     return smoking;
                                                                                  @Override
  }
                                                                                  public String toString()
                                                                                  {
  public void setSmoking(boolean smoking)
                                                                                     return "Booking(" + user + ","+ hotel + ")";
  {
                                                                                  }
     this.smoking = smoking;
  }
                                                                              }


Tuesday, September 15, 2009
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})"
               end
             end
Tuesday, September 15, 2009
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})"
               end
             end
Tuesday, September 15, 2009
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
                         end
                       end

Tuesday, September 15, 2009
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
                         end
                       end

Tuesday, September 15, 2009
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
                         end
                       end

Tuesday, September 15, 2009
Tuesday, September 15, 2009
“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.”




                              http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails




Tuesday, September 15, 2009
“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.”




                              http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails




Tuesday, September 15, 2009
“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.”




                              http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails




Tuesday, September 15, 2009
“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.”




                              http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails




Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Blaine Cook

                              http://www.akitaonrails.com/2008/6/17/chatting-with-blaine-cook-twitter


Tuesday, September 15, 2009
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


Tuesday, September 15, 2009
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.

      Quando as pessoas caem em
       problemas de escalabilidade,
        normalmente acham que a
      linguagem é o problema, mas
      eu acho que isso raramente é
              a realidade.                                                         Blaine Cook

                              http://www.akitaonrails.com/2008/6/17/chatting-with-blaine-cook-twitter


Tuesday, September 15, 2009
“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.”


                      http://www.computerworld.com.au/article/268003/ruby_rails_rolls_into_enterprise?fp=16&fpid=1




Tuesday, September 15, 2009
“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.”


                      http://www.computerworld.com.au/article/268003/ruby_rails_rolls_into_enterprise?fp=16&fpid=1




Tuesday, September 15, 2009
Tuesday, September 15, 2009
x mais lento que C++




Tuesday, September 15, 2009
x mais lento que C++


                       0      50            100           150   200

  Python 2


   Ruby 1.9


        Perl


      JRuby


   Python 3


         PHP


  Ruby 1.8.6




Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Robert C. Martin


Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
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




Tuesday, September 15, 2009
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




Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
“Cowboy”   Profissional




Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
“Cowboy”                   Profissional

                70.00



                52.50
Produtividade




                35.00



                17.50



                   0
                        1   2   3     4    5           6       7         8   9   10
                                               Tempo
 Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009
2008
Tuesday, September 15, 2009
2008
Tuesday, September 15, 2009
Tuesday, September 15, 2009
Tuesday, September 15, 2009

Contenu connexe

Tendances

Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPress
wpnepal
 
Continuous Integration: a practical approach
Continuous Integration: a practical approachContinuous Integration: a practical approach
Continuous Integration: a practical approach
ESUG
 

Tendances (20)

Decoupling the Ulabox.com monolith. From CRUD to DDD
Decoupling the Ulabox.com monolith. From CRUD to DDDDecoupling the Ulabox.com monolith. From CRUD to DDD
Decoupling the Ulabox.com monolith. From CRUD to DDD
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginning
 
Love and Loss: A Symfony Security Play
Love and Loss: A Symfony Security PlayLove and Loss: A Symfony Security Play
Love and Loss: A Symfony Security Play
 
CQRS and Event Sourcing in a Symfony application
CQRS and Event Sourcing in a Symfony applicationCQRS and Event Sourcing in a Symfony application
CQRS and Event Sourcing in a Symfony application
 
Frontin like-a-backer
Frontin like-a-backerFrontin like-a-backer
Frontin like-a-backer
 
Hacking Your Way To Better Security - Dutch PHP Conference 2016
Hacking Your Way To Better Security - Dutch PHP Conference 2016Hacking Your Way To Better Security - Dutch PHP Conference 2016
Hacking Your Way To Better Security - Dutch PHP Conference 2016
 
Hooks WCSD12
Hooks WCSD12Hooks WCSD12
Hooks WCSD12
 
WCLV13 JavaScript
WCLV13 JavaScriptWCLV13 JavaScript
WCLV13 JavaScript
 
How I started to love design patterns
How I started to love design patternsHow I started to love design patterns
How I started to love design patterns
 
Django quickstart
Django quickstartDjango quickstart
Django quickstart
 
Polymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web componentsPolymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web components
 
Jquery
JqueryJquery
Jquery
 
Writing JavaScript that doesn't suck
Writing JavaScript that doesn't suckWriting JavaScript that doesn't suck
Writing JavaScript that doesn't suck
 
New Symfony Tips & Tricks (SymfonyCon Paris 2015)
New Symfony Tips & Tricks (SymfonyCon Paris 2015)New Symfony Tips & Tricks (SymfonyCon Paris 2015)
New Symfony Tips & Tricks (SymfonyCon Paris 2015)
 
Testing ASP.net Web Applications using Ruby
Testing ASP.net Web Applications using RubyTesting ASP.net Web Applications using Ruby
Testing ASP.net Web Applications using Ruby
 
Cyclejs introduction
Cyclejs introductionCyclejs introduction
Cyclejs introduction
 
Rails For Kids 2009
Rails For Kids 2009Rails For Kids 2009
Rails For Kids 2009
 
Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPress
 
Continuous Integration: a practical approach
Continuous Integration: a practical approachContinuous Integration: a practical approach
Continuous Integration: a practical approach
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web Components
 

En vedette

Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014
Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014
Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014
Mark Villacampa
 

En vedette (8)

Bangladesh Labor Rule 2015
Bangladesh Labor Rule 2015Bangladesh Labor Rule 2015
Bangladesh Labor Rule 2015
 
Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014
Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014
Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014
 
Ecossistema Rails Campus Party 09
Ecossistema Rails   Campus Party 09Ecossistema Rails   Campus Party 09
Ecossistema Rails Campus Party 09
 
A Journey through new Languages - Intercon 2016
A Journey through new Languages - Intercon 2016A Journey through new Languages - Intercon 2016
A Journey through new Languages - Intercon 2016
 
Dev in Santos - Como NÃO fazer pesquisas usando LIKE
Dev in Santos - Como NÃO fazer pesquisas usando LIKEDev in Santos - Como NÃO fazer pesquisas usando LIKE
Dev in Santos - Como NÃO fazer pesquisas usando LIKE
 
오픈소스 라이선스 세미나 (2014/07/15)
오픈소스 라이선스 세미나 (2014/07/15)오픈소스 라이선스 세미나 (2014/07/15)
오픈소스 라이선스 세미나 (2014/07/15)
 
Premature Optimization 2.0 - Intercon 2016
Premature Optimization 2.0 - Intercon 2016Premature Optimization 2.0 - Intercon 2016
Premature Optimization 2.0 - Intercon 2016
 
A Journey through New Languages - Locaweb Tech Day
A Journey through New Languages - Locaweb Tech DayA Journey through New Languages - Locaweb Tech Day
A Journey through New Languages - Locaweb Tech Day
 

Similaire à Fórum de Software Livre do Serpro RJ 2009

Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Paulo Ragonha
 

Similaire à Fórum de Software Livre do Serpro RJ 2009 (20)

Dev In Rio 2009
Dev In Rio 2009Dev In Rio 2009
Dev In Rio 2009
 
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
 
Choosing a Javascript Framework
Choosing a Javascript FrameworkChoosing a Javascript Framework
Choosing a Javascript Framework
 
Refactoring using Codeception
Refactoring using CodeceptionRefactoring using Codeception
Refactoring using Codeception
 
Unittests für Dummies
Unittests für DummiesUnittests für Dummies
Unittests für Dummies
 
Symfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technologySymfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technology
 
Virtual Madness @ Etsy
Virtual Madness @ EtsyVirtual Madness @ Etsy
Virtual Madness @ Etsy
 
Effecient javascript
Effecient javascriptEffecient javascript
Effecient javascript
 
TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...
TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...
TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...
 
Clean Javascript
Clean JavascriptClean Javascript
Clean Javascript
 
QA for PHP projects
QA for PHP projectsQA for PHP projects
QA for PHP projects
 
Non Conventional Android Programming (English)
Non Conventional Android Programming (English)Non Conventional Android Programming (English)
Non Conventional Android Programming (English)
 
Non Conventional Android Programming En
Non Conventional Android Programming EnNon Conventional Android Programming En
Non Conventional Android Programming En
 
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
 
Webpack Encore Symfony Live 2017 San Francisco
Webpack Encore Symfony Live 2017 San FranciscoWebpack Encore Symfony Live 2017 San Francisco
Webpack Encore Symfony Live 2017 San Francisco
 
PHP Unit Testing
PHP Unit TestingPHP Unit Testing
PHP Unit Testing
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
 
Oop php 5
Oop php 5Oop php 5
Oop php 5
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
 

Plus de Fabio Akita

Plus de Fabio Akita (20)

Devconf 2019 - São Carlos
Devconf 2019 - São CarlosDevconf 2019 - São Carlos
Devconf 2019 - São Carlos
 
Meetup Nerdzão - English Talk about Languages
Meetup Nerdzão  - English Talk about LanguagesMeetup Nerdzão  - English Talk about Languages
Meetup Nerdzão - English Talk about Languages
 
Desmistificando Blockchains p/ Developers - Criciuma Dev Conf 2018
Desmistificando Blockchains p/ Developers - Criciuma Dev Conf 2018Desmistificando Blockchains p/ Developers - Criciuma Dev Conf 2018
Desmistificando Blockchains p/ Developers - Criciuma Dev Conf 2018
 
Desmistificando Blockchains - 20o Encontro Locaweb SP
Desmistificando Blockchains - 20o Encontro Locaweb SPDesmistificando Blockchains - 20o Encontro Locaweb SP
Desmistificando Blockchains - 20o Encontro Locaweb SP
 
Desmistificando Blockchains - Insiter Goiania
Desmistificando Blockchains - Insiter GoianiaDesmistificando Blockchains - Insiter Goiania
Desmistificando Blockchains - Insiter Goiania
 
Blockchain em 7 minutos - 7Masters
Blockchain em 7 minutos - 7MastersBlockchain em 7 minutos - 7Masters
Blockchain em 7 minutos - 7Masters
 
Elixir -Tolerância a Falhas para Adultos - GDG Campinas
Elixir  -Tolerância a Falhas para Adultos - GDG CampinasElixir  -Tolerância a Falhas para Adultos - GDG Campinas
Elixir -Tolerância a Falhas para Adultos - GDG Campinas
 
Desmistificando Mitos de Tech Startups - Intercon 2017
Desmistificando Mitos de Tech Startups - Intercon 2017Desmistificando Mitos de Tech Startups - Intercon 2017
Desmistificando Mitos de Tech Startups - Intercon 2017
 
30 Days to Elixir and Crystal and Back to Ruby
30 Days to Elixir and Crystal and Back to Ruby30 Days to Elixir and Crystal and Back to Ruby
30 Days to Elixir and Crystal and Back to Ruby
 
Uma Discussão sobre a Carreira de TI
Uma Discussão sobre a Carreira de TIUma Discussão sobre a Carreira de TI
Uma Discussão sobre a Carreira de TI
 
THE CONF - Opening Keynote
THE CONF - Opening KeynoteTHE CONF - Opening Keynote
THE CONF - Opening Keynote
 
A Journey through New Languages - Rancho Dev 2017
A Journey through New Languages - Rancho Dev 2017A Journey through New Languages - Rancho Dev 2017
A Journey through New Languages - Rancho Dev 2017
 
Desmistificando Mitos de Startups - Sebrae - AP
Desmistificando Mitos de Startups - Sebrae - APDesmistificando Mitos de Startups - Sebrae - AP
Desmistificando Mitos de Startups - Sebrae - AP
 
A Journey through New Languages - Guru Sorocaba 2017
A Journey through New Languages - Guru Sorocaba 2017A Journey through New Languages - Guru Sorocaba 2017
A Journey through New Languages - Guru Sorocaba 2017
 
A Journey through New Languages - Insiter 2017
A Journey through New Languages - Insiter 2017A Journey through New Languages - Insiter 2017
A Journey through New Languages - Insiter 2017
 
Conexão Kinghost - Otimização Prematura
Conexão Kinghost - Otimização PrematuraConexão Kinghost - Otimização Prematura
Conexão Kinghost - Otimização Prematura
 
The Open Commerce Conference - Premature Optimisation: The Root of All Evil
The Open Commerce Conference - Premature Optimisation: The Root of All EvilThe Open Commerce Conference - Premature Optimisation: The Root of All Evil
The Open Commerce Conference - Premature Optimisation: The Root of All Evil
 
Premature optimisation: The Root of All Evil
Premature optimisation: The Root of All EvilPremature optimisation: The Root of All Evil
Premature optimisation: The Root of All Evil
 
Elixir - Tolerância a Falhas para Adultos - Secot VIII Sorocaba
Elixir - Tolerância a Falhas para Adultos - Secot VIII SorocabaElixir - Tolerância a Falhas para Adultos - Secot VIII Sorocaba
Elixir - Tolerância a Falhas para Adultos - Secot VIII Sorocaba
 
Elixir: Tolerância a Falhas para Adultos - OneDay Baixada Santista
Elixir: Tolerância a Falhas para Adultos - OneDay Baixada SantistaElixir: Tolerância a Falhas para Adultos - OneDay Baixada Santista
Elixir: Tolerância a Falhas para Adultos - OneDay Baixada Santista
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Fórum de Software Livre do Serpro RJ 2009

  • 36. “Eu inventei o termo ʻorientação a objetosʼ, e posso lhes dizer que eu não estava pensando em C++.” Tuesday, September 15, 2009
  • 38. by Dave Thomas Tuesday, September 15, 2009
  • 63. 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 Tuesday, September 15, 2009
  • 64. 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 Tuesday, September 15, 2009
  • 65. 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 Tuesday, September 15, 2009
  • 66. 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 Tuesday, September 15, 2009
  • 67. 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 Tuesday, September 15, 2009
  • 68. 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 Tuesday, September 15, 2009
  • 69. 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 Tuesday, September 15, 2009
  • 70. <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? %> Tuesday, September 15, 2009
  • 71. <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? %> Tuesday, September 15, 2009
  • 72. <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? %> Tuesday, September 15, 2009
  • 73. #product-listing =breadcrumbs(@taxon) %br =render :partial => "shared/products.html.erb", :locals => {:products => @products, :taxon => @taxon} -content_for :sidebar do %td#shop-by-col(:valign => "top") =render :partial => "shared/taxonomies" =render :partial => 'shared/paginate', :locals => {:collection => @products, :options => {}} unless @products.empty? Tuesday, September 15, 2009
  • 75. @Transient public BigDecimal getTotal() //$Id: Booking.java 5579 2007-06-27 00:06:49Z gavin $ { package org.jboss.seam.example.booking; return hotel.getPrice().multiply( new BigDecimal( getNights() ) ); } import java.io.Serializable; import java.math.BigDecimal; @Transient import java.text.DateFormat; public int getNights() import java.util.Date; { return (int) ( checkoutDate.getTime() - checkinDate.getTime() ) / import javax.persistence.Basic; 1000 / 60 / 60 / 24; import javax.persistence.Entity; } import javax.persistence.GeneratedValue; import javax.persistence.Id; @Id @GeneratedValue import javax.persistence.ManyToOne; public Long getId() import javax.persistence.Temporal; { import javax.persistence.TemporalType; return id; import javax.persistence.Transient; } public void setId(Long id) import org.hibernate.validator.Length; { import org.hibernate.validator.NotNull; this.id = id; import org.hibernate.validator.Pattern; } import org.jboss.seam.annotations.Name; @NotNull @Entity @Basic @Temporal(TemporalType.DATE) @Name("booking") public Date getCheckinDate() public class Booking implements Serializable { { return checkinDate; private Long id; } private User user; public void setCheckinDate(Date datetime) private Hotel hotel; { private Date checkinDate; this.checkinDate = datetime; private Date checkoutDate; } private String creditCard; private String creditCardName; @ManyToOne @NotNull private int creditCardExpiryMonth; public Hotel getHotel() private int creditCardExpiryYear; { private boolean smoking; return hotel; private int beds; } public void setHotel(Hotel hotel) public Booking() {} { this.hotel = hotel; public Booking(Hotel hotel, User user) } { this.hotel = hotel; @ManyToOne @NotNull this.user = user; public User getUser() } { return user; } Tuesday, September 15, 2009
  • 76. public int getBeds() public void setUser(User user) { { return beds; this.user = user; } } public void setBeds(int beds) @Basic @Temporal(TemporalType.DATE) { @NotNull this.beds = beds; public Date getCheckoutDate() } { @NotNull(message="Credit card name is required") return checkoutDate; @Length(min=3, max=70, message="Credit card name is required") } public String getCreditCardName() public void setCheckoutDate(Date checkoutDate) { { return creditCardName; this.checkoutDate = checkoutDate; } } public void setCreditCardName(String creditCardName) @NotNull(message="Credit card number is required") { @Length(min=16, max=16, message="Credit card number must 16 digits long") this.creditCardName = creditCardName; @Pattern(regex="^d*$", message="Credit card number must be numeric") } public String getCreditCard() { public int getCreditCardExpiryMonth() return creditCard; { } return creditCardExpiryMonth; } public void setCreditCard(String creditCard) { public void setCreditCardExpiryMonth(int creditCardExpiryMonth) this.creditCard = creditCard; { } this.creditCardExpiryMonth = creditCardExpiryMonth; } @Transient public String getDescription() public int getCreditCardExpiryYear() { { DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM); return creditCardExpiryYear; return hotel==null ? null : hotel.getName() + } ", " + df.format( getCheckinDate() ) + " to " + df.format( getCheckoutDate() ); public void setCreditCardExpiryYear(int creditCardExpiryYear) } { this.creditCardExpiryYear = creditCardExpiryYear; public boolean isSmoking() } { return smoking; @Override } public String toString() { public void setSmoking(boolean smoking) return "Booking(" + user + ","+ hotel + ")"; { } this.smoking = smoking; } } Tuesday, September 15, 2009
  • 77. 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})" end end Tuesday, September 15, 2009
  • 78. 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})" end end Tuesday, September 15, 2009
  • 79. 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 end end Tuesday, September 15, 2009
  • 80. 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 end end Tuesday, September 15, 2009
  • 81. 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 end end Tuesday, September 15, 2009
  • 83. “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.” http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails Tuesday, September 15, 2009
  • 84. “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.” http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails Tuesday, September 15, 2009
  • 85. “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.” http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails Tuesday, September 15, 2009
  • 86. “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.” http://www.railsonwave.com/railsonwave/2008/6/4/yellowpages-com-migrates-to-rails Tuesday, September 15, 2009
  • 117. Blaine Cook http://www.akitaonrails.com/2008/6/17/chatting-with-blaine-cook-twitter Tuesday, September 15, 2009
  • 118. 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 Tuesday, September 15, 2009
  • 119. 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. Quando as pessoas caem em problemas de escalabilidade, normalmente acham que a linguagem é o problema, mas eu acho que isso raramente é a realidade. Blaine Cook http://www.akitaonrails.com/2008/6/17/chatting-with-blaine-cook-twitter Tuesday, September 15, 2009
  • 120. “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.” http://www.computerworld.com.au/article/268003/ruby_rails_rolls_into_enterprise?fp=16&fpid=1 Tuesday, September 15, 2009
  • 121. “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.” http://www.computerworld.com.au/article/268003/ruby_rails_rolls_into_enterprise?fp=16&fpid=1 Tuesday, September 15, 2009
  • 123. x mais lento que C++ Tuesday, September 15, 2009
  • 124. x mais lento que C++ 0 50 100 150 200 Python 2 Ruby 1.9 Perl JRuby Python 3 PHP Ruby 1.8.6 Tuesday, September 15, 2009
  • 135. Robert C. Martin Tuesday, September 15, 2009
  • 142. 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 Tuesday, September 15, 2009
  • 143. 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 Tuesday, September 15, 2009
  • 147. “Cowboy” Profissional Tuesday, September 15, 2009
  • 148. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 149. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 150. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 151. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 152. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 153. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 154. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 155. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 156. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 157. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 158. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 159. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 160. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 161. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 162. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 163. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 164. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 165. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 166. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 167. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009
  • 168. “Cowboy” Profissional 70.00 52.50 Produtividade 35.00 17.50 0 1 2 3 4 5 6 7 8 9 10 Tempo Tuesday, September 15, 2009