Agile JavaScript Frameworks, Tools, Services Ben Ripkens IT - - PowerPoint PPT Presentation

agile javascript
SMART_READER_LITE
LIVE PREVIEW

Agile JavaScript Frameworks, Tools, Services Ben Ripkens IT - - PowerPoint PPT Presentation

Agile JavaScript Frameworks, Tools, Services Ben Ripkens IT Consultant codecentric AG Michael Lex IT Consultant codecentric AG Agile Software Development Kanban Scrum Agile Manifesto Respond to change Customer collaboration


slide-1
SLIDE 1
slide-2
SLIDE 2

Agile JavaScript

Frameworks, Tools, Services

Ben Ripkens – IT Consultant codecentric AG Michael Lex – IT Consultant codecentric AG

slide-3
SLIDE 3

Agile Software Development

Agile Manifesto Respond to change Deliver frequently Ensure quality Customer collaboration Working software Scrum Kanban

slide-4
SLIDE 4

Agile Practices

TDD BDD Continuous Integration Continuous Delivery Static Code Analysis DDD Code Reviews

slide-5
SLIDE 5

Frameworks, Tools and Services

Jenkins Travis-CI Cucumber karma GitHub Mercurial JBehave Robot Grunt Puppet mocha Jira Maven

slide-6
SLIDE 6

Everything together

Agile Manifesto Respond to change Deliver frequently Ensure quality Customer collaboration Working software Scrum Kanban TDD BDD Continuous Integration Continuous Delivery Static Code Analysis DDD Code Reviews Jenkins Travis-CI Cucumber karma GitHub Mercurial JBehave Robot Grunt Puppet mocha Jira Maven

slide-7
SLIDE 7

More structure please ...

slide-8
SLIDE 8

DEPLOY COLLABORATE INTEGRATE BUILD DEVELOP

Testing Application grunt mocha chai Sinon.JS ng-scenario Tools karma jshint less

slide-9
SLIDE 9

One step at a time...

slide-10
SLIDE 10

DEVELOP

Application

AngularJS „Superheroic JavaScript MVW framework“ Node.JS Server-Side JavaScript implementation with strictly asynchronous I/O Express.JS HTTP-Server framework Neo4J „The world's leading graph database“ AngularJS „Superheroic JavaScript MVW framework“ Node.JS Server-Side JavaScript implementation with strictly asynchronous I/O Express.JS HTTP-Server framework Neo4J „The world's leading graph database“

slide-11
SLIDE 11

Now... … we can start developing the application. But... … what about collaboration in the team?

  • Work on the same code simultanuously?
  • Keep track of open bugs?
  • Discuss and review code?
slide-12
SLIDE 12

COLLABORATE DEVELOP

Application

GitHub is more than just a VCS

  • Bugtracker
  • Code Review Tool
  • Wiki
  • Documentation

GitHub is more than just a VCS

  • Bugtracker
  • Code Review Tool
  • Wiki
  • Documentation
slide-13
SLIDE 13

Now... … we can work together on our project. But... … how can we ensure everybody uses the same versions of the necessary frameworks?

slide-14
SLIDE 14

COLLABORATE DEVELOP

Application

Node Package Manager

  • Dependency management for JavaScript projects
  • Is part of NodeJS
  • Available Packages on npmjs.org

Node Package Manager

  • Dependency management for JavaScript projects
  • Is part of NodeJS
  • Available Packages on npmjs.org

BUILD

slide-15
SLIDE 15

Now... … we can deal with dependencies (even transitive

  • nes).

But... … what about testing?

  • Unit-Tests?
  • Integration-Tests?
  • End-to-End Tests?
slide-16
SLIDE 16

COLLABORATE DEVELOP

Application

BUILD AngularJS Scenario Runner for end-to-end-tests Mocha for unit-tests (client- and server-side) Utility-libraries:

  • Sinon.JS for stubbing/mocking
  • Chai for readable assertions

AngularJS Scenario Runner for end-to-end-tests Mocha for unit-tests (client- and server-side) Utility-libraries:

  • Sinon.JS for stubbing/mocking
  • Chai for readable assertions

Testing mocha chai Sinon.JS ng-scenario

slide-17
SLIDE 17

Now... … we have tests to ensure high functional quality and prevent regression. But... … how can we automate test execution?

  • Run client-side tests from command-line

(without having to refresh the browser)?

  • Automatically run tests whenever code

changes?

  • Get instant feedback when a test fails?
slide-18
SLIDE 18

COLLABORATE DEVELOP

Testing Application mocha chai Sinon.JS ng-scenario

BUILD

Tools karma

Karma

  • Test-Runner
  • Execute in-browser-tests in background
  • Supports various browsers

(Chrome, Firefox, PhantomJS)

  • Execute test continuously in background

Karma

  • Test-Runner
  • Execute in-browser-tests in background
  • Supports various browsers

(Chrome, Firefox, PhantomJS)

  • Execute test continuously in background
slide-19
SLIDE 19

Now... … test execution is easy. But... … are there other tools to support developers?

  • Static code analysis?
  • Enforce code style?
  • Compile JS/CSS?
slide-20
SLIDE 20

COLLABORATE DEVELOP

Testing Application mocha chai Sinon.JS ng-scenario Tools karma

BUILD JSHint

  • Static code analysis
  • Detect (syntax) errors
  • Detect potential problems (bugs)
  • Enforce code style

LESS

  • Dynamic stylesheet language
  • Extends CSS

JSHint

  • Static code analysis
  • Detect (syntax) errors
  • Detect potential problems (bugs)
  • Enforce code style

LESS

  • Dynamic stylesheet language
  • Extends CSS

jshint less

slide-21
SLIDE 21

Now... … we have plenty of tools. But... … all these tools have their own command line interface and configuration options. We want one tool to rule them all!

slide-22
SLIDE 22

COLLABORATE BUILD DEVELOP

Testing Application mocha chai Sinon.JS ng-scenario Tools karma jshint less

Grunt

  • JavaScript Task Runner
  • Task configuration in Gruntfile.js
  • Task execution with grunt-cli
  • Great number of plugins
  • Very customizable

Grunt

  • JavaScript Task Runner
  • Task configuration in Gruntfile.js
  • Task execution with grunt-cli
  • Great number of plugins
  • Very customizable

grunt

slide-23
SLIDE 23

Now... … the build chain is complete. But... … the build is only executed locally.

  • Trigger build on each commit?
  • Warn developers when build fails?
  • Avoid works-on-my-machine problem?
slide-24
SLIDE 24

COLLABORATE BUILD DEVELOP

Testing Application mocha chai Sinon.JS ng-scenario Tools karma jshint less grunt

Travis-CI

  • Continuous Integration Service
  • Seamless integration in GitHub projects
  • Easy configuration

Travis-CI

  • Continuous Integration Service
  • Seamless integration in GitHub projects
  • Easy configuration

INTEGRATE

slide-25
SLIDE 25

Is something still missing? Yes, … … we want to go live!

  • Automated deployment after successfull build?
  • Deployment to different environments

(production, staging, etc)?

slide-26
SLIDE 26

COLLABORATE INTEGRATE BUILD DEVELOP

Testing Application grunt mocha chai Sinon.JS ng-scenario Tools karma jshint less

DEPLOY Heroku

  • Platform as a Service
  • Easy deployment via git-push
  • Continuous Delivery from Travis-CI

Heroku

  • Platform as a Service
  • Easy deployment via git-push
  • Continuous Delivery from Travis-CI
slide-27
SLIDE 27

DEPLOY COLLABORATE INTEGRATE BUILD DEVELOP

Testing Application grunt mocha chai Sinon.JS ng-scenario Tools karma jshint less

The final picture

slide-28
SLIDE 28

DEPLOY COLLABORATE INTEGRATE BUILD DEVELOP

Testing Application grunt mocha chai Sinon.JS ng-scenario Tools karma jshint less

  • Twitter Bootstrap
  • D3.js
  • ...
  • cucumber
  • nodejs-webdriver
  • ...
  • watchservice
  • test-coverage
  • ...
  • artifact archive
  • reporting
  • ...
  • rollback
  • schema-migration
  • ...

Anything else?

slide-29
SLIDE 29

DEPLOY COLLABORATE INTEGRATE BUILD DEVELOP

Testing Application JUnit Spring Test JBehave Tools Sonar CheckStyle JProfiler

(Java) Alternative