Slide 1

Slide 1 text

VERSIONING MOBILE let your API and your APP evolve

Slide 2

Slide 2 text

SEMVER Given a version number MAJOR.MINOR.PATCH, increment the: MAJOR version when you make incompatible API changes, MINOR version when you add functionality in a backwards-compatible manner, and PATCH version when you make backwards-compatible bug fixes.

Slide 3

Slide 3 text

THE APP versioning is not only about code

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

IN APP COMMUNICATION ➤ let the user know what version he’s using, so he may communicate it to you ➤ show application version in the application itself (it may include build #)

Slide 6

Slide 6 text

KEEP VERSION NUMBER AUTOMATIC ➤ gulp-bump ➤ an after_prepare_hook (http://devgirl.org/2013/11/12/three-hooks- your-cordovaphonegap-project-needs/):
 var version = require(__dirname + ‘../../package.json’).version ➤ gulp-git ➤ add a git tag with -a (demo time)

Slide 7

Slide 7 text

HOW TO HANDLE VERSIONS ➤ call URL’s with /{version_number} ?
 HTTP GET:
 https://api.bamlab.fr/v2/hello ➤ add api-version header
 HTTP GET:
 https://api.bamlab.fr/hello
 api-version: 2 ➤ add Accept header
 HTTP GET:
 https://api.bamlab.fr/hello
 Accept: application/vnd.bamlab.v2+json

Slide 8

Slide 8 text

THE BACK it’s all about contract

Slide 9

Slide 9 text

INTEGRATE THE VERSIONING IN ROUTING ➤ http://restify.com/#versionned-routes ➤ http://www.slideshare.net/shakefon/hapidays-2014/9? src=clipshare ➤ http://www.slideshare.net/shakefon/hapidays-2014/18? src=clipshare ➤ https://github.com/felipeleusin/hapi-negotiator

Slide 10

Slide 10 text

NOTIFY OLD VERSIONS ➤ send a DEPRECATED header and expose a /version route ➤ send a 410 GONE response if you are removing a ressource 410 GONE AND IT WON’T BE COMING BACK

Slide 11

Slide 11 text

VERSION YOUR DATA MODEL ➤ think about metadata ➤ add meta_version_number ➤ add a transformer to transform the model before exposing it to either version