Kevin Ball @kbal11
Modern Javascript
An Overview of the Javascript Ecosystem in 2015
Kevin Ball @kbal11
Why Javascript?
Image Source: https://twitter.com/dberkholz/status/395922559151009792
Kevin Ball @kbal11
Why Javascript?
Image Source: http://www.internetlivestats.com/total-number-of-websites/#trend
Kevin Ball @kbal11
Why Javascript?
Source: Vision Mobile 2014 Developer Economics Report
Kevin Ball @kbal11
Great, where do I start?
NPM
Bower
Node.js Grunt
Gulp
Broccoli
Angular
Ember
BackboneExpress
AMD
React
io.js
Require.js
ES6 Modules
TypeScript
CoffeeScript Dart
jQuery
Modern javascript
Kevin Ball @kbal11
Let’s Break It Down
• Execution Environments (Browsers, node.js, io.js)
• Webservers (Express, Hapi)
• Package Management (NPM, Bower)
• Task Runners and Build (Grunt, Gulp, Broccoli)
• Front End Tools (jQuery, Backbone, Angular, Ember, React)
• Module Systems (AMD, Require, Node Modules, ES6 Modules)
• Javascript “Flavors” (CoffeeScript, TypeScript, Dart, ES6)
Kevin Ball @kbal11
Let’s Break It Down
Your Application
Code
Client Application Lifecycle
Compilation &
Packaging
Webserver
User Browser
Kevin Ball @kbal11
Let’s Break It Down
• Execution Environments (Browsers, node.js, io.js)
• Webservers (Express, Hapi)
• Package Management (NPM, Bower)
• Task Runners and Build (Grunt, Gulp, Broccoli)
• Front End Tools (jQuery, Backbone, Angular, Ember, React)
• Module Systems (AMD, Require, Node Modules, ES6 Modules)
• Javascript “Flavors” (CoffeeScript, TypeScript, Dart, ES6)
Kevin Ball @kbal11
Let’s Break It Down
• Execution Environments (Browsers, node.js, io.js)
• Webservers (Express, Hapi)
• Package Management (NPM, Bower)
• Task Runners and Build (Grunt, Gulp, Broccoli)
• Front End Tools (jQuery, Backbone, Angular, Ember, React)
• Module Systems (AMD, Require, Node Modules, ES6 Modules)
• Javascript “Flavors” (CoffeeScript, TypeScript, Dart, ES6)
Your Application
Code
Kevin Ball @kbal11
• Execution Environments (Browsers, node.js, io.js)
• Webservers (Express, Hapi)
• Package Management (NPM, Bower)
• Task Runners and Build (Grunt, Gulp, Broccoli)
• Front End Tools (jQuery, Backbone, Angular, Ember, React)
• Module Systems (AMD, Require, Node Modules, ES6 Modules)
• Javascript “Flavors” (CoffeeScript, TypeScript, Dart, ES6)
Let’s Break It Down Your Application
Code
Compilation &
Packaging
Kevin Ball @kbal11
• Execution Environments (Browsers, node.js, io.js)
• Webservers (Express, Hapi)
• Package Management (NPM, Bower)
• Task Runners and Build (Grunt, Gulp, Broccoli)
• Front End Tools (jQuery, Backbone, Angular, Ember, React)
• Module Systems (AMD, Require, Node Modules, ES6 Modules)
• Javascript “Flavors” (CoffeeScript, TypeScript, Dart, ES6)
Let’s Break It Down Your Application
Code
Webserver
Kevin Ball @kbal11
• Execution Environments (Browsers, node.js, io.js)
• Webservers (Express, Hapi)
• Package Management (NPM, Bower)
• Task Runners and Build (Grunt, Gulp, Broccoli)
• Front End Tools (jQuery, Backbone, Angular, Ember, React)
• Module Systems (AMD, Require, Node Modules, ES6 Modules)
• Javascript “Flavors” (CoffeeScript, TypeScript, Dart, ES6)
Let’s Break It Down Your Application
Code
User Browser
Kevin Ball @kbal11
Let’s Break It Down
Your Application
Code
Client Application Lifecycle
Compilation &
Packaging
Webserver
User Browser
Kevin Ball @kbal11
Your Application Code
• Javascript “Flavors”
• Front End Tools
• Module Systems
• Package Management
Kevin Ball @kbal11
Javascript “Flavors”
• “Plain old Javascript” (EcmaScript 5)
• EcmaScript 6
• Coffeescript
• Typescript
• Dart
Kevin Ball @kbal11
Javascript “Flavors”
Image Source: http://hakumilol123.deviantart.com/art/Luffy-is-confused-332924357
Kevin Ball @kbal11
Javascript “Flavors”
• ES5 requires the least work (no build required).
• ES6 is where the world is going.
• Coffeescript popular among ruby developers.
• Typescript adds strict typing & structure.
• Dart appears to be orphaned.
• Some tools emphasize one flavor or another.
Kevin Ball @kbal11
Front End Tools
• jQuery
• Backbone
• Angular
• Ember
• React
Kevin Ball @kbal11
jQuery
• The “Browser API” that should have been.
• Used on over 60% of ALL websites.
• Easy to learn, easy to use.
Kevin Ball @kbal11
Backbone
• Lightweight, minimalist MVC.
• Straightforward to learn.
• Minimalistic - doesn’t provide structure, just
tools.
Kevin Ball @kbal11
Angular
• Opinionated framework.
• Huge community, backed by Google.
• Very structured, written for testability.
• Big learning curve from novice to expert.
• 1.0 in Javascript, 2.0 in Typescript.
Kevin Ball @kbal11
Ember
• Opinionated framework.
• Big community focus.
• Big learning curve.
• Big performance focus.
• Absorbing many of the best concepts from other
frameworks.
• Jumped in head-first on ES6.
Kevin Ball @kbal11
React
• View layer only.
• Built by & used extensively by Facebook.
• “Different” approach to bindings and state.
• Very fast.
Kevin Ball @kbal11
Front End Tools
• If you’re just getting started, start with jQuery.
• Backbone is the easiest next step.
• Angular 2.0 looks good but they’re abandoning
backwards compatibility.
• Ember appears to be absorbing all of the good
ideas, with focus on maintaining compatibility.
• React is super cool and very different.
Kevin Ball @kbal11
Module Systems
–Eloquent JavaScript
“Most modern programming languages have
some kind of module system built in. Not
JavaScript. Once again, we have to invent
something ourselves.”
Kevin Ball @kbal11
Module Systems
• AMD (RequireJS)
• CommonJS (Node Modules)
• ES6 Modules
Kevin Ball @kbal11
Module Systems
• AMD (RequireJS)
• Asynchronous, suited to browser environment.
• CommonJS (Node Modules)
• ES6 Modules
Kevin Ball @kbal11
Module Systems
• AMD (RequireJS)
• Asynchronous, suited to browser environment.
• CommonJS (Node Modules)
• Synchronous. Package for browser with web
pack or browserify.
• ES6 Modules
Kevin Ball @kbal11
Module Systems
• AMD (RequireJS)
• Asynchronous, suited to browser environment.
• CommonJS (Node Modules)
• Synchronous. Package for browser with web pack
or browserify.
• ES6 Modules
• The future.
Kevin Ball @kbal11
Package Management
• NPM
• bower
Kevin Ball @kbal11
Package Management
• NPM
• Node Package Manager
• bower
Kevin Ball @kbal11
Package Management
• NPM
• Node Package Manager.
• Bower
• “Front End Package Manager”
Kevin Ball @kbal11
Let’s Break It Down
Your Application
Code
Client Application Lifecycle
Compilation &
Packaging
Webserver
User Browser
Kevin Ball @kbal11
Compilation and Packaging
• Minifiers and Concatinators
• Compilers and Transpilers
• Task Runners to get it all done
Kevin Ball @kbal11
Minifiers and Concatinators
• Exist to minimize the number and size of web
requests.
• “Rewrite” javascript changing names of all
internal variables to as short as possible.
• Concatinators put it all together to only require
one request.
• Source maps allow you to trace it back for debug.
Kevin Ball @kbal11
Compilers and Transpilers
• How you get from ES6/CoffeeScript/TypeScript/
etc to “Plain Old Javascript”.
• Typically run first in your build chain.
• Source maps doubly important.
Kevin Ball @kbal11
Task Runners
• Grunt
• Gulp
• Broccoli
Kevin Ball @kbal11
Task Runners: Grunt
• Most popular task runner in Node world.
• Configuration based using JSON Objects.
• Communication between tasks via files.
Kevin Ball @kbal11
Sample Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
options: {
globals: {
jQuery: true
}
}
},
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint']
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
!
grunt.registerTask('default', ['jshint']);
};
Kevin Ball @kbal11
Task Runners: Gulp
• 2nd most popular Node task runner.
• Code over configuration.
• Communication between tasks as pipes.
Kevin Ball @kbal11
Sample gulpfile.js
var gulp = require(‘gulp’);
var jshint = require(‘gulp-jshint’);
!
gulp.task(‘jshint’, function() {
return gulp.src(['gulpfile.js', 'src/**/*.js', ‘test/**/*.js’])
.pipe(jshint())
.pipe(jshint.reporter(‘jshint-stylish’))
.pipe(jshint.reporter(‘fail’));
});
!
gulp.watch([‘src/**/*.js’, ‘test/**/*.js’], ‘jshint’);
gulp.task(‘default’, ‘jshint’);
Kevin Ball @kbal11
Task Runners: Broccoli
• Really a build tool, not a task runner.
• Newest of the 3, still immature (especially on
Windows).
• Tree-based system.
Kevin Ball @kbal11
Sample Brocfile.js
// Brocfile.js
var concat = require('broccoli-concat'),
pickFiles = require('broccoli-static-compiler'),
mergeTrees = require('broccoli-merge-trees');
!
// concat the JS
var scripts = concat('app/', {
inputFiles: ['**/*.js'],
outputFile: '/assets/scripts.js'
});
// concat the CSS
var styles = concat('app/styles', {
inputFiles: ['**/*.css'],
outputFile: '/assets/styles.css'
});
!
// and merge all the trees together
module.exports = mergeTrees([scripts, styles]);
Kevin Ball @kbal11
Task Runners
• Grunt - Good for beginners, most familiar style.!
• Gulp
• Broccoli
Kevin Ball @kbal11
Task Runners
• Grunt
• Gulp - Good for Linux/piped background.!
• Broccoli
Kevin Ball @kbal11
Task Runners
• Grunt
• Gulp
• Broccoli - The next big thing. Experts should
check it out.
Kevin Ball @kbal11
Let’s Break It Down
Your Application
Code
Client Application Lifecycle
Compilation &
Packaging
Webserver
User Browser
Kevin Ball @kbal11
Webserver
• Execution Environments
• Webservers
Kevin Ball @kbal11
Execution Environments
• Browsers
• Node.js
• io.js
Kevin Ball @kbal11
Node.js
• Server-side javascript execution framework
• Built on Chrome’s v8 javascript runtime
• Asynchronous, event-driven framework
• Defines it’s own modules system
Kevin Ball @kbal11
io.js
• Fork of Node.js
• Moves much more quickly
• More community-managed
• In the process of merging back with node.js
Kevin Ball @kbal11
Webservers
• Express
• Hapi
• Koa
Kevin Ball @kbal11
Webservers
• Express
• The de facto standard
• Hapi
• Koa
Kevin Ball @kbal11
Webservers
• Express
• The de facto standard
• Hapi
• Configuration over code
• Koa
Kevin Ball @kbal11
Webservers
• Express
• The de facto standard
• Hapi
• Configuration over code
• Koa
• Minimalist successor to Express
Kevin Ball @kbal11
Let’s Break It Down
Your Application
Code
Client Application Lifecycle
Compilation &
Packaging
Webserver
User Browser
Kevin Ball @kbal11
User Browser
• The “Traditional” place where javascript runs
• May be a desktop browser, but may also be on
laptop, mobile browser, or even embedded
within a mobile application.
• Different browsers have different levels of spec
support.
Kevin Ball @kbal11
Cross-Browser Support
• Typically support last 2 versions of each
browser.
• Quickest way to good cross-browser support is
use frameworks with good cross-browser
support.
• Things mostly break down on the bleeding
edge.
Kevin Ball @kbal11
But really, where do I start?
• yeoman
• ember-cli
Let someone else choose for you!
Kevin Ball @kbal11
Kevin Ball @kbal11
Javascript is the Future
I’ll see you there.
Kevin Ball
http://kevinball.com
http://twitter.com/kbal11

More Related Content

PPTX
How NOT to get lost in the current JavaScript landscape
PDF
Flexible UI Components for a Multi-Framework World
PPTX
Untangling - fall2017 - week 8
PDF
React server side rendering performance
PDF
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
PDF
Developing, building, testing and deploying react native apps
PPTX
Saving Time By Testing With Jest
PDF
User-percieved performance
How NOT to get lost in the current JavaScript landscape
Flexible UI Components for a Multi-Framework World
Untangling - fall2017 - week 8
React server side rendering performance
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
Developing, building, testing and deploying react native apps
Saving Time By Testing With Jest
User-percieved performance

What's hot (20)

PDF
Write Once, Run Everywhere - Ember.js Munich
KEY
improving the performance of Rails web Applications
PDF
jQuery Chicago 2014 - Next-generation JavaScript Testing
PDF
Webcomponents are your frameworks best friend
PPTX
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
PDF
The Dark Side of Single Page Applications
PDF
Frameworks and webcomponents
PDF
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
PDF
Web a Quebec - JS Debugging
ODP
Cvcc performance tuning
KEY
Freelancing and side-projects on Rails
PPTX
Agile sites @ telmore
PPTX
Untangling - fall2017 - week 9
PPTX
Agile sites2
PDF
Agile sites311training
PPTX
React101 v3
KEY
Windycityrails page performance
PPTX
Javascript Frameworks Comparison
PDF
MEAN Stack WeNode Barcelona Workshop
PDF
Why use Go for web development?
Write Once, Run Everywhere - Ember.js Munich
improving the performance of Rails web Applications
jQuery Chicago 2014 - Next-generation JavaScript Testing
Webcomponents are your frameworks best friend
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
The Dark Side of Single Page Applications
Frameworks and webcomponents
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Web a Quebec - JS Debugging
Cvcc performance tuning
Freelancing and side-projects on Rails
Agile sites @ telmore
Untangling - fall2017 - week 9
Agile sites2
Agile sites311training
React101 v3
Windycityrails page performance
Javascript Frameworks Comparison
MEAN Stack WeNode Barcelona Workshop
Why use Go for web development?
Ad

Similar to Modern javascript (20)

PDF
Frontend JS workflow - Gulp 4 and the like
PPT
State of modern web technologies: an introduction
PDF
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
PDF
Workflow automation for Front-end web applications
PPTX
The Javascript Ecosystem
PPTX
A few good JavaScript development tools
PPTX
Modern Development Tools
PDF
Extending Build to the Client: A Maven User's Guide to Grunt.js
PDF
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
PDF
Modern Web Application Development Workflow - EclipseCon France 2014
PPTX
Make JavaScript Lean, Mean, and Clean
PPTX
MEAN (DevFM)
PPTX
Introduction to NodeJS JSX is an extended Javascript based language used by R...
PDF
Top 11 Front-End Web Development Tools To Consider in 2020
PDF
Modern Web Application Development Workflow - web2day 2014
PPTX
Node js meetup
PPTX
Reusability is the goal
PPTX
JS digest. November 2017
PPTX
Building JavaScript
PDF
Server Side Apocalypse, JS
Frontend JS workflow - Gulp 4 and the like
State of modern web technologies: an introduction
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
Workflow automation for Front-end web applications
The Javascript Ecosystem
A few good JavaScript development tools
Modern Development Tools
Extending Build to the Client: A Maven User's Guide to Grunt.js
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
Modern Web Application Development Workflow - EclipseCon France 2014
Make JavaScript Lean, Mean, and Clean
MEAN (DevFM)
Introduction to NodeJS JSX is an extended Javascript based language used by R...
Top 11 Front-End Web Development Tools To Consider in 2020
Modern Web Application Development Workflow - web2day 2014
Node js meetup
Reusability is the goal
JS digest. November 2017
Building JavaScript
Server Side Apocalypse, JS
Ad

More from Kevin Ball (6)

PDF
Npm Shrinkwrap
PDF
Understanding the Nesting Structure of the Ember.js View Layer
KEY
Intro to Javascript
KEY
Underscore.js
PDF
Omniauth: Future Proof Your Authentication
KEY
Ruby 1.9 Fibers
Npm Shrinkwrap
Understanding the Nesting Structure of the Ember.js View Layer
Intro to Javascript
Underscore.js
Omniauth: Future Proof Your Authentication
Ruby 1.9 Fibers

Recently uploaded (20)

PPTX
Human-Computer Interaction for Lecture 2
PPTX
Chapter 1 - Transaction Processing and Mgt.pptx
PPTX
Chapter_05_System Modeling for software engineering
PDF
Module 1 - Introduction to Generative AI.pdf
PPT
3.Software Design for software engineering
PPTX
Bandicam Screen Recorder 8.2.1 Build 2529 Crack
PDF
Building an Inclusive Web Accessibility Made Simple with Accessibility Analyzer
PDF
Coding with GPT-5- What’s New in GPT 5 That Benefits Developers.pdf
PDF
Ragic Data Security Overview: Certifications, Compliance, and Network Safegua...
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
PDF
infoteam HELLAS company profile 2025 presentation
PDF
What Makes a Great Data Visualization Consulting Service.pdf
PDF
Mobile App Backend Development with WordPress REST API: The Complete eBook
PDF
Streamlining Project Management in Microsoft Project, Planner, and Teams with...
PPTX
ESDS_SAP Application Cloud Offerings.pptx
PPTX
StacksandQueuesCLASS 12 COMPUTER SCIENCE.pptx
PPTX
Beige and Black Minimalist Project Deck Presentation (1).pptx
PPTX
MCP empowers AI Agents from Zero to Production
PPTX
Independent Consultants’ Biggest Challenges in ERP Projects – and How Apagen ...
PPTX
AI Tools Revolutionizing Software Development Workflows
Human-Computer Interaction for Lecture 2
Chapter 1 - Transaction Processing and Mgt.pptx
Chapter_05_System Modeling for software engineering
Module 1 - Introduction to Generative AI.pdf
3.Software Design for software engineering
Bandicam Screen Recorder 8.2.1 Build 2529 Crack
Building an Inclusive Web Accessibility Made Simple with Accessibility Analyzer
Coding with GPT-5- What’s New in GPT 5 That Benefits Developers.pdf
Ragic Data Security Overview: Certifications, Compliance, and Network Safegua...
Understanding the Need for Systemic Change in Open Source Through Intersectio...
infoteam HELLAS company profile 2025 presentation
What Makes a Great Data Visualization Consulting Service.pdf
Mobile App Backend Development with WordPress REST API: The Complete eBook
Streamlining Project Management in Microsoft Project, Planner, and Teams with...
ESDS_SAP Application Cloud Offerings.pptx
StacksandQueuesCLASS 12 COMPUTER SCIENCE.pptx
Beige and Black Minimalist Project Deck Presentation (1).pptx
MCP empowers AI Agents from Zero to Production
Independent Consultants’ Biggest Challenges in ERP Projects – and How Apagen ...
AI Tools Revolutionizing Software Development Workflows

Modern javascript

  • 1. Kevin Ball @kbal11 Modern Javascript An Overview of the Javascript Ecosystem in 2015
  • 2. Kevin Ball @kbal11 Why Javascript? Image Source: https://twitter.com/dberkholz/status/395922559151009792
  • 3. Kevin Ball @kbal11 Why Javascript? Image Source: http://www.internetlivestats.com/total-number-of-websites/#trend
  • 4. Kevin Ball @kbal11 Why Javascript? Source: Vision Mobile 2014 Developer Economics Report
  • 5. Kevin Ball @kbal11 Great, where do I start? NPM Bower Node.js Grunt Gulp Broccoli Angular Ember BackboneExpress AMD React io.js Require.js ES6 Modules TypeScript CoffeeScript Dart jQuery
  • 7. Kevin Ball @kbal11 Let’s Break It Down • Execution Environments (Browsers, node.js, io.js) • Webservers (Express, Hapi) • Package Management (NPM, Bower) • Task Runners and Build (Grunt, Gulp, Broccoli) • Front End Tools (jQuery, Backbone, Angular, Ember, React) • Module Systems (AMD, Require, Node Modules, ES6 Modules) • Javascript “Flavors” (CoffeeScript, TypeScript, Dart, ES6)
  • 8. Kevin Ball @kbal11 Let’s Break It Down Your Application Code Client Application Lifecycle Compilation & Packaging Webserver User Browser
  • 9. Kevin Ball @kbal11 Let’s Break It Down • Execution Environments (Browsers, node.js, io.js) • Webservers (Express, Hapi) • Package Management (NPM, Bower) • Task Runners and Build (Grunt, Gulp, Broccoli) • Front End Tools (jQuery, Backbone, Angular, Ember, React) • Module Systems (AMD, Require, Node Modules, ES6 Modules) • Javascript “Flavors” (CoffeeScript, TypeScript, Dart, ES6)
  • 10. Kevin Ball @kbal11 Let’s Break It Down • Execution Environments (Browsers, node.js, io.js) • Webservers (Express, Hapi) • Package Management (NPM, Bower) • Task Runners and Build (Grunt, Gulp, Broccoli) • Front End Tools (jQuery, Backbone, Angular, Ember, React) • Module Systems (AMD, Require, Node Modules, ES6 Modules) • Javascript “Flavors” (CoffeeScript, TypeScript, Dart, ES6) Your Application Code
  • 11. Kevin Ball @kbal11 • Execution Environments (Browsers, node.js, io.js) • Webservers (Express, Hapi) • Package Management (NPM, Bower) • Task Runners and Build (Grunt, Gulp, Broccoli) • Front End Tools (jQuery, Backbone, Angular, Ember, React) • Module Systems (AMD, Require, Node Modules, ES6 Modules) • Javascript “Flavors” (CoffeeScript, TypeScript, Dart, ES6) Let’s Break It Down Your Application Code Compilation & Packaging
  • 12. Kevin Ball @kbal11 • Execution Environments (Browsers, node.js, io.js) • Webservers (Express, Hapi) • Package Management (NPM, Bower) • Task Runners and Build (Grunt, Gulp, Broccoli) • Front End Tools (jQuery, Backbone, Angular, Ember, React) • Module Systems (AMD, Require, Node Modules, ES6 Modules) • Javascript “Flavors” (CoffeeScript, TypeScript, Dart, ES6) Let’s Break It Down Your Application Code Webserver
  • 13. Kevin Ball @kbal11 • Execution Environments (Browsers, node.js, io.js) • Webservers (Express, Hapi) • Package Management (NPM, Bower) • Task Runners and Build (Grunt, Gulp, Broccoli) • Front End Tools (jQuery, Backbone, Angular, Ember, React) • Module Systems (AMD, Require, Node Modules, ES6 Modules) • Javascript “Flavors” (CoffeeScript, TypeScript, Dart, ES6) Let’s Break It Down Your Application Code User Browser
  • 14. Kevin Ball @kbal11 Let’s Break It Down Your Application Code Client Application Lifecycle Compilation & Packaging Webserver User Browser
  • 15. Kevin Ball @kbal11 Your Application Code • Javascript “Flavors” • Front End Tools • Module Systems • Package Management
  • 16. Kevin Ball @kbal11 Javascript “Flavors” • “Plain old Javascript” (EcmaScript 5) • EcmaScript 6 • Coffeescript • Typescript • Dart
  • 17. Kevin Ball @kbal11 Javascript “Flavors” Image Source: http://hakumilol123.deviantart.com/art/Luffy-is-confused-332924357
  • 18. Kevin Ball @kbal11 Javascript “Flavors” • ES5 requires the least work (no build required). • ES6 is where the world is going. • Coffeescript popular among ruby developers. • Typescript adds strict typing & structure. • Dart appears to be orphaned. • Some tools emphasize one flavor or another.
  • 19. Kevin Ball @kbal11 Front End Tools • jQuery • Backbone • Angular • Ember • React
  • 20. Kevin Ball @kbal11 jQuery • The “Browser API” that should have been. • Used on over 60% of ALL websites. • Easy to learn, easy to use.
  • 21. Kevin Ball @kbal11 Backbone • Lightweight, minimalist MVC. • Straightforward to learn. • Minimalistic - doesn’t provide structure, just tools.
  • 22. Kevin Ball @kbal11 Angular • Opinionated framework. • Huge community, backed by Google. • Very structured, written for testability. • Big learning curve from novice to expert. • 1.0 in Javascript, 2.0 in Typescript.
  • 23. Kevin Ball @kbal11 Ember • Opinionated framework. • Big community focus. • Big learning curve. • Big performance focus. • Absorbing many of the best concepts from other frameworks. • Jumped in head-first on ES6.
  • 24. Kevin Ball @kbal11 React • View layer only. • Built by & used extensively by Facebook. • “Different” approach to bindings and state. • Very fast.
  • 25. Kevin Ball @kbal11 Front End Tools • If you’re just getting started, start with jQuery. • Backbone is the easiest next step. • Angular 2.0 looks good but they’re abandoning backwards compatibility. • Ember appears to be absorbing all of the good ideas, with focus on maintaining compatibility. • React is super cool and very different.
  • 26. Kevin Ball @kbal11 Module Systems –Eloquent JavaScript “Most modern programming languages have some kind of module system built in. Not JavaScript. Once again, we have to invent something ourselves.”
  • 27. Kevin Ball @kbal11 Module Systems • AMD (RequireJS) • CommonJS (Node Modules) • ES6 Modules
  • 28. Kevin Ball @kbal11 Module Systems • AMD (RequireJS) • Asynchronous, suited to browser environment. • CommonJS (Node Modules) • ES6 Modules
  • 29. Kevin Ball @kbal11 Module Systems • AMD (RequireJS) • Asynchronous, suited to browser environment. • CommonJS (Node Modules) • Synchronous. Package for browser with web pack or browserify. • ES6 Modules
  • 30. Kevin Ball @kbal11 Module Systems • AMD (RequireJS) • Asynchronous, suited to browser environment. • CommonJS (Node Modules) • Synchronous. Package for browser with web pack or browserify. • ES6 Modules • The future.
  • 31. Kevin Ball @kbal11 Package Management • NPM • bower
  • 32. Kevin Ball @kbal11 Package Management • NPM • Node Package Manager • bower
  • 33. Kevin Ball @kbal11 Package Management • NPM • Node Package Manager. • Bower • “Front End Package Manager”
  • 34. Kevin Ball @kbal11 Let’s Break It Down Your Application Code Client Application Lifecycle Compilation & Packaging Webserver User Browser
  • 35. Kevin Ball @kbal11 Compilation and Packaging • Minifiers and Concatinators • Compilers and Transpilers • Task Runners to get it all done
  • 36. Kevin Ball @kbal11 Minifiers and Concatinators • Exist to minimize the number and size of web requests. • “Rewrite” javascript changing names of all internal variables to as short as possible. • Concatinators put it all together to only require one request. • Source maps allow you to trace it back for debug.
  • 37. Kevin Ball @kbal11 Compilers and Transpilers • How you get from ES6/CoffeeScript/TypeScript/ etc to “Plain Old Javascript”. • Typically run first in your build chain. • Source maps doubly important.
  • 38. Kevin Ball @kbal11 Task Runners • Grunt • Gulp • Broccoli
  • 39. Kevin Ball @kbal11 Task Runners: Grunt • Most popular task runner in Node world. • Configuration based using JSON Objects. • Communication between tasks via files.
  • 40. Kevin Ball @kbal11 Sample Gruntfile.js module.exports = function(grunt) { grunt.initConfig({ jshint: { files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'], options: { globals: { jQuery: true } } }, watch: { files: ['<%= jshint.files %>'], tasks: ['jshint'] } }); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-watch'); ! grunt.registerTask('default', ['jshint']); };
  • 41. Kevin Ball @kbal11 Task Runners: Gulp • 2nd most popular Node task runner. • Code over configuration. • Communication between tasks as pipes.
  • 42. Kevin Ball @kbal11 Sample gulpfile.js var gulp = require(‘gulp’); var jshint = require(‘gulp-jshint’); ! gulp.task(‘jshint’, function() { return gulp.src(['gulpfile.js', 'src/**/*.js', ‘test/**/*.js’]) .pipe(jshint()) .pipe(jshint.reporter(‘jshint-stylish’)) .pipe(jshint.reporter(‘fail’)); }); ! gulp.watch([‘src/**/*.js’, ‘test/**/*.js’], ‘jshint’); gulp.task(‘default’, ‘jshint’);
  • 43. Kevin Ball @kbal11 Task Runners: Broccoli • Really a build tool, not a task runner. • Newest of the 3, still immature (especially on Windows). • Tree-based system.
  • 44. Kevin Ball @kbal11 Sample Brocfile.js // Brocfile.js var concat = require('broccoli-concat'), pickFiles = require('broccoli-static-compiler'), mergeTrees = require('broccoli-merge-trees'); ! // concat the JS var scripts = concat('app/', { inputFiles: ['**/*.js'], outputFile: '/assets/scripts.js' }); // concat the CSS var styles = concat('app/styles', { inputFiles: ['**/*.css'], outputFile: '/assets/styles.css' }); ! // and merge all the trees together module.exports = mergeTrees([scripts, styles]);
  • 45. Kevin Ball @kbal11 Task Runners • Grunt - Good for beginners, most familiar style.! • Gulp • Broccoli
  • 46. Kevin Ball @kbal11 Task Runners • Grunt • Gulp - Good for Linux/piped background.! • Broccoli
  • 47. Kevin Ball @kbal11 Task Runners • Grunt • Gulp • Broccoli - The next big thing. Experts should check it out.
  • 48. Kevin Ball @kbal11 Let’s Break It Down Your Application Code Client Application Lifecycle Compilation & Packaging Webserver User Browser
  • 49. Kevin Ball @kbal11 Webserver • Execution Environments • Webservers
  • 50. Kevin Ball @kbal11 Execution Environments • Browsers • Node.js • io.js
  • 51. Kevin Ball @kbal11 Node.js • Server-side javascript execution framework • Built on Chrome’s v8 javascript runtime • Asynchronous, event-driven framework • Defines it’s own modules system
  • 52. Kevin Ball @kbal11 io.js • Fork of Node.js • Moves much more quickly • More community-managed • In the process of merging back with node.js
  • 53. Kevin Ball @kbal11 Webservers • Express • Hapi • Koa
  • 54. Kevin Ball @kbal11 Webservers • Express • The de facto standard • Hapi • Koa
  • 55. Kevin Ball @kbal11 Webservers • Express • The de facto standard • Hapi • Configuration over code • Koa
  • 56. Kevin Ball @kbal11 Webservers • Express • The de facto standard • Hapi • Configuration over code • Koa • Minimalist successor to Express
  • 57. Kevin Ball @kbal11 Let’s Break It Down Your Application Code Client Application Lifecycle Compilation & Packaging Webserver User Browser
  • 58. Kevin Ball @kbal11 User Browser • The “Traditional” place where javascript runs • May be a desktop browser, but may also be on laptop, mobile browser, or even embedded within a mobile application. • Different browsers have different levels of spec support.
  • 59. Kevin Ball @kbal11 Cross-Browser Support • Typically support last 2 versions of each browser. • Quickest way to good cross-browser support is use frameworks with good cross-browser support. • Things mostly break down on the bleeding edge.
  • 60. Kevin Ball @kbal11 But really, where do I start? • yeoman • ember-cli Let someone else choose for you!
  • 62. Kevin Ball @kbal11 Javascript is the Future I’ll see you there. Kevin Ball http://kevinball.com http://twitter.com/kbal11