Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ngParis #12 - Devops Metrix

ngParis #12 - Devops Metrix

Presentation of Devops Metrix, a smart visualization of a projects' wallet's agility with AngularJS and D3.

David Nowinsky

June 23, 2014
Tweet

More Decks by David Nowinsky

Other Decks in Technology

Transcript

  1. Initialization svg = d3.select $element[0] .select 'svg' node = svg.selectAll

    '.node' .data projectsData .enter() .append 'g' circlesContainer = node.append 'g'
  2. Only a few tests Large test coverage Project Project circle.style

    'fill', (d) -> 'url(#gradient-' + bubbleId(d) + ')'
  3. Not agile :-( Really agile :-) 10 Project 2 Project

    circlesContainer .append 'text' .text bubbleScore
  4. Angular / D3.js integration svg = d3.select $element[0] .select 'svg'

    node = svg.selectAll '.node' .data projectsData .enter() .append 'g' circlesContainer = node.append 'g'
  5. Angular / D3.js integration svg = d3.select $element[0] .select 'svg'

    node = svg.selectAll '.node' .data $scope.projects .enter() .append 'g' circlesContainer = node.append 'g'
  6. Using APIs .factory ‘DataProvider’, ($q, $http) -> getContributors = (url)

    -> deferred = $q.defer() $http { method: 'GET', url: url } .success (data) -> deferred.resolve data.length .error -> deferred.resolve 0 deferred.promise getContributors ‘URL_TO_API’ .then contributors -> project.contributors = contributors
  7. Gulpfile structure # Set up gulp = require 'gulp' #

    Plugins coffee = require 'gulp-coffee' # and so on # Parameters parameters = require '../config/parameters.coffee' # Tasks gulp.task 'build', ['copy', 'compile'] # Definition of task’s dependencies gulp.task 'copy', ['assets', 'vendors'] # A dependency’s dependencies gulp.task 'assets', [], -> … # Down to each elementary task gulp.task 'compile', ['copy', 'coffee', 'jade', 'less']
  8. Gulpfile tasks gulp.task 'coffee', [], -> gulp.src parameters.app_path + '/**/*.coffee'

    .pipe coffee bare: true .pipe concat parameters.app_main_file .pipe gulp.dest parameters.web_path + '/js' .pipe filesize() .on 'error', gutil.log