Slide 1

Slide 1 text

Browserify All The Things

Slide 2

Slide 2 text

Hello! I’m Nico nzgb

Slide 3

Slide 3 text

Hello! I’m Nico nzgb bevacqua

Slide 4

Slide 4 text

Hello! I’m Nico nzgb bevacqua ponyfoo.com

Slide 5

Slide 5 text

bevacqua.io/bf Quality

Slide 6

Slide 6 text

bevacqua.io/bf Quality Processes

Slide 7

Slide 7 text

bevacqua.io/bf Quality Processes Modularity

Slide 8

Slide 8 text

bevacqua.io/bf Quality Processes Modularity 100~ samples!

Slide 9

Slide 9 text

Modules! are good for you

Slide 10

Slide 10 text

Getting Closure ~function(){}()

Slide 11

Slide 11 text

~function () { var foo = 1; alert(foo); }();

Slide 12

Slide 12 text

Modularity? To some extent.

Slide 13

Slide 13 text

~function (window) { function sum (a, b) { return a + b; } window.math = {sum: sum}; }(this);

Slide 14

Slide 14 text

~function (math) { alert(math.sum(2, 5)); }(math); !

Slide 15

Slide 15 text

Dependencies? Hand-crafted dependency graph!

Slide 16

Slide 16 text

Slide 17

Slide 17 text

(){}() It’s making a face!

Slide 18

Slide 18 text

Closures - Abuse global variables

Slide 19

Slide 19 text

Closures - Abuse global variables - Fine for tiny projects

Slide 20

Slide 20 text

Closures - Abuse global variables - Fine for tiny projects - Modularity is up to you

Slide 21

Slide 21 text

Closures - Abuse global variables - Fine for tiny projects - Modularity is up to you - Manual dependency management

Slide 22

Slide 22 text

AMD Modules

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Dependencies? Yay!

Slide 25

Slide 25 text

define([], function () { function sum (a, b) { return a + b; } return { sum: sum }; }); math.js

Slide 26

Slide 26 text

require(['math'], function (math) { alert(math.sum(2, 5)); }); ! ! main.js

Slide 27

Slide 27 text

Modularity… But at what cost?

Slide 28

Slide 28 text

AMD Modules - Resolves dependency graph

Slide 29

Slide 29 text

AMD Modules - Resolves dependency graph - Lacks a straightforward API

Slide 30

Slide 30 text

AMD Modules - Resolves dependency graph - Lacks a straightforward API - Drastic changes after you build

Slide 31

Slide 31 text

AMD Modules - Resolves dependency graph - Lacks a straightforward API - Drastic changes after you build - So. Much. Clutter.

Slide 32

Slide 32 text

ES6 Modules Great! (on paper)

Slide 33

Slide 33 text

function sum (a, b) { return a + b; } ! export default {sum: sum}; math.js

Slide 34

Slide 34 text

import math from 'math'; ! alert(math.sum(2,5)); main.js

Slide 35

Slide 35 text

ES6 Modules - The Way Forward ™

Slide 36

Slide 36 text

ES6 Modules - The Way Forward ™ - To use today, add a transpilation step

Slide 37

Slide 37 text

ES6 Modules - The Way Forward ™ - To use today, add a transpilation step - Hard to interact with CJS modules

Slide 38

Slide 38 text

ES6 Modules - The Way Forward ™ - To use today, add a transpilation step - Hard to interact with CJS modules - Not generally available / popular yet

Slide 39

Slide 39 text

Stay positive!

Slide 40

Slide 40 text

CommonJS Modules

Slide 41

Slide 41 text

CommonJS Modules

Slide 42

Slide 42 text

CommonJS Modules

Slide 43

Slide 43 text

CommonJS Modules

Slide 44

Slide 44 text

function sum (a, b) { return a + b; } module.exports = {sum:sum}; math.js

Slide 45

Slide 45 text

var math = require('./math'); ! alert(math.sum(2,5)); ! main.js

Slide 46

Slide 46 text

CommonJS Modules API similar to ES6

Slide 47

Slide 47 text

CommonJS Modules API similar to ES6 Takes advantage of npm

Slide 48

Slide 48 text

CommonJS Modules API similar to ES6 Takes advantage of npm Browserify for the client

Slide 49

Slide 49 text

npm install -g browserify

Slide 50

Slide 50 text

browserify main.js

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

browserify main.js -o all.js

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

Quality great for everyone!

Slide 55

Slide 55 text

insert-rule Everything begins with a simple idea

Slide 56

Slide 56 text

Consistent Results Flexible API

Slide 57

Slide 57 text

insertRule(selector, styles) styles: String, Object Adds a CSS rule

Slide 58

Slide 58 text

var camel = /([a-z])([A-Z])/g; var hyphens = '$1-$2'; function parseStyles (styles) { if (typeof styles === 'string') { return styles; } return Object.keys(styles).map(function (key) { var prop = key.replace(camel, hyphens).toLowerCase(); return prop + ':' + styles[key]; }).join(';'); }

Slide 59

Slide 59 text

var camel = /([a-z])([A-Z])/g; var hyphens = '$1-$2'; function parseStyles (styles) { if (typeof styles === 'string') { return styles; } return Object.keys(styles).map(function (key) { var prop = key.replace(camel, hyphens).toLowerCase(); return prop + ':' + styles[key]; }).join(';'); }

Slide 60

Slide 60 text

var camel = /([a-z])([A-Z])/g; var hyphens = '$1-$2'; function parseStyles (styles) { if (typeof styles === 'string') { return styles; } return Object.keys(styles).map(function (key) { var prop = key.replace(camel, hyphens).toLowerCase(); return prop + ':' + styles[key]; }).join(';'); }

Slide 61

Slide 61 text

var camel = /([a-z])([A-Z])/g; var hyphens = '$1-$2'; function parseStyles (styles) { if (typeof styles === 'string') { return styles; } return Object.keys(styles).map(function (key) { var prop = key.replace(camel, hyphens).toLowerCase(); return prop + ':' + styles[key]; }).join(';'); }

Slide 62

Slide 62 text

var camel = /([a-z])([A-Z])/g; var hyphens = '$1-$2'; function parseStyles (styles) { if (typeof styles === 'string') { return styles; } return Object.keys(styles).map(function (key) { var prop = key.replace(camel, hyphens).toLowerCase(); return prop + ':' + styles[key]; }).join(';'); }

Slide 63

Slide 63 text

var camel = /([a-z])([A-Z])/g; var hyphens = '$1-$2'; function parseStyles (styles) { if (typeof styles === 'string') { return styles; } return Object.keys(styles).map(function (key) { var prop = key.replace(camel, hyphens).toLowerCase(); return prop + ':' + styles[key]; }).join(';'); }

Slide 64

Slide 64 text

module.exports = function (selector, styles) { var css = parseStyles(styles); var sheets = document.styleSheets; var s = sheets[sheets.length - 1]; var key = s.cssRules ? s.cssRules: s.rules; if (s.insertRule) { sheet.insertRule(selector + '{' + css + '}', key.length); } else if (sheet.addRule) { sheet.addRule(selector, css, key.length); } };

Slide 65

Slide 65 text

module.exports = function (selector, styles) { var css = parseStyles(styles); var sheets = document.styleSheets; var s = sheets[sheets.length - 1]; var key = s.cssRules ? s.cssRules: s.rules; if (s.insertRule) { sheet.insertRule(selector + '{' + css + '}', key.length); } else if (sheet.addRule) { sheet.addRule(selector, css, key.length); } };

Slide 66

Slide 66 text

module.exports = function (selector, styles) { var css = parseStyles(styles); var sheets = document.styleSheets; var s = sheets[sheets.length - 1]; var key = s.cssRules ? s.cssRules: s.rules; if (s.insertRule) { sheet.insertRule(selector + '{' + css + '}', key.length); } else if (sheet.addRule) { sheet.addRule(selector, css, key.length); } };

Slide 67

Slide 67 text

module.exports = function (selector, styles) { var css = parseStyles(styles); var sheets = document.styleSheets; var s = sheets[sheets.length - 1]; var key = s.cssRules ? s.cssRules: s.rules; if (s.insertRule) { sheet.insertRule(selector + '{' + css + '}', key.length); } else if (sheet.addRule) { sheet.addRule(selector, css, key.length); } };

Slide 68

Slide 68 text

module.exports = function (selector, styles) { var css = parseStyles(styles); var sheets = document.styleSheets; var s = sheets[sheets.length - 1]; var key = s.cssRules ? s.cssRules: s.rules; if (s.insertRule) { sheet.insertRule(selector + '{' + css + '}', key.length); } else if (sheet.addRule) { sheet.addRule(selector, css, key.length); } };

Slide 69

Slide 69 text

Extensive Documentation

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

Automate All The Builds!

Slide 73

Slide 73 text

Build distribution

Slide 74

Slide 74 text

Build distribution Bump package

Slide 75

Slide 75 text

Build distribution Bump package Tag in git

Slide 76

Slide 76 text

Build distribution Bump package Tag in git Publish to npm

Slide 77

Slide 77 text

Build distribution Bump package Tag in git Publish to npm

Slide 78

Slide 78 text

npm install gulp -g

Slide 79

Slide 79 text

npm install gulp -D

Slide 80

Slide 80 text

! gulp.task('build', ...)

Slide 81

Slide 81 text

function build () { var pkg = require('./package.json'); return browserify('./src/lib.js') .bundle({ debug: true, standalone: 'lib' }) .pipe(source('lib.js')) .pipe(streamify(header(ext, { pkg: pkg }))) .pipe(gulp.dest('./dist')) .pipe(streamify(rename('lib.min.js'))) .pipe(streamify(uglify())) .pipe(streamify(header(min, { pkg: pkg }))) .pipe(streamify(size())) .pipe(gulp.dest('./dist')); }

Slide 82

Slide 82 text

function build () { var pkg = require('./package.json'); return browserify('./src/lib.js') .bundle({ debug: true, standalone: 'lib' }) .pipe(source('lib.js')) .pipe(streamify(header(ext, { pkg: pkg }))) .pipe(gulp.dest('./dist')) .pipe(streamify(rename('lib.min.js'))) .pipe(streamify(uglify())) .pipe(streamify(header(min, { pkg: pkg }))) .pipe(streamify(size())) .pipe(gulp.dest('./dist')); }

Slide 83

Slide 83 text

function build () { var pkg = require('./package.json'); return browserify('./src/lib.js') .bundle({ debug: true, standalone: 'lib' }) .pipe(source('lib.js')) .pipe(streamify(header(ext, { pkg: pkg }))) .pipe(gulp.dest('./dist')) .pipe(streamify(rename('lib.min.js'))) .pipe(streamify(uglify())) .pipe(streamify(header(min, { pkg: pkg }))) .pipe(streamify(size())) .pipe(gulp.dest('./dist')); }

Slide 84

Slide 84 text

function build () { var pkg = require('./package.json'); return browserify('./src/lib.js') .bundle({ debug: true, standalone: 'lib' }) .pipe(source('lib.js')) .pipe(streamify(header(ext, { pkg: pkg }))) .pipe(gulp.dest('./dist')) .pipe(streamify(rename('lib.min.js'))) .pipe(streamify(uglify())) .pipe(streamify(header(min, { pkg: pkg }))) .pipe(streamify(size())) .pipe(gulp.dest('./dist')); }

Slide 85

Slide 85 text

function build () { var pkg = require('./package.json'); return browserify('./src/lib.js') .bundle({ debug: true, standalone: 'lib' }) .pipe(source('lib.js')) .pipe(streamify(header(ext, { pkg: pkg }))) .pipe(gulp.dest('./dist')) .pipe(streamify(rename('lib.min.js'))) .pipe(streamify(uglify())) .pipe(streamify(header(min, { pkg: pkg }))) .pipe(streamify(size())) .pipe(gulp.dest('./dist')); }

Slide 86

Slide 86 text

function build () { var pkg = require('./package.json'); return browserify('./src/lib.js') .bundle({ debug: true, standalone: 'lib' }) .pipe(source('lib.js')) .pipe(streamify(header(ext, { pkg: pkg }))) .pipe(gulp.dest('./dist')) .pipe(streamify(rename('lib.min.js'))) .pipe(streamify(uglify())) .pipe(streamify(header(min, { pkg: pkg }))) .pipe(streamify(size())) .pipe(gulp.dest('./dist')); }

Slide 87

Slide 87 text

function build () { var pkg = require('./package.json'); return browserify('./src/lib.js') .bundle({ debug: true, standalone: 'lib' }) .pipe(source('lib.js')) .pipe(streamify(header(ext, { pkg: pkg }))) .pipe(gulp.dest('./dist')) .pipe(streamify(rename('lib.min.js'))) .pipe(streamify(uglify())) .pipe(streamify(header(min, { pkg: pkg }))) .pipe(streamify(size())) .pipe(gulp.dest('./dist')); }

Slide 88

Slide 88 text

function build () { var pkg = require('./package.json'); return browserify('./src/lib.js') .bundle({ debug: true, standalone: 'lib' }) .pipe(source('lib.js')) .pipe(streamify(header(ext, { pkg: pkg }))) .pipe(gulp.dest('./dist')) .pipe(streamify(rename('lib.min.js'))) .pipe(streamify(uglify())) .pipe(streamify(header(min, { pkg: pkg }))) .pipe(streamify(size())) .pipe(gulp.dest('./dist')); }

Slide 89

Slide 89 text

function build () { var pkg = require('./package.json'); return browserify('./src/lib.js') .bundle({ debug: true, standalone: 'lib' }) .pipe(source('lib.js')) .pipe(streamify(header(ext, { pkg: pkg }))) .pipe(gulp.dest('./dist')) .pipe(streamify(rename('lib.min.js'))) .pipe(streamify(uglify())) .pipe(streamify(header(min, { pkg: pkg }))) .pipe(streamify(size())) .pipe(gulp.dest('./dist')); }

Slide 90

Slide 90 text

function build () { var pkg = require('./package.json'); return browserify('./src/lib.js') .bundle({ debug: true, standalone: 'lib' }) .pipe(source('lib.js')) .pipe(streamify(header(ext, { pkg: pkg }))) .pipe(gulp.dest('./dist')) .pipe(streamify(rename('lib.min.js'))) .pipe(streamify(uglify())) .pipe(streamify(header(min, { pkg: pkg }))) .pipe(streamify(size())) .pipe(gulp.dest('./dist')); }

Slide 91

Slide 91 text

function build () { var pkg = require('./package.json'); return browserify('./src/lib.js') .bundle({ debug: true, standalone: 'lib' }) .pipe(source('lib.js')) .pipe(streamify(header(ext, { pkg: pkg }))) .pipe(gulp.dest('./dist')) .pipe(streamify(rename('lib.min.js'))) .pipe(streamify(uglify())) .pipe(streamify(header(min, { pkg: pkg }))) .pipe(streamify(size())) .pipe(gulp.dest('./dist')); }

Slide 92

Slide 92 text

gulp.task('build', build);

Slide 93

Slide 93 text

gulp.task('watch', ...)

Slide 94

Slide 94 text

gulp.task('watch', function() { var pattern = { glob: 'src/**/*.js' }; watch(pattern, function () { gulp.start('build'); }); });

Slide 95

Slide 95 text

gulp.task('watch', function() { var pattern = { glob: 'src/**/*.js' }; watch(pattern, function () { gulp.start('build'); }); });

Slide 96

Slide 96 text

gulp.task('watch', function() { var pattern = { glob: 'src/**/*.js' }; watch(pattern, function () { gulp.start('build'); }); });

Slide 97

Slide 97 text

gulp.task('watch', function() { var pattern = { glob: 'src/**/*.js' }; watch(pattern, function () { gulp.start('build'); }); });

Slide 98

Slide 98 text

! gulp.task('bump', ...)

Slide 99

Slide 99 text

gulp.task('bump-only', function () { // major.minor.patch var bumpType = process.env.BUMP || 'patch'; ! return gulp.src(['./package.json', './bower.json']) .pipe(bump({ type: bumpType })) .pipe(gulp.dest('./')); }); ! gulp.task('bump', ['bump-only'], build);

Slide 100

Slide 100 text

gulp.task('bump-only', function () { // major.minor.patch var bumpType = process.env.BUMP || 'patch'; ! return gulp.src(['./package.json', './bower.json']) .pipe(bump({ type: bumpType })) .pipe(gulp.dest('./')); }); ! gulp.task('bump', ['bump-only'], build);

Slide 101

Slide 101 text

gulp.task('bump-only', function () { // major.minor.patch var bumpType = process.env.BUMP || 'patch'; ! return gulp.src(['./package.json', './bower.json']) .pipe(bump({ type: bumpType })) .pipe(gulp.dest('./')); }); ! gulp.task('bump', ['bump-only'], build);

Slide 102

Slide 102 text

gulp.task('bump-only', function () { // major.minor.patch var bumpType = process.env.BUMP || 'patch'; ! return gulp.src(['./package.json', './bower.json']) .pipe(bump({ type: bumpType })) .pipe(gulp.dest('./')); }); ! gulp.task('bump', ['bump-only'], build);

Slide 103

Slide 103 text

gulp.task('bump-only', function () { // major.minor.patch var bumpType = process.env.BUMP || 'patch'; ! return gulp.src(['./package.json', './bower.json']) .pipe(bump({ type: bumpType })) .pipe(gulp.dest('./')); }); ! gulp.task('bump', ['bump-only'], build);

Slide 104

Slide 104 text

gulp.task('bump-only', function () { // major.minor.patch var bumpType = process.env.BUMP || 'patch'; ! return gulp.src(['./package.json', './bower.json']) .pipe(bump({ type: bumpType })) .pipe(gulp.dest('./')); }); ! gulp.task('bump', ['bump-only'], build);

Slide 105

Slide 105 text

! gulp.task('tag', ...)

Slide 106

Slide 106 text

gulp.task('tag', ['bump'], function () { var pkg = require('./package.json'); var v = 'v' + pkg.version; var message = 'Release ' + v; ! return gulp.src('./') .pipe(git.commit(message)) .pipe(git.tag(v, message)) .pipe(git.push('origin', 'master', '--tags')) .pipe(gulp.dest('./')); });

Slide 107

Slide 107 text

gulp.task('tag', ['bump'], function () { var pkg = require('./package.json'); var v = 'v' + pkg.version; var message = 'Release ' + v; ! return gulp.src('./') .pipe(git.commit(message)) .pipe(git.tag(v, message)) .pipe(git.push('origin', 'master', '--tags')) .pipe(gulp.dest('./')); });

Slide 108

Slide 108 text

gulp.task('tag', ['bump'], function () { var pkg = require('./package.json'); var v = 'v' + pkg.version; var message = 'Release ' + v; ! return gulp.src('./') .pipe(git.commit(message)) .pipe(git.tag(v, message)) .pipe(git.push('origin', 'master', '--tags')) .pipe(gulp.dest('./')); });

Slide 109

Slide 109 text

gulp.task('tag', ['bump'], function () { var pkg = require('./package.json'); var v = 'v' + pkg.version; var message = 'Release ' + v; ! return gulp.src('./') .pipe(git.commit(message)) .pipe(git.tag(v, message)) .pipe(git.push('origin', 'master', '--tags')) .pipe(gulp.dest('./')); });

Slide 110

Slide 110 text

gulp.task('tag', ['bump'], function () { var pkg = require('./package.json'); var v = 'v' + pkg.version; var message = 'Release ' + v; ! return gulp.src('./') .pipe(git.commit(message)) .pipe(git.tag(v, message)) .pipe(git.push('origin', 'master', '--tags')) .pipe(gulp.dest('./')); });

Slide 111

Slide 111 text

gulp.task('tag', ['bump'], function () { var pkg = require('./package.json'); var v = 'v' + pkg.version; var message = 'Release ' + v; ! return gulp.src('./') .pipe(git.commit(message)) .pipe(git.tag(v, message)) .pipe(git.push('origin', 'master', '--tags')) .pipe(gulp.dest('./')); });

Slide 112

Slide 112 text

gulp.task('tag', ['bump'], function () { var pkg = require('./package.json'); var v = 'v' + pkg.version; var message = 'Release ' + v; ! return gulp.src('./') .pipe(git.commit(message)) .pipe(git.tag(v, message)) .pipe(git.push('origin', 'master', '--tags')) .pipe(gulp.dest('./')); });

Slide 113

Slide 113 text

! gulp.task('npm', ...)

Slide 114

Slide 114 text

var cp = require('child_process'); var spawn = cp.spawn; ! gulp.task('npm',['tag'],function(done){ spawn('npm', ['publish'], { stdio: 'inherit' }).on('close', done); });

Slide 115

Slide 115 text

var cp = require('child_process'); var spawn = cp.spawn; ! gulp.task('npm',['tag'],function(done){ spawn('npm', ['publish'], { stdio: 'inherit' }).on('close', done); });

Slide 116

Slide 116 text

var cp = require('child_process'); var spawn = cp.spawn; ! gulp.task('npm',['tag'],function(done){ spawn('npm', ['publish'], { stdio: 'inherit' }).on('close', done); });

Slide 117

Slide 117 text

var cp = require('child_process'); var spawn = cp.spawn; ! gulp.task('npm',['tag'],function(done){ spawn('npm', ['publish'], { stdio: 'inherit' }).on('close', done); });

Slide 118

Slide 118 text

! gulp.task('release', ['npm']); ! gulp watch gulp release

Slide 119

Slide 119 text

Use Cases also good for you

Slide 120

Slide 120 text

Poser Extend natives safely

Slide 121

Slide 121 text

var doc = global.document; var tag = 'iframe'; function poser (type) { var frame = doc.createElement(tag); frame.style.display = 'none'; doc.body.appendChild(frame); return frame.contentWindow[type]; } module.exports = poser;

Slide 122

Slide 122 text

var doc = global.document; var tag = 'iframe'; function poser (type) { var frame = doc.createElement(tag); frame.style.display = 'none'; doc.body.appendChild(frame); return frame.contentWindow[type]; } module.exports = poser;

Slide 123

Slide 123 text

var doc = global.document; var tag = 'iframe'; function poser (type) { var frame = doc.createElement(tag); frame.style.display = 'none'; doc.body.appendChild(frame); return frame.contentWindow[type]; } module.exports = poser;

Slide 124

Slide 124 text

var doc = global.document; var tag = 'iframe'; function poser (type) { var frame = doc.createElement(tag); frame.style.display = 'none'; doc.body.appendChild(frame); return frame.contentWindow[type]; } module.exports = poser;

Slide 125

Slide 125 text

var doc = global.document; var tag = 'iframe'; function poser (type) { var frame = doc.createElement(tag); frame.style.display = 'none'; doc.body.appendChild(frame); return frame.contentWindow[type]; } module.exports = poser;

Slide 126

Slide 126 text

Poser Extend natives safely

Slide 127

Slide 127 text

var vm = require('vm'); function poser (type) { var box = {}; var code = 'stolen=' + type; vm.runInNewContext(code, box, 'vm'); return box.stolen; } module.exports = poser;

Slide 128

Slide 128 text

var vm = require('vm'); function poser (type) { var box = {}; var code = 'stolen=' + type; vm.runInNewContext(code, box, 'vm'); return box.stolen; } module.exports = poser;

Slide 129

Slide 129 text

var vm = require('vm'); function poser (type) { var box = {}; var code = 'stolen=' + type; vm.runInNewContext(code, box, 'vm'); return box.stolen; } module.exports = poser;

Slide 130

Slide 130 text

var vm = require('vm'); function poser (type) { var box = {}; var code = 'stolen=' + type; vm.runInNewContext(code, box, 'vm'); return box.stolen; } module.exports = poser;

Slide 131

Slide 131 text

var vm = require('vm'); function poser (type) { var box = {}; var code = 'stolen=' + type; vm.runInNewContext(code, box, 'vm'); return box.stolen; } module.exports = poser;

Slide 132

Slide 132 text

{ "main": "src/node.js", "browser": "./src/browser.js" } "./src/node": "./src/browser" } Semantics in package.json

Slide 133

Slide 133 text

{ "main": "src/node.js", "browser": "./src/browser.js" } "./src/node": "./src/browser" } Semantics in package.json

Slide 134

Slide 134 text

{ "main": "src/node.js", "browser": { "./src/node": "./src/browser" } } Semantics in package.json

Slide 135

Slide 135 text

Taunus Shared Rendering

Slide 136

Slide 136 text

View Templates: function (model) Shared Functionality View Routing: JSON Module

Slide 137

Slide 137 text

Server Side GET /author/compose Accept: HTML? Full Layout + Partial Accept: JSON? Partial View Model

Slide 138

Slide 138 text

Client Side On first load GET request established by the browser Server-side renders layout and view Client-side controller gets executed

Slide 139

Slide 139 text

Client Side On navigation - after first load AJAX request for partial model Client-side renders view Client-side controller gets executed

Slide 140

Slide 140 text

Wrapping Up!

Slide 141

Slide 141 text

Modularity in JS

Slide 142

Slide 142 text

Modularity in JS API Design Quality

Slide 143

Slide 143 text

Modularity in JS API Design Quality Documentation

Slide 144

Slide 144 text

Modularity in JS API Design Quality Documentation Build Automation

Slide 145

Slide 145 text

Thanks! nzgb bevacqua

Slide 146

Slide 146 text

Thanks! nzgb bevacqua All The Questions?