SlideShare a Scribd company logo
Webpack and Web
Performance Optimization
Blackie.Tsai
Blackie.tsai@xuenn.com
2016/11/18
Agenda
• Webpack Introduction
• Web Optimization
• Modularized Javascript and React
• Collaborate with .net MVC
Webpack Introduction
• Today’s Web Apps Trendy
• More and more JavaScript is being used.
• Modern browsers are offering a wider range of interfaces.
• Fewer full page reloads → even more code in a page
• As a result there is a lot of code on the client side! A big code base
needs to be organized. Module systems offer the option to split your
code base into modules
Current problems
Webpack - A Module Bundler
• A bundler for javascript and friends. Packs many modules into a few
bundled assets. Code Splitting allows to load parts for the
application on demand. Through "loaders," modules can be
CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript,
LESS, ... and your custom stuff. https://webpack.github.io
• Usage: https://webpack.github.io/docs/tutorials/getting-started/
Goals
• Split the dependency tree into chunks loaded on demand
• Keep initial loading time low
• Every static asset should be able to be a module
• Ability to integrate 3rd-party libraries as modules
• Ability to customize nearly every part of the module bundler
• Suited for big projects
Features
• Code Splitting
• allows you to split your codebase into multiple chunks. Chunks are loaded asynchronously at
runtime. This reduces the initial loading time.
• Optimizations
• can do many optimizations to reduce the output size of your JavaScript by de-duplicating
frequently used modules, minifying, and giving you full control of what is loaded initially and
what is loaded at runtime through code splitting.
• Loaders
• enables use of loaders to preprocess files. This allows you to bundle any static resource way
beyond JavaScript. You can easily write your own loaders using node.js.
• Module Format (AMD/CommonJS)
• supports both AMD and CommonJS module styles.
• Plug-in System
• webpack features a rich plugin system and allows you to customize
Webpack flow
Loader
• Loaders allow you to preprocess files as you require() or “load”
them.
• Loaders are kind of like “tasks” in other build tools, and provide
a powerful way to handle frontend build steps.
• Loaders can transform files from a different language like,
CoffeeScript to JavaScript, or inline images as data URLs.
• Loaders even allow you to do things like require() css files right in
your JavaScript! You can import other Loaders to help you.
• E.g. CSS-LOADER, IMAGE LOADER, BUNDLE-LOADER
Loader - Sample
• Webpack transform a module with a loader
• ! syntax separating the loader from the module path? Loaders, like modules
can also be specified with a relative path (as if you were requiring it) instead
of the loader name
• Chained together by separating loaders with the !
• Loaders with Parameters
• loaders by config
var moduleWithOneLoader = require("my-loader!./my-awesome-module");
var moduleWithLoaders = require("style-loader!css-loader!less-loader!./my-styles.less");
var moduleWithLoaderHasParameters = require("loader?with=parameter!./file");
{
module: {
loaders: [ { test: /.coffee$/, loader: "coffee-loader" } ],
preLoaders: [ { test: /.coffee$/, loader: "coffee-hint-loader" } ] }
};
Webpack Config File
• entry
• Setup entry file
• output
• Determine output path and file name
• module(optional)
• Setup loaders
Environment Setup
NodeJS
• Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript
engine. Node.js uses an event-driven, non-blocking I/O model that
makes it lightweight and efficient.
• Node.js' package ecosystem, npm, is the largest ecosystem of open
source libraries in the world.
• https://nodejs.org/dist/v4.5.0/node-v4.5.0-x64.msi
• https://nodejs.org/dist/v6.6.0/node-v6.6.0-x64.msi
[NPM]Webpack
• https://www.npmjs.com/package/webpack
• Setup
• Project: npm install webpack --save-dev
• Global: npm install webpack –g
• Common Commands(usually execute with webpack.config.js file)
• webpack:execute one time in dev mode. E.g. webpack main.js bundle.js
• webpack -p: execute for production-ready
• webpack --watch:execute and watch change to execute on background
• webpack --progress --colors: execute with progress bar and colors
[NPM]webpack-notifier
• https://www.npmjs.com/package/webpack-notifier
• npm install --save-dev webpack-notifier
WebPack Task Runner
• https://visualstudiogallery.msdn.microsoft.com/5497fd10-b1ba-
474c-8991-1438ae47012a
Webpack Tutorial
Welcome Webpack
• http://webpack.github.io/docs/tutorials/getting-started/
Web Optimization
• Unoptimized Resource(js, css, images)
• Sites impacted: 90%
• Content Served Without HTTP Compression
• Sites impacted: 72%
• Without Concatenate Resource(js, css or images) to one Request
• Sites impacted: 69%
• Too much HTTP Requests
• Sites impacted: 69%
• Without Caching Information
• Sites impacted: 65%
• Domain Sharding Not Implemented
• Sites impacted: 64%
Top issue for Web Performance
• Image Optimization
• Reduce HTTP Requests
• Minify CSS and Javascript
• Critical Path and Render Blocking Resources (CSS + JS)
• Reduce Latency with a CDN
• Avoid 301 Redirects
• Caching
• Web Font Performance
• Enable Gzip Compression
• Fix 404 Errors
• Serve Scaled Images
Top tips for Web Performance Optimization
Adaptive Web Concept
Header
HTML
iframe
img
media
• CSS, icon and fonts
• Most file can Concatenate
(CSS merge and image sprite )
• Loading first and sequence with blocking
• Body content, JS and other resource
• Bigger file size than Header
• Most file can’t Concatenate
(exclude JS bundle and image sprite )
• Loading/Executing later when read the content with non-blocking
body
Loading JavaScript Dynamically
Delaying Image Loading
• a.k.a Image Lazy Loading
Solution To Lazy Loading SEO Impact
Web Optimize Before Mobile Lite
• Now
• SBK have 15 requests for total 500KB transferred
• 188 have 8 requests for total 600KB transferred
• Action
• Eliminate render-blocking JavaScript and CSS in above-the-fold content
• Less request
• Can improve 40% for latency issue on too many requests, from 23 to 14
• SBK
• Combine JS request
• 188(Brand)
• Combine JS request
• Refine 188(Brand) header/footer for provide less request version for
SBK
Reduce less with low User impact
• Changes
• General
• No image(jpg, png and gif) file
• Use CSS, Font(include icon) and HTML
• Only one kind of font for Mobile Lite(Only Lato-Regular, no Lato-Bold)
• Pagination for Today
• Homepage
• No image on each feature event
• All Market
• Score Board with simple background color
• Estimated improvement
• Reduce 4 request
• Reduce 180 KB
Reduce more but high User impact
• Changes
• General
• No Auto refresh, using manually refresh(e.g. can click every 30s)
• All Market
• No Live Center(5 sec auto-refresh with 2.5 KB=>1 min with 30KB)
• Estimated improvement
• Reduce 1 request
• Reduce 20 KB(exclude Live Center)
Cut function but Company impact
• Changes
• Homepage
• Only display 1st feature event
• Only display top N priority sports events
• Main Odds
• Only display top N priority competition event
• All Market
• Display predefine priority markets only
• Estimated improvement
• Reduce 50 KB
Comparison
Original Web Optimized Low User Impact High User Impact Company Impact
Request 23 14 10 9 9
Transferred size(KB) 1, 100 1,100 920 930 880
Play with Gulp
Gulp
Gulp is a Task Runner build by JavaScript to
help automation. The less work you have to
do when performing repetitive tasks like
minification, compilation, unit testing,
linting, etc. After you've configured it
through a Gulpfile, a task runner can do
most of that mundane work for team
•Minify JavaScript, CSS files
•Combine JavaScript, CSS files(including
compile Sass and Less) and Image
Sprites
•Testing
•Format or Code Rule check
Development Flow - Developing
• Integrate with Visual Studio with Task Runner Explorer, Gulp for VS
• Help doing below task when ITC doing developing
• Concatenation and minifying
• Compile SASS file to CSS file on runtime
• Testing minify JavaScript, CSS files
• Testing combine JavaScript, CSS files(Sass and Less) and Image Sprites
• Validate front-end coding rule
Gulp Plugin
• gulp-concat:file concatenate
• gulp-minify-css: CSS minifying
• gulp-uglify: Compressed Javascript(Can replace by Webpack)
• gulp-rename:File rename
• gulp-html-replace :Replace target source path
• gulp-minify-html : Compressed HTML
• Ref
• http://www.oxxostudio.tw/articles/201503/gulp-2-compress-js-css.html
• http://www.oxxostudio.tw/articles/201503/gulp-3-compress-html.html
Integrate with Webpack
• With webpack-stream (not recommened)
• https://github.com/shama/webpack-stream
• Run webpack as a stream to conveniently integrate with gulp.
• Big issue=>gulp & webpack整合,鱼与熊掌我都要!
• Without webpack-stream
• https://webpack.github.io/docs/usage-with-gulp.html
var gulp = require("gulp");
var gutil = require("gulp-util");
var webpack = require("webpack");
var WebpackDevServer = require("webpack-dev-server");
gulp.task("webpack", function(callback) {
// run webpack
webpack({
// configuration
}, function(err, stats) {
if(err) throw new gutil.PluginError("webpack", err);
gutil.log("[webpack]", stats.toString({
// output options
}));
callback();
});
});
Development Flow – Build and Release
• Gulp help doing below task
• Compile SASS file to CSS file
• Minify JavaScript, CSS, HTML files(Release version)
• Concatenate JavaScript, CSS files(including compile Sass and Less) and Image
Sprites(Release version)
• [Optional]Generate Format or Code Rule report
• [Optional]Generate Front-end test report
• Jenkins help doing below task
• Trigger Grunt to build Release version
• Build and Release DEV(daily)
• Validate Unit test
• Validate Integration test
• Validate Automation test(Selenium)
• Validate Web performance test(YSlow, Phantomjs or etc…)
• Build and Release QAT
• Prepare UAT release package
• Aggregate and Sent release report
• General
• Avoid 301 Redirects
• Fix All 404 Errors
• Loading Resources On-demand
• Avoid Render Blocking
• Static content optimize
• Concatenate(CSS merge、JS bundle、image sprite )
• Compression(gzip、minify, image compression)
• Request optimize
• CDN
• Front-end Cache
• Request Tuning and Combine
• Domain Sharding
Web Optimize
Modularized JavaScript
and React
Modularized JavaScript
• Pros
• Encapsulation
• Decoupling
• Organization
• No global scope pollution
• Security
• Re-use
• Cons
• More difficult to release
• Complex dependency
Thinking in React
ReactJS+Webpack Structure
Babel Introdcution
Babel - A Tool to convert ES6 to ES5
• A Tool to convert ES6 to ES5
• Babel is the most popular tool used to convert ES6 to ES5. It has
various interfaces like a CLI, Node-module and also an online
converter. I use the node module for my apps and use theonline
version to quickly see the differences.
• Why ES6
• 5 JavaScript “Bad” Parts That Are Fixed In ES6
• Modularized for React, Babel can convert JSX syntax and strip out type
annotations.
Webpack+Babel+React
Grunt/Gulp for React
• Not all browsers are supporting ES6 yet, so we're going to have to
transpile our ES6 code, turning it into ES5. We're also going to have
to handle 'JSX', the special Javascript that we can use for React. We
also need to play well with existing code.
Webpack for React
• Webpack is a bundler. It'll take a bunch of loose Javascript files and
build a single file from the lot
Webpack+Babel for React
• Even better, we can configure webpack to run files that match a
certain pattern to go through other 'loaders', which can process the
files further.
• We can use the Babel transpiler to turn an ES6 file to ES5. We just
need the glue to let Webpack use Babel as a loader. That comes in
the form of the Babel Loader:
Babel-loader
• This package allows transpiling JavaScript files using Babel and
webpack. https://github.com/babel/babel-loader
Dependency
• React uses JSX as the XML-like syntax extension over JavaScript to
specify component tree structure, data flow, and event handlers. JSX
is processed by Webpack module bundler using specific loaders or
convertors.
Environment Setup
Visual Studio 2015 with latest update
• https://blogs.msdn.microsoft.com/visualstudio/2015/06/10/javas
cript-editor-improvements-in-visual-studio-2015/
• https://www.visualstudio.com/en-us/news/vs2015-update1-
vs.aspx
• React's JSX is now natively supported
• ECMAScript 2015 (formerly ECMAScript 6) support
React Snippet Pack
• https://visualstudiogallery.msdn.microsoft.com/234d79e9-f0fd-
41e1-a926-850da8e8c7d7
Collaborate with .net
MVC
• Demo Download
• Original post : detail of how to setup up front-end in asp.net core
and MVC5, sample is clone from AspNetReactSamples
• Setup
• Install node and NPM
• Go to root directory and use NPM to install js dependency
• npm install
• Build with install nuget dependency
• Run App
Demo
Project Structure
package.json
Layout and View
ES6 to ES5(using Babel)
Advance Webpack
Reference
• 設定開發React的環境
• 設定開發React的環境 - React Hot Loader
• Production optimization with React and Webpack
Q & A
11F., No.399, Ruiguang Rd., Neihu Dist., Taipei City 114, Taiwan
TEL: +886 2 2798 8529 Fax: +886 2 2798 8531 Website : www.xuenn.com
THANK YOU!
Reference
• WEBPACK入門教學筆記
• 18 Tips for Website Performance Optimization
• Performance Guide for Tizen Web Applications(1): Resource Loading
• How-To: Integrate Webpack into Visual Studio 2015
• webpack-howto
• Pro React : Appendix A: Webpack for React
• 如何使用 Webpack 模組整合工具
• Webpack: your final module bundler
• Getting Started with React & ES6
• React Speed Coding
• Parallel Downloads Across Domains
• dependencies are installed on both:
• npm install from a directory that contains package.json
• npm install $package on any other directory
• devDependencies are:
• also installed on npm install on a directory that contains package.json, unless
you pass the --production flag
• not installed on npm install "$package" on any other directory, unless you
give it the --dev option.
• are not installed transitively.
• Most important
• dependencies are required to run, devDependencies only to develop, e.g.:
unit tests, Coffeescript to Javascript transpilation, minification, ...
[NPM] dependencies and devDependencies

More Related Content

What's hot

Lecture: Webpack 4
Lecture: Webpack 4Lecture: Webpack 4
Lecture: Webpack 4
Sergei Iastrebov
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack Introduction
Anjali Chawla
 
Webpack: your final module bundler
Webpack: your final module bundlerWebpack: your final module bundler
Webpack: your final module bundler
Andrea Giannantonio
 
Webpack
WebpackWebpack
Webpack
Anjali Chawla
 
Webpack: from 0 to 2
Webpack: from 0 to 2Webpack: from 0 to 2
Webpack: from 0 to 2
Alessandro Bellini
 
An Intro into webpack
An Intro into webpackAn Intro into webpack
An Intro into webpack
Squash Apps Pvt Ltd
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPress
Rami Sayar
 
Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4
Vijay Shukla
 
Webpack
Webpack Webpack
Webpack
DataArt
 
WordPress development checklist
WordPress development checklistWordPress development checklist
WordPress development checklist
Binh Quan Duc
 
Webpack DevTalk
Webpack DevTalkWebpack DevTalk
Webpack DevTalk
Alessandro Bellini
 
002. Working with Webpack
002. Working with Webpack002. Working with Webpack
002. Working with Webpack
Binh Quan Duc
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhone
Alexandru Badiu
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
Jason Casden
 
Front-end build tools - Webpack
Front-end build tools - WebpackFront-end build tools - Webpack
Front-end build tools - Webpack
Razvan Rosu
 
Webpack Tutorial, Uppsala JS
Webpack Tutorial, Uppsala JSWebpack Tutorial, Uppsala JS
Webpack Tutorial, Uppsala JS
Emil Öberg
 
Node.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseNode.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash Course
Aaron Silverman
 
Bower & Grunt - A practical workflow
Bower & Grunt - A practical workflowBower & Grunt - A practical workflow
Bower & Grunt - A practical workflow
Riccardo Coppola
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web Development
Irfan Maulana
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
Squash Apps Pvt Ltd
 

What's hot (20)

Lecture: Webpack 4
Lecture: Webpack 4Lecture: Webpack 4
Lecture: Webpack 4
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack Introduction
 
Webpack: your final module bundler
Webpack: your final module bundlerWebpack: your final module bundler
Webpack: your final module bundler
 
Webpack
WebpackWebpack
Webpack
 
Webpack: from 0 to 2
Webpack: from 0 to 2Webpack: from 0 to 2
Webpack: from 0 to 2
 
An Intro into webpack
An Intro into webpackAn Intro into webpack
An Intro into webpack
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPress
 
Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4
 
Webpack
Webpack Webpack
Webpack
 
WordPress development checklist
WordPress development checklistWordPress development checklist
WordPress development checklist
 
Webpack DevTalk
Webpack DevTalkWebpack DevTalk
Webpack DevTalk
 
002. Working with Webpack
002. Working with Webpack002. Working with Webpack
002. Working with Webpack
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhone
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
 
Front-end build tools - Webpack
Front-end build tools - WebpackFront-end build tools - Webpack
Front-end build tools - Webpack
 
Webpack Tutorial, Uppsala JS
Webpack Tutorial, Uppsala JSWebpack Tutorial, Uppsala JS
Webpack Tutorial, Uppsala JS
 
Node.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseNode.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash Course
 
Bower & Grunt - A practical workflow
Bower & Grunt - A practical workflowBower & Grunt - A practical workflow
Bower & Grunt - A practical workflow
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web Development
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
 

Viewers also liked

Website Auto scraping with Autoit and .Net HttpRequest
Website Auto scraping with Autoit and .Net HttpRequestWebsite Auto scraping with Autoit and .Net HttpRequest
Website Auto scraping with Autoit and .Net HttpRequest
Chen-Tien Tsai
 
webpack 入門
webpack 入門webpack 入門
webpack 入門
Anna Su
 
Advanced webpack
Advanced webpackAdvanced webpack
Advanced webpack
MinJeong Kim
 
Warsaw Frontend Meetup #1 - Webpack
Warsaw Frontend Meetup #1 - WebpackWarsaw Frontend Meetup #1 - Webpack
Warsaw Frontend Meetup #1 - Webpack
Radosław Rosłaniec
 
Ramda, a functional JavaScript library
Ramda, a functional JavaScript libraryRamda, a functional JavaScript library
Ramda, a functional JavaScript library
Derek Willian Stavis
 
Packing it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to nowPacking it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to now
Derek Willian Stavis
 
Firmablogging - hvorfor
Firmablogging - hvorforFirmablogging - hvorfor
Firmablogging - hvorfor
Thor Fredrik Eie
 
La Persona Ante El Cosmos I
La Persona Ante El Cosmos ILa Persona Ante El Cosmos I
La Persona Ante El Cosmos I
zarasala
 
LBC newsletter issue 11
LBC newsletter issue 11LBC newsletter issue 11
LBC newsletter issue 11
Martin Wilesmith
 
Mobile only by google Breaking Mobile 2015
Mobile only by google Breaking Mobile 2015Mobile only by google Breaking Mobile 2015
Mobile only by google Breaking Mobile 2015
Mobile Marketing Association
 
Presentación ympacto+
Presentación ympacto+Presentación ympacto+
Presentación ympacto+
Santiago Clement
 
Reducing IT Complexity to Accelerate Digital Business
Reducing IT Complexity to Accelerate Digital BusinessReducing IT Complexity to Accelerate Digital Business
Reducing IT Complexity to Accelerate Digital Business
Cognizant
 
CONECTATE 105: VEJEZ, CIELO
CONECTATE 105: VEJEZ, CIELOCONECTATE 105: VEJEZ, CIELO
CONECTATE 105: VEJEZ, CIELO
Audioconéctate.org / Home
 
Node-webkit
Node-webkitNode-webkit
Node-webkit
Jose Gratereaux
 
About us
About usAbout us
Comunicación para el éxito. Taller de Oratoria 2014 con @Matytchey y @AvanzaSf
Comunicación para el éxito. Taller de Oratoria 2014 con @Matytchey y @AvanzaSfComunicación para el éxito. Taller de Oratoria 2014 con @Matytchey y @AvanzaSf
Comunicación para el éxito. Taller de Oratoria 2014 con @Matytchey y @AvanzaSf
AvanzaSf
 
El Mensajero Del Sol 70 1
El  Mensajero Del  Sol 70 1El  Mensajero Del  Sol 70 1
El Mensajero Del Sol 70 1
José Angel Alvarez Quiñones
 
Ri casipe bajo
Ri casipe bajoRi casipe bajo
Ri casipe bajo
MILTON CARRERA FLORIAN
 
Practical Contract Law Understanding & Drafting Contracts for Non-Lawyers
Practical Contract Law Understanding & Drafting Contracts for Non-LawyersPractical Contract Law Understanding & Drafting Contracts for Non-Lawyers
Practical Contract Law Understanding & Drafting Contracts for Non-Lawyers
rockporshe
 

Viewers also liked (19)

Website Auto scraping with Autoit and .Net HttpRequest
Website Auto scraping with Autoit and .Net HttpRequestWebsite Auto scraping with Autoit and .Net HttpRequest
Website Auto scraping with Autoit and .Net HttpRequest
 
webpack 入門
webpack 入門webpack 入門
webpack 入門
 
Advanced webpack
Advanced webpackAdvanced webpack
Advanced webpack
 
Warsaw Frontend Meetup #1 - Webpack
Warsaw Frontend Meetup #1 - WebpackWarsaw Frontend Meetup #1 - Webpack
Warsaw Frontend Meetup #1 - Webpack
 
Ramda, a functional JavaScript library
Ramda, a functional JavaScript libraryRamda, a functional JavaScript library
Ramda, a functional JavaScript library
 
Packing it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to nowPacking it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to now
 
Firmablogging - hvorfor
Firmablogging - hvorforFirmablogging - hvorfor
Firmablogging - hvorfor
 
La Persona Ante El Cosmos I
La Persona Ante El Cosmos ILa Persona Ante El Cosmos I
La Persona Ante El Cosmos I
 
LBC newsletter issue 11
LBC newsletter issue 11LBC newsletter issue 11
LBC newsletter issue 11
 
Mobile only by google Breaking Mobile 2015
Mobile only by google Breaking Mobile 2015Mobile only by google Breaking Mobile 2015
Mobile only by google Breaking Mobile 2015
 
Presentación ympacto+
Presentación ympacto+Presentación ympacto+
Presentación ympacto+
 
Reducing IT Complexity to Accelerate Digital Business
Reducing IT Complexity to Accelerate Digital BusinessReducing IT Complexity to Accelerate Digital Business
Reducing IT Complexity to Accelerate Digital Business
 
CONECTATE 105: VEJEZ, CIELO
CONECTATE 105: VEJEZ, CIELOCONECTATE 105: VEJEZ, CIELO
CONECTATE 105: VEJEZ, CIELO
 
Node-webkit
Node-webkitNode-webkit
Node-webkit
 
About us
About usAbout us
About us
 
Comunicación para el éxito. Taller de Oratoria 2014 con @Matytchey y @AvanzaSf
Comunicación para el éxito. Taller de Oratoria 2014 con @Matytchey y @AvanzaSfComunicación para el éxito. Taller de Oratoria 2014 con @Matytchey y @AvanzaSf
Comunicación para el éxito. Taller de Oratoria 2014 con @Matytchey y @AvanzaSf
 
El Mensajero Del Sol 70 1
El  Mensajero Del  Sol 70 1El  Mensajero Del  Sol 70 1
El Mensajero Del Sol 70 1
 
Ri casipe bajo
Ri casipe bajoRi casipe bajo
Ri casipe bajo
 
Practical Contract Law Understanding & Drafting Contracts for Non-Lawyers
Practical Contract Law Understanding & Drafting Contracts for Non-LawyersPractical Contract Law Understanding & Drafting Contracts for Non-Lawyers
Practical Contract Law Understanding & Drafting Contracts for Non-Lawyers
 

Similar to Webpack and Web Performance Optimization

DrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtDrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an Afterthought
Nick Santamaria
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
Ryan Cuprak
 
Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0
Morten Rand-Hendriksen
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Conference
 
Building JavaScript
Building JavaScriptBuilding JavaScript
Building JavaScript
Brady Clifford
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script Applications
Fabian Jakobs
 
Building a website without a webserver on Azure
Building a website without a webserver on AzureBuilding a website without a webserver on Azure
Building a website without a webserver on Azure
Todd Whitehead
 
Website optimization with request reduce
Website optimization with request reduceWebsite optimization with request reduce
Website optimization with request reduce
Matt Wrock
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overview
Diacode
 
Improve your web dev workflow in Visual Studio
Improve your web dev workflow in Visual StudioImprove your web dev workflow in Visual Studio
Improve your web dev workflow in Visual Studio
David Paquette
 
ASP.NET Scalability - DDD7
ASP.NET Scalability - DDD7ASP.NET Scalability - DDD7
ASP.NET Scalability - DDD7
Phil Pursglove
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an Overview
Matt Weaver
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1
asim78
 
Static Site Generation with Hugo and Markdown
Static Site Generation with Hugo and MarkdownStatic Site Generation with Hugo and Markdown
Static Site Generation with Hugo and Markdown
Nic Raboy
 
ASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG LondonASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG London
Phil Pursglove
 
Static Site Generators - Developing Websites in Low-resource Condition
Static Site Generators - Developing Websites in Low-resource ConditionStatic Site Generators - Developing Websites in Low-resource Condition
Static Site Generators - Developing Websites in Low-resource Condition
IWMW
 
Short-Training asp.net vNext
Short-Training asp.net vNextShort-Training asp.net vNext
Short-Training asp.net vNext
Betclic Everest Group Tech Team
 
Enterprise WordPress - Performance, Scalability and Redundancy
Enterprise WordPress - Performance, Scalability and RedundancyEnterprise WordPress - Performance, Scalability and Redundancy
Enterprise WordPress - Performance, Scalability and Redundancy
John Giaconia
 
performance.ppt
performance.pptperformance.ppt
performance.ppt
fakeaccount225095
 
Back to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static websiteBack to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static website
Yves Goeleven
 

Similar to Webpack and Web Performance Optimization (20)

DrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtDrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an Afterthought
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
 
Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
 
Building JavaScript
Building JavaScriptBuilding JavaScript
Building JavaScript
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script Applications
 
Building a website without a webserver on Azure
Building a website without a webserver on AzureBuilding a website without a webserver on Azure
Building a website without a webserver on Azure
 
Website optimization with request reduce
Website optimization with request reduceWebsite optimization with request reduce
Website optimization with request reduce
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overview
 
Improve your web dev workflow in Visual Studio
Improve your web dev workflow in Visual StudioImprove your web dev workflow in Visual Studio
Improve your web dev workflow in Visual Studio
 
ASP.NET Scalability - DDD7
ASP.NET Scalability - DDD7ASP.NET Scalability - DDD7
ASP.NET Scalability - DDD7
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an Overview
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1
 
Static Site Generation with Hugo and Markdown
Static Site Generation with Hugo and MarkdownStatic Site Generation with Hugo and Markdown
Static Site Generation with Hugo and Markdown
 
ASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG LondonASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG London
 
Static Site Generators - Developing Websites in Low-resource Condition
Static Site Generators - Developing Websites in Low-resource ConditionStatic Site Generators - Developing Websites in Low-resource Condition
Static Site Generators - Developing Websites in Low-resource Condition
 
Short-Training asp.net vNext
Short-Training asp.net vNextShort-Training asp.net vNext
Short-Training asp.net vNext
 
Enterprise WordPress - Performance, Scalability and Redundancy
Enterprise WordPress - Performance, Scalability and RedundancyEnterprise WordPress - Performance, Scalability and Redundancy
Enterprise WordPress - Performance, Scalability and Redundancy
 
performance.ppt
performance.pptperformance.ppt
performance.ppt
 
Back to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static websiteBack to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static website
 

More from Chen-Tien Tsai

關於軟體工程師職涯的那些事
關於軟體工程師職涯的那些事關於軟體工程師職涯的那些事
關於軟體工程師職涯的那些事
Chen-Tien Tsai
 
Artifacts management with CI and CD
Artifacts management with CI and CDArtifacts management with CI and CD
Artifacts management with CI and CD
Chen-Tien Tsai
 
.NET Security Application/Web Development - Part IV
.NET Security Application/Web Development - Part IV.NET Security Application/Web Development - Part IV
.NET Security Application/Web Development - Part IV
Chen-Tien Tsai
 
.NET Security Application/Web Development - Part III
.NET Security Application/Web Development - Part III.NET Security Application/Web Development - Part III
.NET Security Application/Web Development - Part III
Chen-Tien Tsai
 
.NET Security Application/Web Development - Part II
.NET Security Application/Web Development - Part II.NET Security Application/Web Development - Part II
.NET Security Application/Web Development - Part II
Chen-Tien Tsai
 
.NET Security Application/Web Development - Part I
.NET Security Application/Web Development - Part I.NET Security Application/Web Development - Part I
.NET Security Application/Web Development - Part I
Chen-Tien Tsai
 
.NET Security Application/Web Development - Overview
.NET Security Application/Web Development - Overview.NET Security Application/Web Development - Overview
.NET Security Application/Web Development - Overview
Chen-Tien Tsai
 
Designing distributedsystems cht6
Designing distributedsystems cht6Designing distributedsystems cht6
Designing distributedsystems cht6
Chen-Tien Tsai
 
Reactive application with akka.NET & .NET Core
Reactive application with akka.NET & .NET CoreReactive application with akka.NET & .NET Core
Reactive application with akka.NET & .NET Core
Chen-Tien Tsai
 
The Cloud - What's different
The Cloud - What's differentThe Cloud - What's different
The Cloud - What's different
Chen-Tien Tsai
 
How to be a professional speaker
How to be a professional speakerHow to be a professional speaker
How to be a professional speaker
Chen-Tien Tsai
 
Agile tutorial
Agile tutorialAgile tutorial
Agile tutorial
Chen-Tien Tsai
 
響應式程式開發之 .NET Core 應用 
響應式程式開發之 .NET Core 應用 響應式程式開發之 .NET Core 應用 
響應式程式開發之 .NET Core 應用 
Chen-Tien Tsai
 
Artifacts management with DevOps
Artifacts management with DevOpsArtifacts management with DevOps
Artifacts management with DevOps
Chen-Tien Tsai
 
Web optimization with service woker
Web optimization with service wokerWeb optimization with service woker
Web optimization with service woker
Chen-Tien Tsai
 
GCPUG.TW Meetup #25 - ASP.NET Core with GCP
GCPUG.TW Meetup #25 - ASP.NET Core with GCPGCPUG.TW Meetup #25 - ASP.NET Core with GCP
GCPUG.TW Meetup #25 - ASP.NET Core with GCP
Chen-Tien Tsai
 
.NET Study Group - ASP.NET Core with GCP
.NET Study Group - ASP.NET Core with GCP.NET Study Group - ASP.NET Core with GCP
.NET Study Group - ASP.NET Core with GCP
Chen-Tien Tsai
 
C# 2 to 5 short Introduction
C# 2 to 5 short IntroductionC# 2 to 5 short Introduction
C# 2 to 5 short Introduction
Chen-Tien Tsai
 
Docker - fundamental
Docker  - fundamentalDocker  - fundamental
Docker - fundamental
Chen-Tien Tsai
 
DevOps for dummies study sharing - part II
DevOps for dummies study sharing - part IIDevOps for dummies study sharing - part II
DevOps for dummies study sharing - part II
Chen-Tien Tsai
 

More from Chen-Tien Tsai (20)

關於軟體工程師職涯的那些事
關於軟體工程師職涯的那些事關於軟體工程師職涯的那些事
關於軟體工程師職涯的那些事
 
Artifacts management with CI and CD
Artifacts management with CI and CDArtifacts management with CI and CD
Artifacts management with CI and CD
 
.NET Security Application/Web Development - Part IV
.NET Security Application/Web Development - Part IV.NET Security Application/Web Development - Part IV
.NET Security Application/Web Development - Part IV
 
.NET Security Application/Web Development - Part III
.NET Security Application/Web Development - Part III.NET Security Application/Web Development - Part III
.NET Security Application/Web Development - Part III
 
.NET Security Application/Web Development - Part II
.NET Security Application/Web Development - Part II.NET Security Application/Web Development - Part II
.NET Security Application/Web Development - Part II
 
.NET Security Application/Web Development - Part I
.NET Security Application/Web Development - Part I.NET Security Application/Web Development - Part I
.NET Security Application/Web Development - Part I
 
.NET Security Application/Web Development - Overview
.NET Security Application/Web Development - Overview.NET Security Application/Web Development - Overview
.NET Security Application/Web Development - Overview
 
Designing distributedsystems cht6
Designing distributedsystems cht6Designing distributedsystems cht6
Designing distributedsystems cht6
 
Reactive application with akka.NET & .NET Core
Reactive application with akka.NET & .NET CoreReactive application with akka.NET & .NET Core
Reactive application with akka.NET & .NET Core
 
The Cloud - What's different
The Cloud - What's differentThe Cloud - What's different
The Cloud - What's different
 
How to be a professional speaker
How to be a professional speakerHow to be a professional speaker
How to be a professional speaker
 
Agile tutorial
Agile tutorialAgile tutorial
Agile tutorial
 
響應式程式開發之 .NET Core 應用 
響應式程式開發之 .NET Core 應用 響應式程式開發之 .NET Core 應用 
響應式程式開發之 .NET Core 應用 
 
Artifacts management with DevOps
Artifacts management with DevOpsArtifacts management with DevOps
Artifacts management with DevOps
 
Web optimization with service woker
Web optimization with service wokerWeb optimization with service woker
Web optimization with service woker
 
GCPUG.TW Meetup #25 - ASP.NET Core with GCP
GCPUG.TW Meetup #25 - ASP.NET Core with GCPGCPUG.TW Meetup #25 - ASP.NET Core with GCP
GCPUG.TW Meetup #25 - ASP.NET Core with GCP
 
.NET Study Group - ASP.NET Core with GCP
.NET Study Group - ASP.NET Core with GCP.NET Study Group - ASP.NET Core with GCP
.NET Study Group - ASP.NET Core with GCP
 
C# 2 to 5 short Introduction
C# 2 to 5 short IntroductionC# 2 to 5 short Introduction
C# 2 to 5 short Introduction
 
Docker - fundamental
Docker  - fundamentalDocker  - fundamental
Docker - fundamental
 
DevOps for dummies study sharing - part II
DevOps for dummies study sharing - part IIDevOps for dummies study sharing - part II
DevOps for dummies study sharing - part II
 

Recently uploaded

Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
BookNet Canada
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
Larry Smarr
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
Sally Laouacheria
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
Enterprise Wired
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Erasmo Purificato
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
Liveplex
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
Safe Software
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 

Recently uploaded (20)

Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 

Webpack and Web Performance Optimization

  • 1. Webpack and Web Performance Optimization Blackie.Tsai Blackie.tsai@xuenn.com 2016/11/18
  • 2. Agenda • Webpack Introduction • Web Optimization • Modularized Javascript and React • Collaborate with .net MVC
  • 4. • Today’s Web Apps Trendy • More and more JavaScript is being used. • Modern browsers are offering a wider range of interfaces. • Fewer full page reloads → even more code in a page • As a result there is a lot of code on the client side! A big code base needs to be organized. Module systems offer the option to split your code base into modules Current problems
  • 5. Webpack - A Module Bundler • A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows to load parts for the application on demand. Through "loaders," modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff. https://webpack.github.io • Usage: https://webpack.github.io/docs/tutorials/getting-started/
  • 6. Goals • Split the dependency tree into chunks loaded on demand • Keep initial loading time low • Every static asset should be able to be a module • Ability to integrate 3rd-party libraries as modules • Ability to customize nearly every part of the module bundler • Suited for big projects
  • 7. Features • Code Splitting • allows you to split your codebase into multiple chunks. Chunks are loaded asynchronously at runtime. This reduces the initial loading time. • Optimizations • can do many optimizations to reduce the output size of your JavaScript by de-duplicating frequently used modules, minifying, and giving you full control of what is loaded initially and what is loaded at runtime through code splitting. • Loaders • enables use of loaders to preprocess files. This allows you to bundle any static resource way beyond JavaScript. You can easily write your own loaders using node.js. • Module Format (AMD/CommonJS) • supports both AMD and CommonJS module styles. • Plug-in System • webpack features a rich plugin system and allows you to customize
  • 9. Loader • Loaders allow you to preprocess files as you require() or “load” them. • Loaders are kind of like “tasks” in other build tools, and provide a powerful way to handle frontend build steps. • Loaders can transform files from a different language like, CoffeeScript to JavaScript, or inline images as data URLs. • Loaders even allow you to do things like require() css files right in your JavaScript! You can import other Loaders to help you. • E.g. CSS-LOADER, IMAGE LOADER, BUNDLE-LOADER
  • 10. Loader - Sample • Webpack transform a module with a loader • ! syntax separating the loader from the module path? Loaders, like modules can also be specified with a relative path (as if you were requiring it) instead of the loader name • Chained together by separating loaders with the ! • Loaders with Parameters • loaders by config var moduleWithOneLoader = require("my-loader!./my-awesome-module"); var moduleWithLoaders = require("style-loader!css-loader!less-loader!./my-styles.less"); var moduleWithLoaderHasParameters = require("loader?with=parameter!./file"); { module: { loaders: [ { test: /.coffee$/, loader: "coffee-loader" } ], preLoaders: [ { test: /.coffee$/, loader: "coffee-hint-loader" } ] } };
  • 11. Webpack Config File • entry • Setup entry file • output • Determine output path and file name • module(optional) • Setup loaders
  • 13. NodeJS • Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. • Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world. • https://nodejs.org/dist/v4.5.0/node-v4.5.0-x64.msi • https://nodejs.org/dist/v6.6.0/node-v6.6.0-x64.msi
  • 14. [NPM]Webpack • https://www.npmjs.com/package/webpack • Setup • Project: npm install webpack --save-dev • Global: npm install webpack –g • Common Commands(usually execute with webpack.config.js file) • webpack:execute one time in dev mode. E.g. webpack main.js bundle.js • webpack -p: execute for production-ready • webpack --watch:execute and watch change to execute on background • webpack --progress --colors: execute with progress bar and colors
  • 16. WebPack Task Runner • https://visualstudiogallery.msdn.microsoft.com/5497fd10-b1ba- 474c-8991-1438ae47012a
  • 20. • Unoptimized Resource(js, css, images) • Sites impacted: 90% • Content Served Without HTTP Compression • Sites impacted: 72% • Without Concatenate Resource(js, css or images) to one Request • Sites impacted: 69% • Too much HTTP Requests • Sites impacted: 69% • Without Caching Information • Sites impacted: 65% • Domain Sharding Not Implemented • Sites impacted: 64% Top issue for Web Performance
  • 21. • Image Optimization • Reduce HTTP Requests • Minify CSS and Javascript • Critical Path and Render Blocking Resources (CSS + JS) • Reduce Latency with a CDN • Avoid 301 Redirects • Caching • Web Font Performance • Enable Gzip Compression • Fix 404 Errors • Serve Scaled Images Top tips for Web Performance Optimization
  • 22. Adaptive Web Concept Header HTML iframe img media • CSS, icon and fonts • Most file can Concatenate (CSS merge and image sprite ) • Loading first and sequence with blocking • Body content, JS and other resource • Bigger file size than Header • Most file can’t Concatenate (exclude JS bundle and image sprite ) • Loading/Executing later when read the content with non-blocking body
  • 24. Delaying Image Loading • a.k.a Image Lazy Loading Solution To Lazy Loading SEO Impact
  • 25. Web Optimize Before Mobile Lite • Now • SBK have 15 requests for total 500KB transferred • 188 have 8 requests for total 600KB transferred • Action • Eliminate render-blocking JavaScript and CSS in above-the-fold content • Less request • Can improve 40% for latency issue on too many requests, from 23 to 14 • SBK • Combine JS request • 188(Brand) • Combine JS request • Refine 188(Brand) header/footer for provide less request version for SBK
  • 26. Reduce less with low User impact • Changes • General • No image(jpg, png and gif) file • Use CSS, Font(include icon) and HTML • Only one kind of font for Mobile Lite(Only Lato-Regular, no Lato-Bold) • Pagination for Today • Homepage • No image on each feature event • All Market • Score Board with simple background color • Estimated improvement • Reduce 4 request • Reduce 180 KB
  • 27. Reduce more but high User impact • Changes • General • No Auto refresh, using manually refresh(e.g. can click every 30s) • All Market • No Live Center(5 sec auto-refresh with 2.5 KB=>1 min with 30KB) • Estimated improvement • Reduce 1 request • Reduce 20 KB(exclude Live Center)
  • 28. Cut function but Company impact • Changes • Homepage • Only display 1st feature event • Only display top N priority sports events • Main Odds • Only display top N priority competition event • All Market • Display predefine priority markets only • Estimated improvement • Reduce 50 KB
  • 29. Comparison Original Web Optimized Low User Impact High User Impact Company Impact Request 23 14 10 9 9 Transferred size(KB) 1, 100 1,100 920 930 880
  • 31. Gulp Gulp is a Task Runner build by JavaScript to help automation. The less work you have to do when performing repetitive tasks like minification, compilation, unit testing, linting, etc. After you've configured it through a Gulpfile, a task runner can do most of that mundane work for team •Minify JavaScript, CSS files •Combine JavaScript, CSS files(including compile Sass and Less) and Image Sprites •Testing •Format or Code Rule check
  • 32. Development Flow - Developing • Integrate with Visual Studio with Task Runner Explorer, Gulp for VS • Help doing below task when ITC doing developing • Concatenation and minifying • Compile SASS file to CSS file on runtime • Testing minify JavaScript, CSS files • Testing combine JavaScript, CSS files(Sass and Less) and Image Sprites • Validate front-end coding rule
  • 33. Gulp Plugin • gulp-concat:file concatenate • gulp-minify-css: CSS minifying • gulp-uglify: Compressed Javascript(Can replace by Webpack) • gulp-rename:File rename • gulp-html-replace :Replace target source path • gulp-minify-html : Compressed HTML • Ref • http://www.oxxostudio.tw/articles/201503/gulp-2-compress-js-css.html • http://www.oxxostudio.tw/articles/201503/gulp-3-compress-html.html
  • 34. Integrate with Webpack • With webpack-stream (not recommened) • https://github.com/shama/webpack-stream • Run webpack as a stream to conveniently integrate with gulp. • Big issue=>gulp & webpack整合,鱼与熊掌我都要! • Without webpack-stream • https://webpack.github.io/docs/usage-with-gulp.html var gulp = require("gulp"); var gutil = require("gulp-util"); var webpack = require("webpack"); var WebpackDevServer = require("webpack-dev-server"); gulp.task("webpack", function(callback) { // run webpack webpack({ // configuration }, function(err, stats) { if(err) throw new gutil.PluginError("webpack", err); gutil.log("[webpack]", stats.toString({ // output options })); callback(); }); });
  • 35. Development Flow – Build and Release • Gulp help doing below task • Compile SASS file to CSS file • Minify JavaScript, CSS, HTML files(Release version) • Concatenate JavaScript, CSS files(including compile Sass and Less) and Image Sprites(Release version) • [Optional]Generate Format or Code Rule report • [Optional]Generate Front-end test report • Jenkins help doing below task • Trigger Grunt to build Release version • Build and Release DEV(daily) • Validate Unit test • Validate Integration test • Validate Automation test(Selenium) • Validate Web performance test(YSlow, Phantomjs or etc…) • Build and Release QAT • Prepare UAT release package • Aggregate and Sent release report
  • 36. • General • Avoid 301 Redirects • Fix All 404 Errors • Loading Resources On-demand • Avoid Render Blocking • Static content optimize • Concatenate(CSS merge、JS bundle、image sprite ) • Compression(gzip、minify, image compression) • Request optimize • CDN • Front-end Cache • Request Tuning and Combine • Domain Sharding Web Optimize
  • 38. Modularized JavaScript • Pros • Encapsulation • Decoupling • Organization • No global scope pollution • Security • Re-use • Cons • More difficult to release • Complex dependency
  • 42. Babel - A Tool to convert ES6 to ES5 • A Tool to convert ES6 to ES5 • Babel is the most popular tool used to convert ES6 to ES5. It has various interfaces like a CLI, Node-module and also an online converter. I use the node module for my apps and use theonline version to quickly see the differences. • Why ES6 • 5 JavaScript “Bad” Parts That Are Fixed In ES6 • Modularized for React, Babel can convert JSX syntax and strip out type annotations.
  • 44. Grunt/Gulp for React • Not all browsers are supporting ES6 yet, so we're going to have to transpile our ES6 code, turning it into ES5. We're also going to have to handle 'JSX', the special Javascript that we can use for React. We also need to play well with existing code.
  • 45. Webpack for React • Webpack is a bundler. It'll take a bunch of loose Javascript files and build a single file from the lot
  • 46. Webpack+Babel for React • Even better, we can configure webpack to run files that match a certain pattern to go through other 'loaders', which can process the files further. • We can use the Babel transpiler to turn an ES6 file to ES5. We just need the glue to let Webpack use Babel as a loader. That comes in the form of the Babel Loader:
  • 47. Babel-loader • This package allows transpiling JavaScript files using Babel and webpack. https://github.com/babel/babel-loader
  • 48. Dependency • React uses JSX as the XML-like syntax extension over JavaScript to specify component tree structure, data flow, and event handlers. JSX is processed by Webpack module bundler using specific loaders or convertors.
  • 50. Visual Studio 2015 with latest update • https://blogs.msdn.microsoft.com/visualstudio/2015/06/10/javas cript-editor-improvements-in-visual-studio-2015/ • https://www.visualstudio.com/en-us/news/vs2015-update1- vs.aspx • React's JSX is now natively supported • ECMAScript 2015 (formerly ECMAScript 6) support
  • 51. React Snippet Pack • https://visualstudiogallery.msdn.microsoft.com/234d79e9-f0fd- 41e1-a926-850da8e8c7d7
  • 53. • Demo Download • Original post : detail of how to setup up front-end in asp.net core and MVC5, sample is clone from AspNetReactSamples • Setup • Install node and NPM • Go to root directory and use NPM to install js dependency • npm install • Build with install nuget dependency • Run App Demo
  • 59. Reference • 設定開發React的環境 • 設定開發React的環境 - React Hot Loader • Production optimization with React and Webpack
  • 60. Q & A
  • 61. 11F., No.399, Ruiguang Rd., Neihu Dist., Taipei City 114, Taiwan TEL: +886 2 2798 8529 Fax: +886 2 2798 8531 Website : www.xuenn.com THANK YOU!
  • 62. Reference • WEBPACK入門教學筆記 • 18 Tips for Website Performance Optimization • Performance Guide for Tizen Web Applications(1): Resource Loading • How-To: Integrate Webpack into Visual Studio 2015 • webpack-howto • Pro React : Appendix A: Webpack for React • 如何使用 Webpack 模組整合工具 • Webpack: your final module bundler • Getting Started with React & ES6 • React Speed Coding • Parallel Downloads Across Domains
  • 63. • dependencies are installed on both: • npm install from a directory that contains package.json • npm install $package on any other directory • devDependencies are: • also installed on npm install on a directory that contains package.json, unless you pass the --production flag • not installed on npm install "$package" on any other directory, unless you give it the --dev option. • are not installed transitively. • Most important • dependencies are required to run, devDependencies only to develop, e.g.: unit tests, Coffeescript to Javascript transpilation, minification, ... [NPM] dependencies and devDependencies