Upload
hendrik-ebbers
View
1.041
Download
2
Tags:
Embed Size (px)
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.
Citation preview
@hendrikEbberswww.guigarage.com
Feature Driven Development
@hendrikEbberswww.guigarage.com
default branchAbout me
Hendrik Ebbers @hendrikEbbers
www.guigarage.com
JUG DortmundMastering JavaFX 8 Controls
DataFX, AquaFX, Vagrant-Binding
@hendrikEbberswww.guigarage.com
default branchContent
features workflows feature toggles
@hendrikEbberswww.guigarage.com
default branchWhat is a feature?
„play“ button feature
@hendrikEbberswww.guigarage.com
default branchWhat is a feature?
„play“ button feature
@hendrikEbberswww.guigarage.com
private single developer project
Ribbon interface removed
„play“ button added
multi touch support Hibernate version
changed
@hendrikEbberswww.guigarage.com
structure of a complex application
Backend
Frontend / UI
Persistence
@hendrikEbberswww.guigarage.com
Let’s start with the UI
trunk
button on UI
@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!“); } !}
@hendrikEbberswww.guigarage.com
Commit history
button on UI
JPA classes
new media service
bugfix #235
trunk
@hendrikEbberswww.guigarage.com
Houston, we have a problem
button on UI
JPA classes
new media service
bugfix #235
Application can’t be released!
trunk
@hendrikEbberswww.guigarage.com
Concurrent development = Concurrent problems
Jim
Bob
Martin
John
bugfix 7
new middleware
rest services
security issues
@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
@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!
@hendrikEbberswww.guigarage.com
Using a feature branch
button on UI
JPA classes
new media service
mergebranch
develop
feature branch
@hendrikEbberswww.guigarage.com
Release cycle?
Application can be released!
@hendrikEbberswww.guigarage.com
Concurrent development?
Application can be released!
feature 1
feature 2
@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
@hendrikEbberswww.guigarage.com
Application can be released!
hidden button and middleware
backendvisible button
easy merge
easy merge
easy merge
Solution: Dark launching & small branches
@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
@hendrikEbberswww.guigarage.com
Problem: changes creates bugs
Application can be released!
bugs?
Point of no return
@hendrikEbberswww.guigarage.com
Solution: Feature Toggles
!
if(MY_FEATURE.isActive( )) {
showPlayButton( );
} activate feature
the featurecheck
@hendrikEbberswww.guigarage.com
Fallback to old implementations
!
if(NEW_PERSISTENCE.isActive( )) {
return jpaCall( );
} else {
return jdbcCall( );
}old new
@hendrikEbberswww.guigarage.com
Java APIs
JSF Support
Spring Support Java EE
SupportAdmin Console
Activation Strategies
State Repositories
User Authentification
Java SE Support
@hendrikEbberswww.guigarage.com
Java APIs
JavaFX Support
Observer pattern
Binding Supports
predefined annotations
@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
@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
@hendrikEbberswww.guigarage.com
Administration view
< >
!http://www.my-app/administration/togglz
@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
@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)
@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&
@YourTwitterHandle#DVXFR14{session hashtag} @hendrikEbberswww.guigarage.com
Q&A