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

Front-End Operations

Mark Meeker
December 03, 2014

Front-End Operations

The Rich Web Experience - December, 2014

It used to be the only debugging tool at the disposal of a front-end developer was "view source" and every page had to be viewed manually to check for visual correctness. With our pages and applications growing in complexity, we now have an increasing need for better tools to help build, test, and monitor our code. Everything from linting and optimizing to monitoring and analytics are now important parts of the front-end developer's job.

In this session, we'll look at the current state of front-end focused tools to improve code quality, help identify performance bottlenecks and aid in application monitoring.

Mark Meeker

December 03, 2014
Tweet

More Decks by Mark Meeker

Other Decks in Technology

Transcript

  1. Speed-up • Making it faster to develop • Making it

    easier to catch and troubleshoot issues • Reducing the overhead for testing • Reducing page load time and latency
  2. Develop • Use a Build System • Mirror production environment

    • Enable Source maps • Lint your code • Autoprefix • Solve for shift+reload
  3. Develop • Use a Build System • Mirror production environment

    • Enable Source maps • Lint your code • Autoprefix • Solve for shift+reload
  4. Run minified code Concat files Use Sprites HTTPS Use a

    distinct cookie space (domain) CMS content Mirror Production Environment
  5. Develop • Use a Build System • Mirror production environment

    • Enable Source maps • Lint your code • Autoprefix • Solve for shift+reload
  6. Develop • Use a Build System • Mirror production environment

    • Enable Source maps • Lint your code • Autoprefix • Solve for shift+reload
  7. Disallow duplicate properties unless directly after and different Disallow syntax

    errors Enforce valid property names Limit number of selectors to <4095 which is the IE limit CSS Lint
  8. always put curly braces around blocks in loops and conditionals

    sets a specific tab width for your code warns when you define and never use your variables prohibits the use of a variable before it was defined JS Hint
  9. Attribute names must be lowercase Attribute names cannot be duplicated

    in a tag Leading whitespace cannot be mix of spaces and tabs Tags must be properly closed HTML Lint
  10. Develop • Use a Build System • Mirror production environment

    • Enable Source maps • Lint your code • Autoprefix • Solve for shift+reload
  11. a { transition: transform 1s; } a { -webkit-transition: -webkit-transform

    1s; transition: -ms-transform 1s; transition: transform 1s }
  12. Develop • Use a Build System • Mirror production environment

    • Enable Source maps • Lint your code • Autoprefix • Solve for shift+reload
  13. Debug • Use Proxy Tools • Install all the browsers

    • Build a Device Lab • Remote Web Inspector
  14. Debug • Use Proxy Tools • Install all the browsers

    • Build a Device Lab • Remote Web Inspector
  15. Debug • Use Proxy Tools • Install all the browsers

    • Build a Device Lab • Remote Web Inspector
  16. Focus on 20% of devices that are 80% of traffic

    Screen size, screen resolution, OS mix Buy from eBay, Gazelle and co-works who are upgrading Setup dedicated wifi network Device Lab
  17. Debug • Use Proxy Tools • Install all the browsers

    • Build a Device Lab • Web Inspector Remote (weinre)
  18. * requests: 29 * gzipRequests: 3 * postRequests: 0 *

    httpsRequests: 0 * redirects: 0 * notFound: 0 * timeToFirstByte: 807 * timeToLastByte: 833 * bodySize: 179021 * contentLength: 311187 * ajaxRequests: 0 * htmlCount: 1 * htmlSize: 1151 * cssCount: 2 * cssSize: 1630 * jsCount: 5 * jsSize: 41272 * jsonCount: 0 * jsonSize: 0 * imageCount: 21 * imageSize: 134968
  19. Manage external libraries (jQuery, Bootstrap) Use to isolate and version

    third-party code Use for sharing front-end code between projects Dependency Management
  20. Measure • Collect leading performance indicators • Trend performance indicators

    • Synthetic Performance and RUM • Log JavaScript errors
  21. File size Number of files Total image count Number of

    DOM elements Performance Indicators
  22. Measure • Collect leading performance indicators • Trend performance indicators

    • Synthetic Performance and RUM • Log JavaScript errors
  23. Measure • Collect leading performance indicators • Trend performance indicators

    • Synthetic Performance and RUM • Log JavaScript errors
  24. Measure • Collect leading performance indicators • Trend performance indicators

    • Synthetic Performance and RUM • Log JavaScript errors