VERY VERY DRAFT

unevenechoSoftware and s/w Development

Oct 30, 2013 (3 years and 10 months ago)

52 views

UKLUG 2012

Cardiff, Wales
September 2012
Sean Cull
Andrew Champion
David Harding
Using Source Control to make XPages development easier
VERY VERY DRAFT
ICON UK 2013
Source Control Case Study
UKLUG 2012

Cardiff, Wales
Agenda

About FoCul

What is Source Control ?

Why did we want to use source control ?

How did we choose a scheme ?

What scheme did we choose ?

Demo 1

Gitflow

Demo 2

Final Thoughts

Questions
UKLUG 2012

Cardiff, Wales
About FoCul

Notes and
XPages
development house

Core
team of 4 +
others

6
,000
hours a year developing code ( 80%
XPages
)

Started in 2000
UKLUG 2012

Cardiff, Wales
What is Source Control ?

Ability to capture snapshots of your
application as it is developed.

Ability to merge code from those snapshots.

Ability to track changes to individual
elements across snapshots.
UKLUG 2012

Cardiff, Wales
Source Control in
DDE ( since 2010 )
NSF / NTF
Domino Designer
On Disk Project
ODP
Source Control
Database
UKLUG 2012

Cardiff, Wales
Why did we want Source Control ?

Developing in
XPages
requires a more
structured approach to release control than
classic Notes.

Moving towards a more modular approach
to applications.

More multi
-
developer working.

I am getting Older

1/2
UKLUG 2012

Cardiff, Wales
Why did we want Source Control ?

Aspirational

More efficient Code Review

Better Linkage with JIRA Work
management

Better Data Mining of code
2/2
UKLUG 2012

Cardiff, Wales
Source Control Scheme Requirements

Intuitive

A good GUI

Good visualisation

Distributed with branching capability

Strong community support

Native windows application

Affordable

Robust

Command line capable
UKLUG 2012

Cardiff, Wales
Source Control Scheme Choices

SVN

supported by IBM

Mercurial

very good community resources

GIT

very good community
resources
Natahan
Freeman’s
eGit

3
rd
Party systems such as
Teamstudio
UKLUG 2012

Cardiff, Wales
Our Scheme

DDE to create On Disk Projects ( ODP )

GIT Source Control 100% outwith of DDE

Atlassian
SourceTree
GUI

Perforce “P4 Merge” for
conflict
r
esolution

Atlassian
Bitbucket
hosted
repositories

Store other information in GIT
UKLUG 2012

Cardiff, Wales
DEMOS
NSF / NTF
Domino Designer
On Disk Project
Local Git
Repository
Remote Git
Repositories
P4
Bitbucket
UKLUG 2012

Cardiff, Wales
Demos

Demo 1

Simple change to the main branch

Demo 2

Gitflow
branching and merging
1/3
UKLUG 2012

Cardiff, Wales
Demo 1
http://nvie.com/posts/a
-
successful
-
git
-
branching
-
model/
UKLUG 2012

Cardiff, Wales
Demo 2
Git
Flow
http://nvie.com/posts/a
-
successful
-
git
-
branching
-
model/
UKLUG 2012

Cardiff, Wales
DEMO 2

Branching & Merging
Feature 1

DH XXXXX
Feature 2

AC XXXXX
Develop Branch
UKLUG 2012

Cardiff, Wales
Source Control Concepts
1/3

GIT Repository

Local

Remote

Index

Staging

Committing

Pushing

Fetching
1/3
UKLUG 2012

Cardiff, Wales
Source Control Concepts
2/3

Branching

Local Branch

Remote Tracking Branch

Merging

Conflict Resolution

Pulling

Stashing
2/3
UKLUG 2012

Cardiff, Wales
Source Control Concepts
3/3
Stuff we still need to learn about

Reverting

Resetting

Cleaning

Discarding

Fast Forwarding

Rebasing**
3/3
UKLUG 2012

Cardiff, Wales
Final Thoughts

Need Source Control Champion

We had to invest 3 weeks of effort in
getting off the
ground and it continues

Need a pilot group

Need a disciplined approach

Need a “Merge Master” per
project

Only commit
REAL CHANGES

Gitflow
was a turning point for us

Run a parallel backup process for at least a
while ( File>Application>New Copy )
1/2
UKLUG 2012

Cardiff, Wales
Thank you to
ICON UK
and the
Sponsors
3/3
UKLUG 2012

Cardiff, Wales
September 2012
Sean Cull
Andrew Champion
David Harding
Using Source Control to make
XPages
development easier
ICON UK 2013
Source Control Case Study
Questions &
Comments
UKLUG 2012

Cardiff, Wales
September 2012
Sean Cull
Andrew Champion
David Harding
Using Source Control to make XPages development easier
ICON UK 2013
Source Control Case Study
Source Control Wiki
http
://www.focul.net/sc
UKLUG 2012

Cardiff, Wales
Further Hints 1

Consider turning off Binary DXL

Consider turning off automatic export/import

Gitflow
really helps

Choose branch names carefully

Need to only commit
Real Changes

Java Agents need to be edited and saved

Use
“ODP”
filenames

Deny non
-
fast
-
forwards

Deny branch deletions
3/3
UKLUG 2012

Cardiff, Wales
Further Hints 2

Learn to cherry pick

"refresh entire application when design
changes“

"refresh entire application when design
changes“ helps
3/3