feature driven development

32
@ hendrikEbbers www.guigarage.com Feature Driven Development

Upload: hendrik-ebbers

Post on 26-Jun-2015

1.040 views

Category:

Technology


2 download

DESCRIPTION

This talk shows Best Practices that can be used to develop application in an agile and feature driven workflow. Companies like flickr use this development process internally and even Martin Fowler defined a part of the process as “FeatureToggle”. In the talk I will start with the definition of feature tasks and what steps and methods are needed to define them. Next to this an application is shown that was developed by the use of FeatureToggles. Here different architecture approaches in Java will be shown. Next to the architecture of an application the development workflows must be changed to create applications in a feature driven way, too. In some examples best practices to handle the new workflows will be shown. Methods and tools like the GitFlow, GitLab, the Java Togglz API and Jira will be shown in this talk.

TRANSCRIPT

Page 1: Feature driven development

@hendrikEbberswww.guigarage.com

Feature Driven Development

Page 2: Feature driven development

@hendrikEbberswww.guigarage.com

default branchAbout me

Hendrik Ebbers @hendrikEbbers

www.guigarage.com

JUG DortmundMastering JavaFX 8 Controls

DataFX, AquaFX, Vagrant-Binding

Page 3: Feature driven development

@hendrikEbberswww.guigarage.com

default branchContent

features workflows feature toggles

Page 4: Feature driven development

@hendrikEbberswww.guigarage.com

default branchWhat is a feature?

„play“ button feature

Page 5: Feature driven development

@hendrikEbberswww.guigarage.com

default branchWhat is a feature?

„play“ button feature

Page 6: Feature driven development

@hendrikEbberswww.guigarage.com

private single developer project

Ribbon interface removed

„play“ button added

multi touch support Hibernate version

changed

Page 7: Feature driven development

@hendrikEbberswww.guigarage.com

structure of a complex application

Backend

Frontend / UI

Persistence

Page 8: Feature driven development

@hendrikEbberswww.guigarage.com

Let’s start with the UI

trunk

button on UI

Page 9: Feature driven development

@hendrikEbberswww.guigarage.com

Diff of the first commit

<form > <input type="button" value=„play“ onclick=„rpc.play()“> </form>

class PlayService { ! public void play() { throw new RuntimeException(„Not implemented!“); } !}

Page 10: Feature driven development

@hendrikEbberswww.guigarage.com

Commit history

button on UI

JPA classes

new media service

bugfix #235

trunk

Page 11: Feature driven development

@hendrikEbberswww.guigarage.com

Houston, we have a problem

button on UI

JPA classes

new media service

bugfix #235

Application can’t be released!

trunk

Page 12: Feature driven development

@hendrikEbberswww.guigarage.com

Concurrent development = Concurrent problems

Jim

Bob

Martin

John

bugfix 7

new middleware

rest services

security issues

Page 13: Feature driven development

@hendrikEbberswww.guigarage.com

Concurrent development = Concurrent problems

button on UI

JPA classes

new media service

bugfix #235

trunk

Ribbon interface removed (50%)

Ribbon interface removed (100%)

testcommit

refactored most entities

Page 14: Feature driven development

@hendrikEbberswww.guigarage.com

Concurrent development = Concurrent problems

button on UI

JPA classes

new media service

bugfix #235

trunk

Ribbon interface removed (50%)

Ribbon interface removed (100%)

testcommit

refactored most entities

Application can NEVER be released!

Page 15: Feature driven development

@hendrikEbberswww.guigarage.com

Using a feature branch

button on UI

JPA classes

new media service

mergebranch

develop

feature branch

Page 16: Feature driven development

@hendrikEbberswww.guigarage.com

Release cycle?

Application can be released!

Page 17: Feature driven development

@hendrikEbberswww.guigarage.com

Concurrent development?

Application can be released!

feature 1

feature 2

Page 18: Feature driven development

@hendrikEbberswww.guigarage.com

Problem: merge hell

Application can be released!

merge hell

f# 1 f# 4 f# 2 f# 3 f# 5

t = 2 month

Page 19: Feature driven development

@hendrikEbberswww.guigarage.com

Application can be released!

hidden button and middleware

backendvisible button

easy merge

easy merge

easy merge

Solution: Dark launching & small branches

Page 20: Feature driven development

@hendrikEbberswww.guigarage.com

Solution: update the feature branch

Application can be released!

merge merge merge

adding button

localization of button title

final button icon

!easy merge / pull request

Page 21: Feature driven development

@hendrikEbberswww.guigarage.com

Problem: changes creates bugs

Application can be released!

bugs?

Point of no return

Page 22: Feature driven development

@hendrikEbberswww.guigarage.com

Solution: Feature Toggles

!

if(MY_FEATURE.isActive( )) {

showPlayButton( );

} activate feature

the featurecheck

Page 23: Feature driven development

@hendrikEbberswww.guigarage.com

Fallback to old implementations

!

if(NEW_PERSISTENCE.isActive( )) {

return jpaCall( );

} else {

return jdbcCall( );

}old new

Page 24: Feature driven development

@hendrikEbberswww.guigarage.com

Java APIs

JSF Support

Spring Support Java EE

SupportAdmin Console

Activation Strategies

State Repositories

User Authentification

Java SE Support

Page 25: Feature driven development

@hendrikEbberswww.guigarage.com

Java APIs

JavaFX Support

Observer pattern

Binding Supports

predefined annotations

Page 26: Feature driven development

@hendrikEbberswww.guigarage.com

Define Features as enum

!

@Issue(„JFX-638“)

@EnabledByDefault

NEW_PERSISTENCE,

!

@Issue(„JFX-492“)

@EnabledByDefault

TWITTER_SUPPORT,

. . .

add metadata to describe the

feature

Page 27: Feature driven development

@hendrikEbberswww.guigarage.com

Features state and activation

!

MY_FEATURE.isActive( )

always

always on dev system

next 3 hours

for random users

stored in db

defined in property file

Page 28: Feature driven development

@hendrikEbberswww.guigarage.com

Administration view

< >

!http://www.my-app/administration/togglz

Page 29: Feature driven development

@hendrikEbberswww.guigarage.com

Fronted support

!

<h:panelGroup rendered="#{features['PLAY_FEATURE']}">

<h:commandButton value=„play" />

</h:panelGroup>

@FXML

@HideByFeature("PLAY_FEATURE")

private Button playButton;

JavaFX

JSF

Page 30: Feature driven development

@hendrikEbberswww.guigarage.com

Take care of your features

FEATURE_1,

FEATURE_2,

FEATURE_3,

FEATURE_4,

FEATURE_5,

. . .

FEATURE_1462,

FEATURE_11463,

Where is my

feature???

Don’t forget

to clean up!(once a feature is

live for a defined

period of time)

Page 31: Feature driven development

@hendrikEbberswww.guigarage.com

Conclusion

button & feature toggle

backendremove

feature toggle

use feature toggles

clean upuse short living

branches

describe your

features with

metadata&

provide

feature

administration&

Page 32: Feature driven development

@YourTwitterHandle#DVXFR14{session hashtag} @hendrikEbberswww.guigarage.com

Q&A