YOU ARE DOWNLOADING DOCUMENT

Please tick the box to continue:

Transcript
Page 1: Deciphering development technologies

DECIPHERING DEVELOPMENT TECHNOLOGIESWEBVISIONS PORTLAND

8 MAY 2014

Phillip Kerman

@phillip

Page 2: Deciphering development technologies

EXPECTATIONSclient sidemore breadth, less depthtest

Page 3: Deciphering development technologies
Page 4: Deciphering development technologies

OUTLINEVersion ControlPackage ManagersJS/CSS FrameworksAutomationTest Driven Development

Terms, perspective, tips for learning

Page 5: Deciphering development technologies

ROI LEARNINGAssessing what's "essential"Consider how it applies to your project. (Be goal oriented.)Learning on the fly.Better to do less and understand it vs. doing more withmystery.Advocacy

Page 6: Deciphering development technologies

ESSENTIALSVersion ControlPackage Manager

Page 7: Deciphering development technologies

VERSION CONTROLgit (is not github)~90% is just:

git statusgit addgit commitgit push

~10% is:git checkout -b (branch)git merge

Page 8: Deciphering development technologies

VERSION CONTROL (DEMO)http://www.youtube.com/watch?v=SRn2UwWK7F0

0:00 / 6:41

git demo

Page 9: Deciphering development technologies

Learn Git Branching

VERSION CONTROL

Page 10: Deciphering development technologies

PACKAGE MANAGERSInstall node.js ( ), and you'll have npmInstall bowerDiscover and getManage and distribute

http://nodejs.org/

Page 11: Deciphering development technologies

PACKAGE MANAGERSInstall packages (usually from the web)

npm/bower install [package]npm/bower update [package]-g global flag

--saveflag adds dependency

Page 12: Deciphering development technologies

PACKAGE MANAGERSGet dependencies for a project via its package.json or bower.json

file

npm/bower install

Page 13: Deciphering development technologies

PACKAGE MANAGERS (DEMO)http://www.youtube.com/watch?v=TztY4deEMz8

0:00 / 7:03

using npm to manage dependencies

Page 14: Deciphering development technologies

JS LIBRARIES AND FRAMEWORKSLibrary is a collection of utilities/functionsLibraries should work alongside other libraries (and withinframeworks)Frameworks always have some opinion how you should buildupon them.

Page 15: Deciphering development technologies

JS LIBRARIESjQueryunderscore (lodash)three.js, D3.js, and many more

Page 16: Deciphering development technologies

JS FRAMEWORKSAngularJS, Backbone, Emberbindingtemplating/renderingdependencycomponentsrouting

Page 17: Deciphering development technologies

JS FRAMEWORKSLearning

AngularJS tutorials: React.js library:

egghead.iotinyurl.com/fbreact

Page 18: Deciphering development technologies

COMPILINGCoffeeScriptTypeScriptasm.js

The Birth & Death of JavaScripttinyurl.com/banddjs

Page 19: Deciphering development technologies

CSS FRAMEWORKSBootstrap, Foundation, many othersLayout/styleComponentsTransitionsCustomization

Page 20: Deciphering development technologies

CSS PREPROCESSORSLESS and SASS are the languageCountless frameworks and mixins to automateCSS gets rendered

Page 21: Deciphering development technologies

AUTOMATIONGruntGulpGrunt vs. Gulp: Plugins include:

minifying (uglify)concatentationlintingtests

Watch

tinyurl.com/gruntvgulp

Page 22: Deciphering development technologies

AUTOMATIONBasic GruntFile.js

module.exports = function(grunt){ grunt.initConfig({ pkg: grunt.file.readJSON('package.json'),

//set up uglify uglify: { build: { src: 'main.js', dest: '_dist/main.min.js' } }, more: { demo: "na"} });

//into package.json via: npm install grunt-contrib-uglify --save-dev grunt.loadNpmTasks('grunt-contrib-uglify');

//register what to do when using the default 'grunt' command grunt.registerTask('default', ['uglify', 'more']);}

Page 23: Deciphering development technologies

AUTOMATIONBasic gulpfile.js

//npm install gulp --save-devvar gulp = require('gulp');//npm install gulp-uglify --save-devvar uglify = require('gulp-uglify');

gulp.task('default', function() { gulp.src('./main.js') .pipe(uglify()) .pipe(gulp.dest('./_dist/main.min.js'));});//keeps runninggulp.watch('./main.js',['default']);

Page 24: Deciphering development technologies

AUTOMATION (DEMO)http://www.youtube.com/watch?v=9EL_mZjg4xk

0:00 / 7:15

demo using gulp for automation

Page 25: Deciphering development technologies

TDDProcess

write failing testsimplement the minimum code to pass testrepeat

Page 26: Deciphering development technologies

TDDBasic syntax

//spec:describe('myAddFunction', function(){ it('should know one and one is two', function(){ expect(myAddFunction(1,1)).toEqual(2); });});

//code to testfunction myAddFunction(a,b){ return null;}

Page 27: Deciphering development technologies

TDD (DEMO)http://www.youtube.com/watch?v=YyjlaSRFy00

0:00 / 9:37

tdd demo

Page 28: Deciphering development technologies

TDDMore

describe('myAddFunction', function(){ beforeEach(function() { //set some globals });

it('should know one and one is two', function(){ expect(myAddFunction(1,1)).toEqual(2); });});

Also, mocks for integration testing and CI

Page 29: Deciphering development technologies

(SOME) THINGS I LEFT OUTIn browser dev toolsBrowserify (like Require.js)Server side tooling

Page 30: Deciphering development technologies

PLEASE DON'TJust use Yeoman

Page 31: Deciphering development technologies

THE ENDPhillip Kerman | @phillip

phillipkerman.com/wv2014


Related Documents