Tooling In The Web Dev Lifecycle

  • Development Environments
  • Authoring Abstractions
  • Frameworks & Libraries
  • Testing & Iteration Flow
  • Performance Tuning
  • Build Optimization
  • Deployment hi

Check out Paul Irish's presentation on Tooling and the Web App Development Stack

Development Environment

Code, Compile, Build, & Reload

Sublime Text 2


It's like steriods for web developers

  • Compiles nearly everything
  • Live browser reloads
  • Combines and minifies
  • Optimizes images
  • JSHint and JSLint
  • Team collaboration
  • Easy frameworks

For more information, see

Development Tools

A More Lickable Web

Boiler Plates

Helpful Libraries: FT Fast Click

Problem: 300ms delay between a tap and the click event firing on mobile browsers.

Solution: Track TouchStart events and fire a click event as soon as it receives a TouchEnd event.

window.addEventListener('load', function() {
  new FastClick(document.body);
}, false);

Helpful Libraries: JSConsole

Problem: No debug console on mobile devices without using a remote debugger.

Solution: Send console.log events to a separate server that you connect to from your desktop.

  1. Open on the desktop computer and type :listen
  2. Paste output into the source for your mobile app
  3. ????
  4. Profit. Okay, not quite yet.

Helpful Libraries: HammerJS

Problem: Makes handling multi-touch gestures hella easy!

Solution: A 2k library that handles tap, double tap, swipe, hold, transform and drag.

var hammer = new Hammer(document.getElementById("container"));
hammer.ondragstart = function(ev) { };
hammer.ondrag = function(ev) { };
hammer.ondragend = function(ev) { };
hammer.onswipe = function(ev) { };

Helpful Libraries: Lawn Chair

Problem: IndexedDB, WebSQL or LocalStorage, which works best?

Solution: Provides a simple API that abstracts away the implementation of each service.

var people = lawnchair();{name:"Pete", email:""});

people.all(function(peeps) {
  peeps.forEach(function(person) {

High DPI Displays

There isn't an easy answer yet, but there are options...

#my-image { background: (low.png); }
@media only screen and (min-device-pixel-ratio: 1.5) {
  #my-image { background: (high.png); }
// Only works in Safari & Chrome today.
background-image: url(icon1x.jpg);
background-image: -webkit-image-set(
  url(icon1x.jpg) 1x,
  url(icon2x.jpg) 2x
// Not yet implmented by any browser :(
<img alt="my awesome image" src="banner.jpeg" 
  srcset="banner-HD.jpeg 2x, banner-phone.jpeg 640w, banner-phone-HD.jpeg 640w 2x">

High DPI Displays

Best Practices

  • Using image replacement is generally frowned upon
  • Use vector images or CSS styles wherever possible
  • Heavily compressed 2x images often look better than enlarged 1x images
  • Use icon fonts like Font Awesome

For more information, see

Other Helpful Tips & Stuff To Know

  • Fingers != mouse pointer
  • Avoid: tables, relative positioning, absolute positioning, floats
  • Headers and Footers? Use position: fixed;
  • Scroll inside elements? Use overflow: scroll;
  • Inertial scrolling? Use -webkit-overflow-scrolling: touch; (iOS 5+)


Faking It: Network Link Conditioner

Faking It: Chrome's Dev Tools

Chrome's Dev Tools allows you to over-ride some settings or force certain behaviours like:

  • User Agent
  • Device Metrics
  • Simulate Touch Events
  • Coming Soon: Geo Location
  • Coming Soon: Device Orientation
  • Coming Eventually: Device Pixel Ratio

Faking it: Emulators

Real Thing: Chrome Remote Debugger

One Time Setup

  1. Install the Android SDK
  2. On the mobile device, enable USB debugging at the OS level
  3. On the mobile device, launch Chrome. Open Settings > Advanced > Developer tools and check the Enable USB Web debugging checkbox.


  1. Connect the mobile device to computer via USB
  2. On the desktop, run adb forward tcp:9222 localabstract:chrome_devtools_remote
  3. Open the desktop, open Chrome and navigate to localhost:9222

See for more information.

Real Thing: Safari Remote Debugger

One Time Setup

  1. On the mobile device, enable the Web Inspector under Settings > Safari > Advanced
  2. On the desktop, open Safari and open the preference pane, under Advanced, check the Show Develop menu in the menu bar checkbox


  1. Connect the mobile device to your computer
  2. On the desktop, click the Develop menu bar item, and choose the device you want to debug

See for more information.

Real Thing: Firefox Remote Debugger

One Time Setup

  1. On the desktop, navigate to about:config, search for remote-en enable it, then restart Firefox.
  2. On the mobile device, navigate to about:config, search for debugger, toggle devtools.debugger.force-local to false and devtools.debugger.remote-enabled to true, then restart Firefox.


  1. On the mobile device, find the IP address
  2. On the desktop, click the Tools menu bar item, and choose Web Developer > Remote Debugger and enter the remote IP address plus port 6000.

See for more information.

Real Thing: Open Device Labs

A Few Favors to Ask!

What: Should we create a separate mobile site or create a responsive experience instead?

Join Brad Frost as he takes apart the Obama and Romney campaign webites.

When: November 14th, 10:30am ET


We Want Need Your Help!

Don't accept the status quo

  • File any Chrome bugs you find at
  • Build a mobile web experiment and submit it at to show off your skills!
  • Start an open device lab in your area
  • The mobile web is what you make of it.

<Thank You!>


Pete LePage