34
Trunk-Based Development Rafael Petry

Porque Odeio Branches

Embed Size (px)

DESCRIPTION

Slides da palestra no Café Ágil da ThoughtWorks e Tá Safo em Belém, 10/08/2012. Outros links interessantes: http://www.youtube.com/watch?v=xzstASOvqNc http://continuousdelivery.com/2011/05/make-large-scale-changes-incrementally-with-branch-by-abstraction/

Citation preview

Page 1: Porque Odeio Branches

Trunk-BasedDevelopmentRafael Petry

Page 2: Porque Odeio Branches

Rafael Petry

Porque OdeioBranches

Page 3: Porque Odeio Branches
Page 4: Porque Odeio Branches
Page 5: Porque Odeio Branches

FeatureBranching

Page 6: Porque Odeio Branches

http://martinfowler.com/bliki/FeatureBranch.html

Page 7: Porque Odeio Branches

http://martinfowler.com/bliki/FeatureBranch.html

Page 8: Porque Odeio Branches

merge HELL

Page 9: Porque Odeio Branches
Page 10: Porque Odeio Branches

Conflito Sintáticoclass Person def initialize(name) @name = name<<<<<<< HEAD @first_name = name.split.first======= logger.debug "Registrado usuário #{name}">>>>>>> test endend

Page 11: Porque Odeio Branches

Conflito Semântico

Page 12: Porque Odeio Branches

“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. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.”

Martin Fowler

Page 13: Porque Odeio Branches
Page 14: Porque Odeio Branches

“The bigger the apparent reason to branch, the more you shouldn’t branch.”

Jez Humble and David Farley

Page 15: Porque Odeio Branches

FeatureToggles

Page 16: Porque Odeio Branches

<% if feature?(:new_awesome_feature) %> <li><%= link_to “Clique!!!”, new_feature_url %></li><% end %>

Page 17: Porque Odeio Branches

if feature?(:new_awesome_feature) # faz algo fantástico!else # faz o que era feito antes...end

Page 18: Porque Odeio Branches

http://code.flickr.com/blog/2009/12/02/flipping-out/

Page 19: Porque Odeio Branches
Page 20: Porque Odeio Branches

Branch byAbstraction

Page 21: Porque Odeio Branches

“Feature Branching is a poor man's modular architecture, instead of building systems with the ability to easy swap in and out features at runtime/deploytime they couple themselves to the source control providing this mechanism through manual merging.”

Dan Bodart

Page 22: Porque Odeio Branches

SomeController

AnotherController

Event DB

Page 23: Porque Odeio Branches

SomeController

AnotherController

Event DB

SVC

Page 24: Porque Odeio Branches

SomeController

AnotherController

Event DB

SVC

Page 25: Porque Odeio Branches

SomeController

AnotherController

Event DB

SVC

Page 26: Porque Odeio Branches

SomeController

AnotherController

Event DB

SVCEventService

Page 27: Porque Odeio Branches

SomeController

AnotherController

Event DB

SVCEventService

Produção

Teste

Page 28: Porque Odeio Branches

SomeController

AnotherController

Event DB

SVCEventService

Page 29: Porque Odeio Branches

SomeController

AnotherController SVCEventService

http://www.slideshare.net/dtsato/refatorao-em-larga-escala

Page 30: Porque Odeio Branches

Exceções

Page 31: Porque Odeio Branches

Spikes

Page 32: Porque Odeio Branches

Free Software

Page 33: Porque Odeio Branches

http://github.com

Page 34: Porque Odeio Branches

Obrigado!Rafael [email protected]@rafaelpetry