SlideShare a Scribd company logo
Holger Bartel | @foobartel | CodeaholicsHK April 2015 Meetup
FRONT END TOOLING



PERFORMANCE
🚀
FOR/AND
FRONT END
DEVELOPMENT IS
EASY!
http://en.wikipedia.org/wiki/Tightrope_walking
FRONT END
DEVELOPMENT IS
EASY!
OK, MAYBE LOOKS
EASY…
OK, MAYBE LOOKS
EASY…
MAN ON WIRE
“It’s Damn Hard!”
– Charis Rooda
TURNS OUT…
MOST OF THE TIME YOU’LL NEED
MORE THAN JUST 3 INGREDIENTS
TO COOK A GREAT MEAL
MOST OF THE TIME YOU’LL NEED
MORE THAN JUST 3 INGREDIENTS
TO COOK A GREAT MEAL
TODAY, FRONT END
DEVELOPMENT SEEMS MORE LIKE
A HUGE BUFFET
TODAY, FRONT END
DEVELOPMENT SEEMS MORE LIKE
A HUGE BUFFET
THE BACKSTORY
SF BAY GUARDIAN, 2003
Front End Tooling and Performance - Codeaholics HK 2015
DELIVERING THE GOODS
IN UNDER 1000MS
https://www.youtube.com/watch?v=E5lZ12Z889k
🚀
Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015
Built with Foundation 5
Uses jQuery, jQuery UI, Vanilla JS

& Grunt
MISSEDIN-HKG.COM
CSS File Size: 88Kb
JS File Size: 213Kb
Total Size: 559Kb
DEVELOPMENT
CSS File Size: 3.8Kb
JS File Size: 54.3Kb
Total Size: 132Kb
PRODUCTION
TAMING FRAMEWORK
OVERHEAD
USING FRAMEWORKS IS OK
B
KILL THE LAZY
DEVELOPER IN YOU…
CSS SPRING CLEANING
YOU WANT TO AVOID THIS: 

15.689 UNUSED RULES
BETTER: 811 UNUSED RULES
HAPPY: 55 UNUSED RULES
Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015
SO, HOW DO WE GET
THERE?
TOOLING
GRUNT
JAVASCRIPT TASK
RUNNER
http://www.gruntjs.com
GRUNT-UNCSS
Remove unused CSS rules
 	
  uncss:	
  {	
  
	
  	
  	
  	
  	
  	
  dist:	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  options:	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  //	
  ignore:	
  ['.active',	
  '.alert-­‐box']	
  
	
  	
  	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  	
  	
  files:	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'css/app.un.css':	
  ['index.html',	
  'readpost.php',	
  'uncss.html']	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  }
GRUNT-PROCESSHTML
Modify HTML files at build time
 	
  <!-­‐-­‐	
  build:js	
  js/app.min.js	
  -­‐-­‐>	
  
	
  	
  	
  	
  <script	
  src="bower_components/jquery/dist/jquery.min.js"></script>	
  
	
  	
  	
  	
  <script	
  src="js/jquery.validate.js"></script>	
  
	
  	
  	
  	
  <script	
  src="js/fastclick.js"></script>	
  
	
  	
  	
  	
  <script	
  src="js/app.js"	
  async></script>	
  
	
  	
  	
  	
  <script	
  src="js/main.js"></script>	
  
	
  	
  <!-­‐-­‐	
  /build	
  -­‐-­‐>
GRUNT-CONTRIB-UGLIFY
Minify files
GRUNT-CONTRIB-CSSMIN
Minify CSS files
This task needs to run a er UnCSS,
otherwise it will un-minify the CSS again.
 	
  cssmin:	
  {	
  
	
  	
  	
  	
  	
  	
  add_banner:	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  options:	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  banner:	
  '/*	
  Minified	
  CSS	
  for	
  a	
  happy	
  day!	
  */'	
  
	
  	
  	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  	
  	
  files:	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'dist/css/app.min.css':	
  ['css/app.un.css'],	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'css/app.min.css':	
  ['css/app.un.css']	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  }
GRUNT-STRING-REPLACE
Find & Replace Text
 	
  'string-­‐replace':	
  {	
  
	
  	
  	
  	
  	
  	
  inline:	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  files:	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'dist/index.html':	
  'dist/index.html',	
  
	
  	
  	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  	
  	
  options:	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  replacements:	
  [	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  pattern:	
  '<script	
  src="js/app.min.js"></script>',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  replacement:	
  '<script	
  src="js/app.min.js"	
  async></script>'	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  ]	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  }
GRUNT-IMAGEOPTIM
<img	
  alt="Missed	
  in	
  HKG"	
  
src=“data:image/svg
+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3
dy53My5vcmcvMjAwMC9z…
41IDEuMiA4LjcgMjIuNCAyMi40LTguNyAxLjItMC
41QzQ5MC43IDkwLjYgNDkzLjggODMuNyA0OTEuNC
A3Ny41eiIvPjwvc3ZnPg==“>
SAVINGS OVER PNG: 15KB
GRUNT-CRITICALCSS
Extract the Above the Fold CSS for your page
http://www.perf.rocks
ENABLE GZIP IN .HTACCESS
https://h5bp.github.io
PERFORMANCE TESTING
http://www.webpagetest.org
http://tools.pingdom.com/fpt/
https://developers.google.com/speed/pagespeed/
https://developer.yahoo.com/yslow/
THANKS!
Holger Bartel | @foobartel | CodeaholicsHK April 2015 Meetup
@foobartel
h@foobartel.com

More Related Content

PDF
Modern Front-End Development
PDF
Front End Development - Beyond Javascript (Robin Cannon)
PPTX
Basics of Front End Web Dev PowerPoint
PDF
A modern front end development workflow for Magnolia at Atlassian
PPTX
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
KEY
What is Object Oriented CSS?
PDF
How to use CSS3 in WordPress
PDF
Responsive Web Design: Clever Tips and Techniques
Modern Front-End Development
Front End Development - Beyond Javascript (Robin Cannon)
Basics of Front End Web Dev PowerPoint
A modern front end development workflow for Magnolia at Atlassian
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
What is Object Oriented CSS?
How to use CSS3 in WordPress
Responsive Web Design: Clever Tips and Techniques

What's hot (20)

PDF
Lightning fast sass
PDF
PPTX
BOOM Performance
PDF
LESS
PPT
Joomla wireframing Template - Joomladay Netherlands 2014 #jd14nl
PDF
Responsive Websites
PPTX
PDF
Decoupling the Front-end with Modular CSS
KEY
JavaScript For People Who Don't Code
PPT
WordPress theme frameworks
PDF
Test-proof CSS
PDF
Bootstrap Workout 2015
PDF
CSS Lessons Learned the Hard Way (Generate Conf)
KEY
The Fast And The Fabulous
PDF
Atomic Design - An Event Apart San Diego
PDF
HTML5, the new buzzword
PDF
Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015
PDF
Teams, styles and scalable applications
PDF
Html for beginners
PDF
OOCSS Lightening Talk
Lightning fast sass
BOOM Performance
LESS
Joomla wireframing Template - Joomladay Netherlands 2014 #jd14nl
Responsive Websites
Decoupling the Front-end with Modular CSS
JavaScript For People Who Don't Code
WordPress theme frameworks
Test-proof CSS
Bootstrap Workout 2015
CSS Lessons Learned the Hard Way (Generate Conf)
The Fast And The Fabulous
Atomic Design - An Event Apart San Diego
HTML5, the new buzzword
Scott Jehl - Delivering Responsibly - beyond tellerrand Düsseldorf 2015
Teams, styles and scalable applications
Html for beginners
OOCSS Lightening Talk
Ad

Viewers also liked (20)

PDF
User eXperience & Front End Development
PDF
Frontend automation and stability
PDF
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
PDF
Frontend SPOF
PPTX
Front end Tips Tricks & Tools
PDF
Sinau Bareng Frontend Web Development @ DiLo Malang
PDF
Architecting your Frontend
PDF
建立前端开发团队 (Front-end Development Environment)
PDF
Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas
PDF
Wrangling Large Scale Frontend Web Applications
PDF
How to Build Front-End Web Apps that Scale - FutureJS
PPTX
Frontend technologies
PPTX
W3 conf hill-html5-security-realities
PDF
Frontend at Scale - The Tumblr Story
PPTX
Modern Frontend Technology
PDF
TechTalk #85 : Latest Frontend Technologies
PDF
Front End Development Workflow Tools
PDF
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
PDF
engage 2015 - Domino App Development - Where should I go now?
PDF
Modern front end development
User eXperience & Front End Development
Frontend automation and stability
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Frontend SPOF
Front end Tips Tricks & Tools
Sinau Bareng Frontend Web Development @ DiLo Malang
Architecting your Frontend
建立前端开发团队 (Front-end Development Environment)
Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas
Wrangling Large Scale Frontend Web Applications
How to Build Front-End Web Apps that Scale - FutureJS
Frontend technologies
W3 conf hill-html5-security-realities
Frontend at Scale - The Tumblr Story
Modern Frontend Technology
TechTalk #85 : Latest Frontend Technologies
Front End Development Workflow Tools
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
engage 2015 - Domino App Development - Where should I go now?
Modern front end development
Ad

Similar to Front End Tooling and Performance - Codeaholics HK 2015 (20)

PDF
What makes me "Grunt"?
PDF
EnterJS 2015 - Continuous Integration for Frontend Code
PDF
Web development - technologies and tools
PDF
Production Ready Javascript With Grunt
PDF
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
PDF
Get Grulping with JavaScript Task Runners (Matt Gifford)
ODP
What grunt?
PPTX
Improving Workflows With Grunt.js - Big D Design 2014 - Dallas Texas
PDF
Front End Workflow
PDF
Let Grunt do the work, focus on the fun!
PPTX
Frontend Workflow
PDF
Resource Registries: Plone Conference 2014
PDF
Workflow para desenvolvimento Web & Mobile usando grunt.js
PDF
Quest for the Perfect Workflow for McrFRED
PDF
Resource registries plone conf 2014
PDF
Grunt.js and Yeoman, Continous Integration
PDF
Grunt & Front-end Workflow
PDF
Front-End Tooling
PDF
Npm scripts
PDF
Hitchhiker's guide to the front end development
What makes me "Grunt"?
EnterJS 2015 - Continuous Integration for Frontend Code
Web development - technologies and tools
Production Ready Javascript With Grunt
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
Get Grulping with JavaScript Task Runners (Matt Gifford)
What grunt?
Improving Workflows With Grunt.js - Big D Design 2014 - Dallas Texas
Front End Workflow
Let Grunt do the work, focus on the fun!
Frontend Workflow
Resource Registries: Plone Conference 2014
Workflow para desenvolvimento Web & Mobile usando grunt.js
Quest for the Perfect Workflow for McrFRED
Resource registries plone conf 2014
Grunt.js and Yeoman, Continous Integration
Grunt & Front-end Workflow
Front-End Tooling
Npm scripts
Hitchhiker's guide to the front end development

More from Holger Bartel (14)

PDF
The Untold Benefits of Ethical Design - Topconf Tallinn 2018
PDF
The Untold Benefits of Ethical Design - Coldfront 2018, Copenhagen
PDF
The Untold Benefits of Ethical Design - Web Directions Summit 2018, Sydney
PDF
Web Performance in the Age of HTTP2 - Topconf Tallinn 2016 - Holger Bartel
PDF
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
PDF
Form Function Class 6, Manila, Philippines 14/11/2015
PDF
HK CodeConf 2015 - Your WebPerf Sucks
PDF
Building Better Responsive Websites
PDF
Front End Best Practices
PDF
180 Degrees East, SmartDevCon 2013, Katowice, Poland
PDF
180 Degrees East, Webshaped 2013, Helsinki, Finland
PDF
180 Degrees East at Front Trends 2013, Warsaw, Poland
PDF
Open Device Labs for A Better User Experience (Mobilliance, Hong Kong)
PDF
Responsive Web Design & Workflows for Todays Web (THE UX-MEN at The Hive, Hon...
The Untold Benefits of Ethical Design - Topconf Tallinn 2018
The Untold Benefits of Ethical Design - Coldfront 2018, Copenhagen
The Untold Benefits of Ethical Design - Web Directions Summit 2018, Sydney
Web Performance in the Age of HTTP2 - Topconf Tallinn 2016 - Holger Bartel
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Form Function Class 6, Manila, Philippines 14/11/2015
HK CodeConf 2015 - Your WebPerf Sucks
Building Better Responsive Websites
Front End Best Practices
180 Degrees East, SmartDevCon 2013, Katowice, Poland
180 Degrees East, Webshaped 2013, Helsinki, Finland
180 Degrees East at Front Trends 2013, Warsaw, Poland
Open Device Labs for A Better User Experience (Mobilliance, Hong Kong)
Responsive Web Design & Workflows for Todays Web (THE UX-MEN at The Hive, Hon...

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Modernizing your data center with Dell and AMD
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
Cloud computing and distributed systems.
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Big Data Technologies - Introduction.pptx
Modernizing your data center with Dell and AMD
Digital-Transformation-Roadmap-for-Companies.pptx
Approach and Philosophy of On baking technology
Cloud computing and distributed systems.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Review of recent advances in non-invasive hemoglobin estimation
NewMind AI Monthly Chronicles - July 2025
Network Security Unit 5.pdf for BCA BBA.
Chapter 3 Spatial Domain Image Processing.pdf
A Presentation on Artificial Intelligence
Encapsulation_ Review paper, used for researhc scholars
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Understanding_Digital_Forensics_Presentation.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Unlocking AI with Model Context Protocol (MCP)
NewMind AI Weekly Chronicles - August'25 Week I
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Front End Tooling and Performance - Codeaholics HK 2015