rails_and_agile

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    rails_and_agile - Presentation Transcript

    1.  
    2. Quem?
        • WWR since 2005
        • workingwithrails.com/person/9354
        • Exclusivamente desde o início de 2008
        • Uma dúzia de projetos
        • TargetTrust
        • Yes, we do consulting.
    3. Quem?
      • <propaganda>
        • mailee.me
        • Envia e-mails HTML personalizados
        • Recebe os retornos e trata
        • Sistema de templates muito foda (graças ao Hpricot)‏
        • Envios automáticos por URL ou RSS
        • Relatórios completos (ajax, links no próprio e-mail, geográficos...)‏
        • Importa contatos em vários formatos
        • Permite integração com site ou por REST
      • </propaganda>
    4. Quem? <propaganda> &quot;Encontramos no Mailee o que faltava para nossas necessidades como agência digital. Os padrões de qualidade e usabilidade são incomparáveis e ganham de longe de qualquer outra solução de e-mail marketing que já utilizamos.&quot; - Lucas Wendling, GO-GO Internet Para Negócios &quot;O tipo de serviço que o Mailee oferece é, sem duvidas, um dos melhores já vistos. O que mais me chamou a atenção foi o seu design inovador web 2.0. Garanto que muitas pessoas vão se divertir de forma profissional ao usar o Mailee. Fantástico.&quot; - Ricardo Aureliano, Grupo Ribeiro Filho &quot;O que eu gostei no Mailee é a simplicidade de usar, atrelada aos recursos. Posso exportar todos meus contatos do e-mail sem nenhum esforço e manipular meu template facilmente. Para usá-lo não precisa nem FAQ, de tão intuitivo.&quot; - Leonardo Faria, Auto Simulado &quot;Testei várias ferramentas de email-marketing, mas nenhuma era rápida, precisa e prática de usar. Encontrei estas qualidades no Mailee e estou muito satisfeito. Estou indicando para todos os meus clientes, pois realmente confio no trabalho e na seriedade da equipe do Mailee. &quot; - Edison Marcelo dos Santos, CredInfo </propaganda>
    5. Roteiro “ It is impossible not to notice Ruby on Rails. It has had a huge effect both in and outside the Ruby community... Rails has become a standard to which even well-established tools are comparing themselves to.” - Martin Fowler
    6. Roteiro Apresentar práticas ágeis e ferramentas Rails que as suportam. Sempre com drops da sabedoria de Martin Fowler.
    7. Comunicação “ Remember your code is for a human first and a computer second.” - Martin Fowler, Refactoring
    8. Comunicação # Relacionamentos de modelo class Presentation < ActiveRecord::Base belongs_to :conference has_one :speaker has_many :listeners end ra = Presentation .find_by_name( &quot;Rails & Agile&quot; )‏ ra .speaker.name ==> &quot;Juan Maiz&quot; ra .conference.name ==> &quot;Agile Weekend&quot; ra .listeners.count ==> 3560 (Megalomaniac...)‏
    9. Comunicação # Escopos de modelo class Customer < ActiveRecord::Base named_scope :active , :condition => &quot;active&quot; named_scope :recent , :order => &quot;created_at desc&quot; end Customer . active . recent
    10. Comunicação # Comportamento! class Category < ActiveRecord::Base acts_as_tree end Category .find_by_name( &quot;Ruby&quot; ).parent.name => Programming Languages
    11. Comunicação # Transações Account .transaction do john .draw( 100 )‏ mary .deposit( 100 )‏ end
    12. Testes Ferramentas TDD padrão: - Unit (modelos)‏ - Functional (controles)‏ - Integration - Performance
    13. Testes Unit def test_should_not_save_speaker_without_name speaker = Speaker .new assert ! speaker .save, &quot;Salvou speaker sem nome&quot; end
    14. Testes Functional def test_should_get_index get :index assert_response :success assert_not_nil assigns( :conferences )‏ end
    15. Testes Integração def test_login_and_browse_conferences https! get '/login' assert_response :success post_via_redirect &quot;/login&quot; , :user => 'foo' , :pass => 'bar' assert_equal '/welcome' , path assert_equal 'Seja bem vindo, Foo!' , flash[ :notice ] get '/conferences' assert_response :success assert assigns( :conferences )‏ end
    16. Testes
      • E muitos addons para TDD:
        • Mocha mocha.rubyforge.org
        • NullDB avdi.org/projects/nulldb
        • FactoryGirl github.com/thoughtbot/factory_girl
        • Machinist github.com/notahat/machinist
        • Selenium seleniumhq.org/projects/on-rails
        • Watir (FireWatir, SafariWatir, ChromeWatir) wtr.rubyforge.org
        • Celerity celerity.rubyforge.org
        • WebRat svn.eastmedia.net/public/plugins/webrat
        • RCov eigenclass.org/hiki/rcov
        • ZenTest zentest.rubyforge.org
    17. Testes # Mocha Sum .expects( :do ).with( 2 , 2 ).returns( 4 )‏ assert_equal 4 , Sum .do( 2 , 2 )‏ # FactoryGirl Factory .define :speaker do | s | s .name 'Juan' s .address 'Mock address' end speaker = Factory .create( :speaker )‏
    18. Testes # Machinist Sham .define do name { Faker :: Name .name } address { Faker :: Lorem .paragraph } end Speaker .blueprint do name email end Speaker .make
    19. Testes # Watir (e similares)‏ browser = Watir :: Browser .new browser .goto 'http://www.google.com' browser .text_field( :name , 'q' ).set 'rails' browser .button( :name , 'btnG' ).click #WebRat test 'login' do User.create!( :user => 'foo' , :pass => 'bar' )‏ visit login_url fill_in 'Usuário' , :with => 'foo' fill_in 'Senha', :with => 'bar' click_button 'Enviar' assert_contain 'Seja bem vindo, foo.' end
    20. Testes &quot;With a business-readable DSL, programmers write the code but they show that code frequently to business people who can understand what it means. These customers can then make changes, maybe draft some code...&quot; - Martin Fowler martinfowler.com/bliki/BusinessReadableDSL.html
    21. Testes
      • Ferramentas BDD:
        • Shoulda thoughtbot.com/projects/shoulda
        • RSpec rspec.info
        • Remarkable github.com/carlosbrando/remarkable
        • Cucumber cukes.info
        • Pickle github.com/ianwhite/pickle
      • Dan North user story
      • dannorth.net/whats-in-a-story
      • RSpec book
      • pragprog.com/titles/achbd/the-rspec-book
    22. Testes # Cucumber Gherkin Funcionalidade : Cadastrar palestrantes Para ter palestrantes nos eventos Como um usuário administrador Eu quero poder inserir palestrantes Cenário : Cadastrar novo palestrante Dado que estou na página de novo palestrante E o total de palestrantes é 0 Quando preencho &quot;Nome&quot; com &quot;Foo&quot; E preencho &quot;Endereço&quot; com &quot;Bar&quot; E clico em &quot;Criar&quot; Então devo ver &quot;Foo&quot; E devo ver &quot;Bar&quot; E o total de palestrantes deve ser 1
    23. Testes # Cucumber + RSpec + WebRat Given /que estou na página de novo palestrante/ do visit '/speakers/new' end Given /o total de palestrantes é 0/ do Speaker .delete_all end # Generalizando! When /^preencho &quot;(.+?)&quot; com &quot;(.+?)&quot;/ do | field , value | fill_in( field , :with => value ) end Then /^I should see &quot;([^&quot;]*)&quot;$/ do | text | response .should contain( text )‏ end Then /o total de palestrantes deve ser (d+?)/ do | num | Speaker .count.should == num end
    24. Testes # executando... Funcionalidade: Cadastrar palestrantes Para ter palestrantes nos eventos Como um usuário administrador Eu quero poder inserir palestrantes Cenário: Cadastrar novo palestrante Dado que estou na página de novo palestrante E o total de palestrantes é 0 Quando preencho &quot;Nome&quot; com &quot;Foo&quot; E preencho &quot;Endereço&quot; com &quot;Bar&quot; E clico em &quot;Criar&quot; Então devo ver &quot;Foo&quot; E devo ver &quot;Bar&quot; E o total de palestrantes deve ser 1
    25. Propriedade coletiva Trocando figurinhas: rake notes:fixme rake notes:optimize rake notes:todo rake notes:custom ANNOTATION=HELP
    26. Propriedade coletiva rake db:migrate create_table :speaker do | t | t .string :name t .string :address t .timestamps end
    27. Integração contínua Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Martin Fowler martinfowler.com/articles/continuousIntegration.html
    28. Integração contínua
      • Git + GitHub
        • Virou padrão na comunidade Rails
        • Controle distribuído (commit rápido)‏
        • git init
        • git add file.txt
        • git commit -a -m 'comment'
        • git push
        • git pull
        • Propriedade social de código
        • vimeo.com/1780571
        • Fork and go
    29. Integração contínua Integrity integrityapp.com Cerberus cerberus.rubyforge.org CruiseControl.rb cruisecontrolrb.thoughtworks.com Continuous Builder dev.rubyonrails.org/svn/rails/plugins/continuous_builder Integration integration.rubyforge.org
    30. Integração contínua CriuseControl.rb e semelhantes No &quot;git push&quot; baixa os arquivos, executa os testes e notifica a equipe. Fork no GitHub para Git: github.com/benburkert/cruisecontrolrb jamesshore.com/Blog/Why I Dont Like CruiseControl.html
    31. Integração contínua Integration Baixa, atualiza, testa, gerar reports e se tudo estiver ok... comita. rake integrate task scm:status:check task log:clear task tmp:clear task backup:local task scm:update task db:migrate test:units test:functionals test:integration spec:lib spec:models spec:helpers spec:controllers spec:views test:rcov:units test:rcov:units:verify test:rcov:functionals test:rcov:functionals:verify spec:rcov spec:rcov:verify test:plugins:selected spec:plugins:selected test:selenium:server:start test_acceptance test:selenium:server:stop scm:commit
    32. More stuff Documentação rake doc:app Style Check (style-check.rb)‏ cs.umd.edu/~nspring/software/style-check-readme.html rubyinside.com/
    33. Conclusão &quot;... I'm increasingly positive about using Ruby for serious work where speed, responsiveness, and productivity are important.&quot; - Martin Fowler em 10/5/2006 martinfowler.com/bliki/EvaluatingRuby.html
    SlideShare Zeitgeist 2009

    + joaomilhojoaomilho Nominate

    custom

    770 views, 0 favs, 1 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 770
      • 701 on SlideShare
      • 69 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 2
    Most viewed embeds
    • 69 views on http://blog.softa.com.br

    more

    All embeds
    • 69 views on http://blog.softa.com.br

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories