SlideShare a Scribd company logo
1 of 123
Download to read offline
Ruby on Rails
                           Ecossistema e Agilidade



Wednesday, April 8, 2009
Ruby on Rails
                           Ecossistema e Agilidade



Wednesday, April 8, 2009
Wednesday, April 8, 2009
www.slideshare.net/akitaonrails

                www.akitaonrails.com




Wednesday, April 8, 2009
1
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Aplicações vs.
                            Frameworks



Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
“Produtividade”



                             “Quick’n Dirty”



                             Mantenabilidade



                           DÉBITO TÉCNICO
Wednesday, April 8, 2009
“Produtividade”



                             “Quick’n Dirty”



                             Mantenabilidade



                           DÉBITO TÉCNICO
Wednesday, April 8, 2009
“Produtividade”



                             “Quick’n Dirty”



                             Mantenabilidade



                           DÉBITO TÉCNICO
Wednesday, April 8, 2009
“Produtividade”



                             “Quick’n Dirty”



                             Mantenabilidade



                           DÉBITO TÉCNICO
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Codificadores
                          x
                   Desenvolvedores


Wednesday, April 8, 2009
Wednesday, April 8, 2009
Martin Fowler




Wednesday, April 8, 2009
Agile




Wednesday, April 8, 2009
AGILIDADE



Wednesday, April 8, 2009
Wednesday, April 8, 2009
Estamos “descobrindo” maneiras melhores de
                  desenvolver software na prática e ajudando outros
                                   a desenvolver.




Wednesday, April 8, 2009
Wednesday, April 8, 2009
Big Design Up Front


                           “Waterfall” (Cascata)


                             Escopo Fechado


                           “Change Requests”


Wednesday, April 8, 2009
Big Design Up Front


                           “Waterfall” (Cascata)


                             Escopo Fechado


                           “Change Requests”


Wednesday, April 8, 2009
Big Design Up Front


                           “Waterfall” (Cascata)


                             Escopo Fechado


                           “Change Requests”


Wednesday, April 8, 2009
Big Design Up Front


                           “Waterfall” (Cascata)


                             Escopo Fechado


                           “Change Requests”


Wednesday, April 8, 2009
Wednesday, April 8, 2009
Ceticismo



Wednesday, April 8, 2009
Wednesday, April 8, 2009
Winston W. Royce - 1970
Wednesday, April 8, 2009
“Eu acredito neste conceito mas a
       implementação descrita acima é arriscada
                  e convida falhas.”


                           Winston W. Royce - 1970
Wednesday, April 8, 2009
“Eu acredito neste conceito mas a
       implementação descrita acima é arriscada
                  e convida falhas.”


                           Winston W. Royce - 1970
Wednesday, April 8, 2009
“Eu acredito neste conceito mas a
       implementação descrita acima é arriscada
                  e convida falhas.”


                           Winston W. Royce - 1970
Wednesday, April 8, 2009
“Cargo Cult”


Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
“SOFT”WARE



Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Agilidade NÃO é
                      metodologia



Wednesday, April 8, 2009
Agilidade são
                     valores, cultura.



Wednesday, April 8, 2009
1
Wednesday, April 8, 2009
2
Wednesday, April 8, 2009
“Matz”




                           1993
Wednesday, April 8, 2009
“Prag Dave”




                           2001
Wednesday, April 8, 2009
“DHH”



                            2004
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
“Tornar as coisas simples
                   fáceis e as coisas
                 complexas possíveis”
                           Filosofia Ruby do 80/20




Wednesday, April 8, 2009
Ruby on Rails



Wednesday, April 8, 2009
RUBY

Wednesday, April 8, 2009
ActiveSupport
                           Rails


                                   RUBY

Wednesday, April 8, 2009
ActionController
                           ActionPack
                                                 ActionView


                                               ActiveSupport
                             Rails


                                        RUBY

Wednesday, April 8, 2009
ActiveRecord

                                               ActionController
                           ActionPack
                                                 ActionView


                                               ActiveSupport
                             Rails


                                        RUBY

Wednesday, April 8, 2009
ActionMailer
                       ActiveRecord

                                               ActionController
                           ActionPack
                                                 ActionView


                                               ActiveSupport
                             Rails


                                        RUBY

Wednesday, April 8, 2009
ActiveResource          ActionWebService


                                                     ActionMailer
                       ActiveRecord

                                                   ActionController
                            ActionPack
                                                     ActionView


                                                   ActiveSupport
                               Rails


                                            RUBY

Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Model


  class Product < ActiveRecord::Base
    after_create :set_initial_inventory

      has_many :variants, :dependent => :destroy
      has_many :images, :as => :viewable, :order => :position,
        :dependent => :destroy
      has_many :properties, :through => :product_properties
      belongs_to :tax_category

      validates_presence_of :name
      validates_presence_of :master_price
      validates_presence_of :description

    make_permalink :with => :name, :field => :permalink
  end




Wednesday, April 8, 2009
Model


  class Product < ActiveRecord::Base
    after_create :set_initial_inventory

      has_many :variants, :dependent => :destroy
      has_many :images, :as => :viewable, :order => :position,
        :dependent => :destroy
      has_many :properties, :through => :product_properties
                            Product.find(1)
      belongs_to :tax_category

      validates_presence_of :name
      validates_presence_of :master_price
      validates_presence_of :description

    make_permalink :with => :name, :field => :permalink
  end




Wednesday, April 8, 2009
Views ERB

  <div id=quot;product-listingquot;>
    <%= breadcrumbs(@taxon) %>
    <br/>
    <%= render :partial => quot;shared/products.html.erbquot;,
    :locals => {:products => @products, :taxon => @taxon } %>
  </div>

  <% content_for :sidebar do %>
    <td id=quot;shop-by-colquot; valign=quot;topquot;>
      <%= render :partial => quot;shared/taxonomiesquot; %>
    </td>
  <% end %>

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




Wednesday, April 8, 2009
Views HAML


      #product-listing
        =breadcrumbs(@taxon)
        %br
        =render :partial => quot;shared/products.html.erbquot;,
        :locals => {:products => @products, :taxon => @taxon}

      -content_for :sidebar do
        %td#shop-by-col(:valign => quot;topquot;)
          =render :partial => quot;shared/taxonomiesquot;

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




Wednesday, April 8, 2009
Controller


    class UsersController < Spree::BaseController
      resource_controller
      before_filter :initialize_extension_partials
      actions :all, :except => [:index, :destroy]

        show.before do
          @orders = Order.checkout_completed(true)
            .find_all_by_user_id(current_user.id)
        end

        create.after {     self.current_user = @user }

      create.response do |wants|
        wants.html { redirect_back_or_default(products_path) }
      end
    end




Wednesday, April 8, 2009
Controller


    class UsersController < Spree::BaseController
      resource_controller
      before_filter :initialize_extension_partials
      actions :all, :except => [:index, :destroy]

        show.before do
          @orders = Order.checkout_completed(true)
                                  /users/1
            .find_all_by_user_id(current_user.id)
        end

        create.after {     self.current_user = @user }

      create.response do |wants|
        wants.html { redirect_back_or_default(products_path) }
      end
    end




Wednesday, April 8, 2009
Rotas RESTFul



  ActionController::Routing::Routes.draw do |map|
    map.connect ':controller/service.wsdl', :action => 'wsdl'

      map.resources :products,
        :member => {:change_image => :post}
      map.resources :addresses
      map.resources :orders,
        :has_many => [:line_items]

    map.namespace :admin do |admin|
      admin.resources :users
      admin.resources :products
    end
  end




Wednesday, April 8, 2009
Rotas RESTFul



  ActionController::Routing::Routes.draw do |map|
                   GET /products/new
    map.connect ':controller/service.wsdl', :action => 'wsdl'
                     GET /products
      map.resources :products,
                     POST /products
        :member => {:change_image => :post}

                     GET /products/1
      map.resources :addresses
      map.resources :orders,
                     GET /products/1/edit
        :has_many => [:line_items]

                     PUT /products/1
      map.namespace :admin do |admin|
                     DESTROY /products/1
        admin.resources :users
      admin.resources :products
    end
  end




Wednesday, April 8, 2009
Migrations



        class RenameAppConfiguration < ActiveRecord::Migration
          def self.up
            rename_table :app_configurations, :configurations
            change_table :configurations do |t|
              t.string :type
            end
          end

          def self.down
            change_table :configurations do |t|
              t.remove :type
            end
            rename_table :configurations, :app_configurations
          end
        end



Wednesday, April 8, 2009
Migrations



        class RenameAppConfiguration < ActiveRecord::Migration
          def self.up
            rename_table :app_configurations, :configurations
            change_table :configurations do |t|
              t.string :type
            end
                             rake db:migrate
          end

          def self.down
            change_table :configurations do |t|
              t.remove :type
            end
            rename_table :configurations, :app_configurations
          end
        end



Wednesday, April 8, 2009
RSpec

     describe Product do
       include ProductSpecHelper

        before(:each) do
          @product = Product.new
        end

        it quot;should not be valid when emptyquot; do
          @product.should_not be_valid
        end

       it quot;should be valid when having correct informationquot; do
         @product.attributes = valid_product_attributes
         @product.should be_valid
       end
     end




Wednesday, April 8, 2009
RSpec

     describe Product do
       include ProductSpecHelper

        before(:each) do
          @product = Product.new
        end

        it quot;should not be valid when emptyquot; do
                                 rake spec
          @product.should_not be_valid
        end

       it quot;should be valid when having correct informationquot; do
         @product.attributes = valid_product_attributes
         @product.should be_valid
       end
     end




Wednesday, April 8, 2009
Cucumber



   Funcionalidade: Criar Post no Blog

   Para conseguir divulgar minhas idéias
   Como um blogger
   Eu quero conseguir criar um post no meu blog

   Cenário: Criando um novo Post

      Dado que estou na página de Administração
      E que eu preencho o formulário de novo post
      Então quero conseguir visualizar o título do novo post na homepage




Wednesday, April 8, 2009
“Beautiful Code”



Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
11 mil classes!

                             46 só de
                            Collections!



Wednesday, April 8, 2009
•   Classes:

                     •                          •
                           Modules:                 Array

                           •                    •
                               Enumerable           Hash

                           •                    •
                               Comparable           Set

                                                •   Sorted Set




Wednesday, April 8, 2009
1.400 Classes:
                                            •
                                       classes Array
                     •                        •
                           Modules:

                           •                 • Hash
                               Enumerable

                                       só 6 de Set
                           •                 •
                               Comparable

                                  Collections! Set
                                             • Sorted


Wednesday, April 8, 2009
• Convention over Configuration
      • Don’t Repeat Yourself
      • You Ain’t Gonna Need It
      • Boas Práticas
      • Escalabilidade
      • Segurança
      • Automação




Wednesday, April 8, 2009
2
Wednesday, April 8, 2009
3
Wednesday, April 8, 2009
Mitos



Wednesday, April 8, 2009
Rails não Escala



Wednesday, April 8, 2009
Wednesday, April 8, 2009
Para colocar as coisas em
        perspectiva, o Friendster foi
      escrito em Java no começo, mas
      mudou para PHP. O MySpace foi
         escrito em ColdFusion e
        transicionou para ASP.NET.

        Quando as pessoas caem em
         problemas de escalabilidade,
       costumam pensar sempre que o
       problema é a linguagem, mas eu
        acho que esse raramente é o
                                                                                           Blaine Cook
                   caso.

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



Wednesday, April 8, 2009
“O New York Times usou Ruby on Rails para juntar,
               analisar e mostrar resultados das eleições quase em
             real time em um dos dias mais congestionados de
                              tráfego que já se viu. ”




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



Wednesday, April 8, 2009
“Eles servem mais de 23 milhões de visitantes por mês. A
             conversão resultou em 20 mil linhas de código Ruby em vez de
             125 mil de Java, e mais importante, facilitou a dificuldade que
             tinham em manter isso. Uma vez finalizado e otimizado o site
            deles agora é mais rápido que antes. Eles também finalizaram a
                     re-escrita em 3 meses com 4 desenvolvedores.”


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



Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Mitos



Wednesday, April 8, 2009
Rails é mal
                           documentado



Wednesday, April 8, 2009
Geoffrey
Wednesday, April 8, 2009
Jason e Gregg
Wednesday, April 8, 2009
Pratik Naik
Wednesday, April 8, 2009
Satish Talim
Wednesday, April 8, 2009
Peter Cooper
Wednesday, April 8, 2009
Peter Cooper
Wednesday, April 8, 2009
_why
Wednesday, April 8, 2009
Ryan Bates
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
3
Wednesday, April 8, 2009
4
Wednesday, April 8, 2009
Open Source



Wednesday, April 8, 2009
Chris Wanstrath
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
Wednesday, April 8, 2009
4
Wednesday, April 8, 2009
“Especialista de
              uma coisa só é um
              amador em todo o
                   resto.”

Wednesday, April 8, 2009
Obrigado!
                           fabio.akita@locaweb.com.br

Wednesday, April 8, 2009

More Related Content

Similar to Encontro de TI - Arteccom

2009, o ano do Ruby on Rails no Brasil - CaelumDay 2009
2009, o ano do Ruby on Rails no Brasil - CaelumDay 20092009, o ano do Ruby on Rails no Brasil - CaelumDay 2009
2009, o ano do Ruby on Rails no Brasil - CaelumDay 2009
Caue Guerra
 
Building Apis That Rock
Building Apis That RockBuilding Apis That Rock
Building Apis That Rock
Jeff Eaton
 

Similar to Encontro de TI - Arteccom (20)

Props to Prototypes: Design Fiction Part 2 Design Connexity 2009
Props to Prototypes: Design Fiction Part 2 Design Connexity 2009Props to Prototypes: Design Fiction Part 2 Design Connexity 2009
Props to Prototypes: Design Fiction Part 2 Design Connexity 2009
 
Libraries + Semantic Web = ?
Libraries + Semantic Web = ?Libraries + Semantic Web = ?
Libraries + Semantic Web = ?
 
ERECOMPI
ERECOMPIERECOMPI
ERECOMPI
 
Oxente on Rails 2009
Oxente on Rails 2009Oxente on Rails 2009
Oxente on Rails 2009
 
Information Commons and New Norms for Science
Information Commons and New Norms for ScienceInformation Commons and New Norms for Science
Information Commons and New Norms for Science
 
Rails3: Stepping off of the golden path
Rails3: Stepping off of the golden pathRails3: Stepping off of the golden path
Rails3: Stepping off of the golden path
 
Agile2009
Agile2009Agile2009
Agile2009
 
2009, o ano do Ruby on Rails no Brasil - CaelumDay 2009
2009, o ano do Ruby on Rails no Brasil - CaelumDay 20092009, o ano do Ruby on Rails no Brasil - CaelumDay 2009
2009, o ano do Ruby on Rails no Brasil - CaelumDay 2009
 
It's the Little Things
It's the Little ThingsIt's the Little Things
It's the Little Things
 
Rhouse - Home automation is ruby ?
Rhouse - Home automation is ruby ?Rhouse - Home automation is ruby ?
Rhouse - Home automation is ruby ?
 
Plone e Web 2.0
Plone e Web 2.0Plone e Web 2.0
Plone e Web 2.0
 
Fennec Introduction WinMoA3
Fennec Introduction WinMoA3Fennec Introduction WinMoA3
Fennec Introduction WinMoA3
 
Mobile Mountains - OverTheAir 2009
Mobile Mountains - OverTheAir 2009Mobile Mountains - OverTheAir 2009
Mobile Mountains - OverTheAir 2009
 
Enecomp 2009
Enecomp 2009Enecomp 2009
Enecomp 2009
 
Uber Vu - Scrum & Startups
Uber Vu - Scrum & StartupsUber Vu - Scrum & Startups
Uber Vu - Scrum & Startups
 
Where is the two-sister fried koay teow ?
Where is the two-sister fried koay teow ?Where is the two-sister fried koay teow ?
Where is the two-sister fried koay teow ?
 
Building Apis That Rock
Building Apis That RockBuilding Apis That Rock
Building Apis That Rock
 
Fennec Introduction preWinMoA3
Fennec Introduction preWinMoA3Fennec Introduction preWinMoA3
Fennec Introduction preWinMoA3
 
Digital Media
Digital MediaDigital Media
Digital Media
 
Waiting For The World To Change
Waiting For The World To ChangeWaiting For The World To Change
Waiting For The World To Change
 

More from Fabio Akita

More from 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
 
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
 
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
 
Premature Optimization 2.0 - Intercon 2016
Premature Optimization 2.0 - Intercon 2016Premature Optimization 2.0 - Intercon 2016
Premature Optimization 2.0 - Intercon 2016
 
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
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.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
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Encontro de TI - Arteccom

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