SlideShare a Scribd company logo
Vlad Zelinschi - Embrace Native JavaScript (the anti-plugins talk) - Codecamp 10 may 2014
Embrace native 
JavaScript 
(the anti-plugins talk) 
Vlad Zelinschi 
Front-end engineer at Yonder 
@vladzelinschi
Disclaimer 
• Personal frustration 
• I’m not here to specifically hit the open-source 
plugins ecosystem with a hammer, although it might 
seem like I do 
• “The anti-plugins talk” (bound to specific conditions) 
• Any black-belt jQuery fans in the room?
Vlad Zelinschi - Embrace Native JavaScript (the anti-plugins talk) - Codecamp 10 may 2014
Plugins? Say what? 
• A bunch of code that does something for you, so 
you can easily relax and open Facebook 
• Abstracts away the implementation 
• Provides an API to work with 
• Improved development speed, tested & proven, 
stable, maintained & continuously improved (the 
happy scenario)
AHA! Plugins… 
• Developers love them 
• I see plugins included everywhere 
• It does have an impact on the application’s 
architecture and performance
Drawbacks 
• Missing synergy 
• Sometimes you are using only a subset of the 
functionality. Custom build ? 
• Dependency (jQuery mostly) 
• Performance overhead (requests, file size, etc.)
Alternatives 
• Uploader 
• Video/Audio 
Players 
• Drag & drop 
• DOM 
manipulation 
VS. 
• File API 
• Native video/audio tags 
• Native drag & drop 
• querySelector, 
querySelectorAll, etc. 
• History API, offline cache, 
storing capabilities, IndexDB, 
geolocation
Plugins are helpful 
• Progressive enhancement (with extended browser 
support) 
• Development speed 
• Abstracted implementation - API
When should we 
use / discard 
plugins?
Use plugins when… 
• You’re abusing their entire (almost) API 
• The development effort to replicate the functionality 
is out of the question 
• Browser support 
• Rapid prototyping (Twitter Bootstrap, Foundation)
Discard plugins when… 
• The effort to implement it yourself is low (and you 
can use native modern JS APIs) 
• IE 9+ (IE 8 also for some APIs) 
• You’re building custom functionality and looks 
(example: Twitter Flight)
Discard plugins when… 
• Long dependency chain (jQuery, Underscore) 
• Huge file size, no custom build 
• Number of requests start to pile up
jQuery time…
Vlad Zelinschi - Embrace Native JavaScript (the anti-plugins talk) - Codecamp 10 may 2014
jQuery truths… 
• Released january 2006 (8 years ago) 
• Most popular JavaScript library 
• “[…] makes things like HTML document traversal 
and manipulation, event handling, animation, 
and Ajax much simpler with an easy-to-use API that 
works across a multitude of browsers.”
But…do we really 
need jQuery?
DOM manipulation 
• querySelector, querySelectorAll (IE 8+) 
• dataset (or go for getAttribute) (IE 10 stable) 
• classList (IE 10+)
var addClass = function(el, classToAdd) { 
if (el.classList) { 
el.classList.add(classToAdd); 
} 
else { 
if (el.className.indexOf(classToAdd) === -1) { 
el.className += ' ' + classToAdd; 
} 
} 
};
Event handling 
• addEventListener (IE 9+) 
• removeEventListener (IE 9+) 
• Register and trigger you own events
var _cE = window.CustomEvent || null; 
var triggerCustomEvent = function(el, evName, obj) { 
var ev; 
if (_cE) { 
ev = new CustomEvent(evName, { 
detail: obj 
}); 
} 
else { 
ev = document.createEvent('CustomEvent'); 
ev.initCustomEvent(evName, true, true, obj); 
} 
el.dispatchEvent(ev); 
};
Animations 
• CSS transitions (IE 10+) 
• CSS animations (IE 10+) 
• setTimeout vs. requestAnimationFrame (IE 10+) 
• rAF is highly optimized and always a better choice 
when going for 60 fps
AJAX 
• Better support (normalized implementations - even 
for older browsers) 
• CORS support 
• Events: abort, progress for both upload and 
download 
• FormData API (fastest but it cannot be stringified)
Other things… 
• $.each and other Array enhancement plugins vs. 
native Array methods - filter, map, some, reverse, 
reduce, every, etc. 
• Templating engines - do you really need something 
else than what you have at your disposal?
When to use jQuery… 
• Refactoring is not an option (time, money) 
• Support older codebases (legacy code) - might be 
tied to a specific version 
• Developers common ground
When to drop jQuery… 
• You’re building a small-sized app (no complexity 
needed) 
• In case of medium, large apps - chose an MVC 
framework anyway 
• Browser support allows it (although newer versions 
of jQuery dropped legacy browsers)
When to drop jQuery… 
• Speed, performance, optimizations - native is 
always (more or less) faster, less code to download, 
fewer requests 
• DO NOT use jQuery with Angular - millions of kittens 
die every time you do that
Wrap-up… 
• Always analyze your context 
• Research before you take the decision of importing 
a certain plugin / library / framework 
• Never sacrifice performance - try to stay within the 
performance budget
Wrap-up… 
• Including plugins involves technical debt 
• More plugins = increased cost of upgrade
Vlad Zelinschi - Embrace Native JavaScript (the anti-plugins talk) - Codecamp 10 may 2014
Q&A anyone?
Vlad Zelinschi - Embrace Native JavaScript (the anti-plugins talk) - Codecamp 10 may 2014
Thank you! 
Vlad Zelinschi 
Front-end engineer at Yonder 
@vladzelinschi

More Related Content

PPTX
No Container: a Modern Java Stack with Bootique
PPT
Building intranet applications with ASP.NET AJAX and jQuery
PPT
Building intranet applications with ASP.NET AJAX and jQuery
PPTX
Edy Dawson Notes on SF HTML5 Dev Conf
PPTX
WebNetConf 2012 - Single Page Apps
PPT
Java EE revisits design patterns
PPTX
Development of automated tests for ext js based web sites
PDF
The New JavaScript: ES6
No Container: a Modern Java Stack with Bootique
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQuery
Edy Dawson Notes on SF HTML5 Dev Conf
WebNetConf 2012 - Single Page Apps
Java EE revisits design patterns
Development of automated tests for ext js based web sites
The New JavaScript: ES6

What's hot (20)

PPTX
SSIS Monitoring Deep Dive
PDF
Webpack: What it is, What it does, Whether you need it
PDF
Dangerous CSS
PDF
How to write a web framework
KEY
Enterprise Strength Mobile JavaScript
PPTX
SQL Server 2016 Temporal Tables
PDF
Advanced Core Data - The Things You Thought You Could Ignore
PDF
Intro to SharePoint 2010 development for .NET developers
PDF
WordPress Theme Reviewers Team
PPTX
NTBT #1 "Client-Side JavaScript"
PDF
Develop realtime web with Scala and Xitrum
PPTX
Javascript for Wep Apps
PDF
Devops and Immutable infrastructure - Cloud Expo 2015 NYC
PPTX
Apache Cayenne: a Java ORM Alternative
PDF
Алексей Швайка "Bundling: you are doing it wrong"
PDF
Xitrum HOWTOs
PPTX
My first powershell script
PDF
Xitrum @ Scala Matsuri Tokyo 2014
PDF
Eureka Moment UKLUG
PPT
5 Common Mistakes You are Making on your Website
SSIS Monitoring Deep Dive
Webpack: What it is, What it does, Whether you need it
Dangerous CSS
How to write a web framework
Enterprise Strength Mobile JavaScript
SQL Server 2016 Temporal Tables
Advanced Core Data - The Things You Thought You Could Ignore
Intro to SharePoint 2010 development for .NET developers
WordPress Theme Reviewers Team
NTBT #1 "Client-Side JavaScript"
Develop realtime web with Scala and Xitrum
Javascript for Wep Apps
Devops and Immutable infrastructure - Cloud Expo 2015 NYC
Apache Cayenne: a Java ORM Alternative
Алексей Швайка "Bundling: you are doing it wrong"
Xitrum HOWTOs
My first powershell script
Xitrum @ Scala Matsuri Tokyo 2014
Eureka Moment UKLUG
5 Common Mistakes You are Making on your Website
Ad

Viewers also liked (8)

PPTX
Alex lakatos state of mobile web
PPTX
Flavius olaru logicless ui prototyping with node js
PPTX
Vlad zelinschi optimizing the critical rendering path
PPTX
Diaconu andrei list view vs recyclerview in android l
PDF
Material design screen transitions in android
PDF
Ionut grecu the soft stuff is the hard stuff. the agile soft skills toolkit
PPTX
Parallel & async processing using tpl dataflow
PDF
The bigrewrite
Alex lakatos state of mobile web
Flavius olaru logicless ui prototyping with node js
Vlad zelinschi optimizing the critical rendering path
Diaconu andrei list view vs recyclerview in android l
Material design screen transitions in android
Ionut grecu the soft stuff is the hard stuff. the agile soft skills toolkit
Parallel & async processing using tpl dataflow
The bigrewrite
Ad

Similar to Vlad Zelinschi - Embrace Native JavaScript (the anti-plugins talk) - Codecamp 10 may 2014 (20)

PPT
State of jQuery - AspDotNetStorefront Conference
PDF
Ajax Tutorial
PDF
JavascriptMVC: Another choice of web framework
PDF
What's this jQuery? Where it came from, and how it will drive innovation
PDF
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
PDF
Feature Development with jQuery
PDF
orcreatehappyusers
PDF
orcreatehappyusers
PPT
JS Libraries and jQuery Overview
PDF
Web2.0 with jQuery in English
PDF
Session at Oredev 2016.
PDF
New Features Coming in Browsers (RIT '09)
PPSX
Javascript library toolbox
PDF
10 Building Blocks for Enterprise JavaScript
PPTX
Evolution of java script libraries
PDF
How to make Ajax Libraries work for you
PDF
Pro jQuery 2 0 Second Edition Adam Freeman
PPT
PDF
John Resig Beijing 2010 (English Version)
PPTX
f8db413453b33e4ffrointend development bbasics.pptx
State of jQuery - AspDotNetStorefront Conference
Ajax Tutorial
JavascriptMVC: Another choice of web framework
What's this jQuery? Where it came from, and how it will drive innovation
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
Feature Development with jQuery
orcreatehappyusers
orcreatehappyusers
JS Libraries and jQuery Overview
Web2.0 with jQuery in English
Session at Oredev 2016.
New Features Coming in Browsers (RIT '09)
Javascript library toolbox
10 Building Blocks for Enterprise JavaScript
Evolution of java script libraries
How to make Ajax Libraries work for you
Pro jQuery 2 0 Second Edition Adam Freeman
John Resig Beijing 2010 (English Version)
f8db413453b33e4ffrointend development bbasics.pptx

More from Codecamp Romania (20)

PDF
Cezar chitac the edge of experience
PPTX
Cloud powered search
PPTX
Business analysis techniques exercise your 6-pack
PPTX
Bpm company code camp - configuration or coding with pega
PPT
Andrei prisacaru takingtheunitteststothedatabase
PPTX
Agility and life
PPTX
2015 dan ardelean develop for windows 10
PDF
The case for continuous delivery
PPTX
Stefan stolniceanu spritekit, 2 d or not 2d
PPTX
Sizing epics tales from an agile kingdom
PPTX
Scale net apps in aws
PPTX
Raluca butnaru corina cilibiu the unknown universe of a product and the cer...
PDF
Kickstart your own freelancing career
PDF
Ecma6 in the wild
PPTX
Diana antohi me against myself or how to fail and move forward
PDF
Codecamp2015 pimp yourpipeline-saade-jens-1.1
PPTX
Code camp iasi silviu niculita - machine learning for mere mortals with azu...
PPTX
About leadership
PPTX
Business analysis techniques exercise your 6-pack
Cezar chitac the edge of experience
Cloud powered search
Business analysis techniques exercise your 6-pack
Bpm company code camp - configuration or coding with pega
Andrei prisacaru takingtheunitteststothedatabase
Agility and life
2015 dan ardelean develop for windows 10
The case for continuous delivery
Stefan stolniceanu spritekit, 2 d or not 2d
Sizing epics tales from an agile kingdom
Scale net apps in aws
Raluca butnaru corina cilibiu the unknown universe of a product and the cer...
Kickstart your own freelancing career
Ecma6 in the wild
Diana antohi me against myself or how to fail and move forward
Codecamp2015 pimp yourpipeline-saade-jens-1.1
Code camp iasi silviu niculita - machine learning for mere mortals with azu...
About leadership
Business analysis techniques exercise your 6-pack

Recently uploaded (20)

PDF
Nekopoi APK 2025 free lastest update
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
top salesforce developer skills in 2025.pdf
PPTX
L1 - Introduction to python Backend.pptx
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Introduction to Artificial Intelligence
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Odoo POS Development Services by CandidRoot Solutions
Nekopoi APK 2025 free lastest update
Navsoft: AI-Powered Business Solutions & Custom Software Development
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Design an Analysis of Algorithms I-SECS-1021-03
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Design an Analysis of Algorithms II-SECS-1021-03
top salesforce developer skills in 2025.pdf
L1 - Introduction to python Backend.pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Upgrade and Innovation Strategies for SAP ERP Customers
Introduction to Artificial Intelligence
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
How to Migrate SBCGlobal Email to Yahoo Easily
Which alternative to Crystal Reports is best for small or large businesses.pdf
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Odoo POS Development Services by CandidRoot Solutions

Vlad Zelinschi - Embrace Native JavaScript (the anti-plugins talk) - Codecamp 10 may 2014

  • 2. Embrace native JavaScript (the anti-plugins talk) Vlad Zelinschi Front-end engineer at Yonder @vladzelinschi
  • 3. Disclaimer • Personal frustration • I’m not here to specifically hit the open-source plugins ecosystem with a hammer, although it might seem like I do • “The anti-plugins talk” (bound to specific conditions) • Any black-belt jQuery fans in the room?
  • 5. Plugins? Say what? • A bunch of code that does something for you, so you can easily relax and open Facebook • Abstracts away the implementation • Provides an API to work with • Improved development speed, tested & proven, stable, maintained & continuously improved (the happy scenario)
  • 6. AHA! Plugins… • Developers love them • I see plugins included everywhere • It does have an impact on the application’s architecture and performance
  • 7. Drawbacks • Missing synergy • Sometimes you are using only a subset of the functionality. Custom build ? • Dependency (jQuery mostly) • Performance overhead (requests, file size, etc.)
  • 8. Alternatives • Uploader • Video/Audio Players • Drag & drop • DOM manipulation VS. • File API • Native video/audio tags • Native drag & drop • querySelector, querySelectorAll, etc. • History API, offline cache, storing capabilities, IndexDB, geolocation
  • 9. Plugins are helpful • Progressive enhancement (with extended browser support) • Development speed • Abstracted implementation - API
  • 10. When should we use / discard plugins?
  • 11. Use plugins when… • You’re abusing their entire (almost) API • The development effort to replicate the functionality is out of the question • Browser support • Rapid prototyping (Twitter Bootstrap, Foundation)
  • 12. Discard plugins when… • The effort to implement it yourself is low (and you can use native modern JS APIs) • IE 9+ (IE 8 also for some APIs) • You’re building custom functionality and looks (example: Twitter Flight)
  • 13. Discard plugins when… • Long dependency chain (jQuery, Underscore) • Huge file size, no custom build • Number of requests start to pile up
  • 16. jQuery truths… • Released january 2006 (8 years ago) • Most popular JavaScript library • “[…] makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.”
  • 17. But…do we really need jQuery?
  • 18. DOM manipulation • querySelector, querySelectorAll (IE 8+) • dataset (or go for getAttribute) (IE 10 stable) • classList (IE 10+)
  • 19. var addClass = function(el, classToAdd) { if (el.classList) { el.classList.add(classToAdd); } else { if (el.className.indexOf(classToAdd) === -1) { el.className += ' ' + classToAdd; } } };
  • 20. Event handling • addEventListener (IE 9+) • removeEventListener (IE 9+) • Register and trigger you own events
  • 21. var _cE = window.CustomEvent || null; var triggerCustomEvent = function(el, evName, obj) { var ev; if (_cE) { ev = new CustomEvent(evName, { detail: obj }); } else { ev = document.createEvent('CustomEvent'); ev.initCustomEvent(evName, true, true, obj); } el.dispatchEvent(ev); };
  • 22. Animations • CSS transitions (IE 10+) • CSS animations (IE 10+) • setTimeout vs. requestAnimationFrame (IE 10+) • rAF is highly optimized and always a better choice when going for 60 fps
  • 23. AJAX • Better support (normalized implementations - even for older browsers) • CORS support • Events: abort, progress for both upload and download • FormData API (fastest but it cannot be stringified)
  • 24. Other things… • $.each and other Array enhancement plugins vs. native Array methods - filter, map, some, reverse, reduce, every, etc. • Templating engines - do you really need something else than what you have at your disposal?
  • 25. When to use jQuery… • Refactoring is not an option (time, money) • Support older codebases (legacy code) - might be tied to a specific version • Developers common ground
  • 26. When to drop jQuery… • You’re building a small-sized app (no complexity needed) • In case of medium, large apps - chose an MVC framework anyway • Browser support allows it (although newer versions of jQuery dropped legacy browsers)
  • 27. When to drop jQuery… • Speed, performance, optimizations - native is always (more or less) faster, less code to download, fewer requests • DO NOT use jQuery with Angular - millions of kittens die every time you do that
  • 28. Wrap-up… • Always analyze your context • Research before you take the decision of importing a certain plugin / library / framework • Never sacrifice performance - try to stay within the performance budget
  • 29. Wrap-up… • Including plugins involves technical debt • More plugins = increased cost of upgrade
  • 33. Thank you! Vlad Zelinschi Front-end engineer at Yonder @vladzelinschi