SlideShare a Scribd company logo
1 of 24
JS Digest
By Oleksii Boiko,
Software Developer
July 2018
www.eliftech.com
Agenda
Browsers:
▪ Web Caching Explained by
Buying Milk at the Supermarket
▪ How you can improve your
workflow using the JavaScript
console
Front-end:
▪ HTML element methods you’ve
potentially never heard of
▪ The CSS Paint API
Node.js
▪ Multi-threading support in Node.js
10.5
▪ eslint-scope v3.7.2 has been
hacked
▪ Why creating an array through a
map doesn`t work in JS, and how
to solve it
Useful libs:
▪ Shepherd
▪ React-scrollbars-custom
▪ Docz
www.eliftech.com
Browsers news
www.eliftech.com
Web Caching Explained by Buying Milk at the
Supermarket
If you have ever bought milk at the supermarket, then
you can understand server-side and browser-side
caching.
Without caching, you are limited by the computing
power of your servers. Caching is used to load static
assets, like:
▪ Images
▪ CSS
▪ Static HTML files
▪ JavaScript files
www.eliftech.com
What is server-side caching?
Back to our farm scenario. Know what would make it a
LOT easier to run a successful dairy farm?
A supermarket with refrigeration!
That way, people will not need to show up to your farm
and consume the milk immediately. You will be able to
keep it safely stored for a couple weeks at a time.
The supermarket removes a lot of the stress on your
farm, because your cows will not be expected to produce
in real-time. The supermarket will handle the demand.
You just need to keep the cows productive on a daily
basis. Even better, residents of all the surrounding
villages can now buy milk from your farm, because it will
always be available in the refrigerator.
www.eliftech.com
What is a CDN?
So far, there is one grocery store selling your milk.
Although that is a big improvement, you still have no
way to get your milk to people outside the range of this
local store. You are going to need to add more stores if
you want to scale up your operation.
So, let’s say you start distributing your milk to more
supermarkets. Now, you can satisfy customers across a
much larger geographic range. This is similar to a
content delivery network, or a CDN. A CDN is a series
of proxy servers (like we discussed above) located all
over the world.
As an end-user, you probably feel that high-speed
internet allows most sites to load very quickly.
However, this is only because they use CDNs to deliver
static files at rapid speed!
www.eliftech.com
What about browser caching?
Now, people across the country (or the world) can bring
home cold milk from your farm. There’s just one issue—
they have no way to store it in their own homes. Your
customers still need to drink the milk pretty quickly after
they buy it, and then return to the grocery store for
more. So, this system still doesn’t serve customers
particularly well.
The solution? A refrigerator!
With a fridge, you can store the milk locally and avoid a
return trip to the supermarket. In caching terms, we’re
talking about a completely separate location for storing
static assets since it is on the client-side, or on the same
computer as the browser. Our proxy server was located
in a remote location.
www.eliftech.com
Chache expiration date
One key thing to note—we are NOT saying that milk
magically arrives in your refrigerator! You still need to
make that initial request that reaches either the server
or the proxy server. After that, you can cache some of
the files locally.
How does your browser know when to request new
files from the server? Otherwise, you would never
experience updated versions of these local files.
Well, just like milk producers put a date on their milk
packaging, servers will add some sort of identifier
within the HTTP response header. The scenario shown
above closely resembles the “expiration date” method.
Some of the other methods still require your browser
to check with the server before sending the cached
file.
More info
here
www.eliftech.com
How you can improve your workflow using the
JavaScript console
▪ Console.log, Console.error, Console.warn
and Console.info
www.eliftech.com
How you can improve your workflow using the
JavaScript console
▪ Console.group
▪ Console.table
www.eliftech.com
How you can improve your workflow using the
JavaScript console
▪ Console.count, Console.time and Console.timeEnd
▪ Console.trace and Console.assert
More info here
www.eliftech.com
Front-end
www.eliftech.com
HTML element methods you’ve potentially never heard of
#1 table methods #2 scrollIntoView()
#3 hidden
#4 toggle()
#5 querySelector()
www.eliftech.com
HTML element methods you’ve potentially never heard of
#6 getBoundingClientRect() #8 insertAdjacentElement()
#7 matches()
#9 contains()
#10 getAttribute()
More info here
www.eliftech.com
The CSS Paint API
The API is just one part of a whole suite of
new specifications all under the umbrella of
what is known as CSS Houdini. Houdini, in
essence, gives developers lower level access
to CSS itself. No kidding.
The CSS Paint API specifically allows you to
call a paint() function wherever you would
normally write a value where an image is
expected. A common example is the
background-image property, where you might
use the url() function to a link to an image file,
like this:
More info here
www.eliftech.com
Node.js
www.eliftech.com
Multi-threading support in Node.js 10.5
Version 10.5.0 of Node.js was released and one of the main
features it contained was the addition of initial (and
experimental) thread support.
This is interesting, specially coming from a language that’s
always pride itself of not needed threads thanks to it’s
fantastic async I/O. So why would we need threads in Node?
The quick and simple answer is: to have it excel in the only
area where Node has suffered in the past: dealing with heavy
CPU intensive computations. This is mainly why Node.js is
not strong in areas such as AI, Machine Learning, Data
Science and similar. There are a lot of efforts in progress to
solve that, but we’re still not as performant as when
deploying microservices for instance.
More info here
www.eliftech.com
eslint-scope v3.7.2 has been hacked
A hacker has gained access to a developer's npm
account and injected malicious code into a
popular JavaScript library, code that was
designed to steal the npm credentials of users
who utilize the poisoned package inside their
projects.
The JavaScript (npm) package that got
compromised is called eslint-scope, a sub-module
of the more famous ESLint, a JavaScript code
analysis toolkit.
More info here
www.eliftech.com
Why creating an array through a map doesn't work in
JS, and how to solve it
More info here
www.eliftech.com
Useful libs
www.eliftech.com
Shepherd
As a web developer, you probably realize that
creating an application is often the easy part
– presenting it to the world is an uphill task in
itself. Some prefer creating presentations,
some others make videos. Wouldn’t it be nice
if you had something to help you walk your
users through your app?
Enter Shepherd, by HubSpot. Shepherd is a
simple JavaScript library which helps you
guide your users through a tour of your
application. It helps you direct your users to
the right place, just like a shepherd takes care
of his flock of sheep.
More info here
www.eliftech.com
react-scrollbars-custom
▪ Fully customizable
▪ requestAnimationFrame for 60fps
▪ No extra stylesheets necessary
▪ Cross-browser
▪ Native scrollbars on mobile devices
More info here
www.eliftech.com
Docz
Docz has some built-in components
that help you to document your things.
Using the power of components and
some AST parsing algorithms to source
data for that components, we can
render your components on the fly,
create tables with contents, custom
getters by traversing your file, etc. The
sky is limit here!
More info here
www.eliftech.com
Subscribe not to miss next month JS digest!
Find us at eliftech.com
Have a question? Contact us:
info@eliftech.com

More Related Content

What's hot

HyperDB, MySQL Performance, & Flavors of MySQL
HyperDB, MySQL Performance, & Flavors of MySQLHyperDB, MySQL Performance, & Flavors of MySQL
HyperDB, MySQL Performance, & Flavors of MySQLEvan Volgas
 
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...Atwix
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?Andy Melichar
 
Improve WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of codeImprove WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of codeDanilo Ercoli
 
Website Performance
Website PerformanceWebsite Performance
Website PerformanceHugo Fonseca
 
WordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesWordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesDanilo Ercoli
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressDanilo Ercoli
 
The road to professional web development
The road to professional web developmentThe road to professional web development
The road to professional web developmentChristian Heilmann
 
Minimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsMinimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsCgColors
 
Best Friend || Worst Enemy: WordPress Multisite
Best Friend || Worst Enemy: WordPress MultisiteBest Friend || Worst Enemy: WordPress Multisite
Best Friend || Worst Enemy: WordPress MultisiteTaylor McCaslin
 
10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App TodayChris Love
 
Multisite core concepts final
Multisite core concepts finalMultisite core concepts final
Multisite core concepts finalUmesh Chaudhary
 
Make Local WordPress Development Simple
Make Local WordPress Development SimpleMake Local WordPress Development Simple
Make Local WordPress Development SimpleWP Engine
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themesopenchamp
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressRami Sayar
 
A look at FastCgi & Mod_PHP architecture
A look at FastCgi & Mod_PHP architectureA look at FastCgi & Mod_PHP architecture
A look at FastCgi & Mod_PHP architectureAimee Maree Forsstrom
 
Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web DevelopmentEric Greene
 
Php Indonesia x Bliblidotcom - Architecting Scalable CSS
Php Indonesia x Bliblidotcom - Architecting Scalable CSSPhp Indonesia x Bliblidotcom - Architecting Scalable CSS
Php Indonesia x Bliblidotcom - Architecting Scalable CSSIrfan Maulana
 

What's hot (20)

HyperDB, MySQL Performance, & Flavors of MySQL
HyperDB, MySQL Performance, & Flavors of MySQLHyperDB, MySQL Performance, & Flavors of MySQL
HyperDB, MySQL Performance, & Flavors of MySQL
 
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?
 
Improve WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of codeImprove WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of code
 
Website Performance
Website PerformanceWebsite Performance
Website Performance
 
WordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesWordPress Development Tools and Best Practices
WordPress Development Tools and Best Practices
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPress
 
The road to professional web development
The road to professional web developmentThe road to professional web development
The road to professional web development
 
Minimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsMinimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tips
 
Best Friend || Worst Enemy: WordPress Multisite
Best Friend || Worst Enemy: WordPress MultisiteBest Friend || Worst Enemy: WordPress Multisite
Best Friend || Worst Enemy: WordPress Multisite
 
10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today
 
Multisite core concepts final
Multisite core concepts finalMultisite core concepts final
Multisite core concepts final
 
Make Local WordPress Development Simple
Make Local WordPress Development SimpleMake Local WordPress Development Simple
Make Local WordPress Development Simple
 
Web tips
Web tipsWeb tips
Web tips
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPress
 
A look at FastCgi & Mod_PHP architecture
A look at FastCgi & Mod_PHP architectureA look at FastCgi & Mod_PHP architecture
A look at FastCgi & Mod_PHP architecture
 
Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web Development
 
WordPress optimization
WordPress optimizationWordPress optimization
WordPress optimization
 
Php Indonesia x Bliblidotcom - Architecting Scalable CSS
Php Indonesia x Bliblidotcom - Architecting Scalable CSSPhp Indonesia x Bliblidotcom - Architecting Scalable CSS
Php Indonesia x Bliblidotcom - Architecting Scalable CSS
 

Similar to JS digest. July 2018

Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdfGuide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdfpersuebusiness
 
JS digest. Decemebr 2017
JS digest. Decemebr 2017JS digest. Decemebr 2017
JS digest. Decemebr 2017ElifTech
 
Introduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website SpeedIntroduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website SpeedNile Flores
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...Otto Kekäläinen
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web ApplicationSachin Walvekar
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeededm00se
 
Web Client Performance
Web Client PerformanceWeb Client Performance
Web Client PerformanceHerea Adrian
 
Web site loading time optimization
Web site loading time optimizationWeb site loading time optimization
Web site loading time optimizationDamith Kothalawala
 
Offline of web applications
Offline of web applicationsOffline of web applications
Offline of web applicationsFDConf
 
Offline for web - Frontend Dev Conf Minsk 2014
Offline for web - Frontend Dev Conf Minsk 2014Offline for web - Frontend Dev Conf Minsk 2014
Offline for web - Frontend Dev Conf Minsk 2014Jan Jongboom
 
7 new techniques every web developer should know
7 new techniques every web developer should know7 new techniques every web developer should know
7 new techniques every web developer should knowMitiz Technologies
 
How To Make Your Wordpress Website Load Faster - 20 Tips
How To Make Your Wordpress Website Load Faster - 20 TipsHow To Make Your Wordpress Website Load Faster - 20 Tips
How To Make Your Wordpress Website Load Faster - 20 TipsWorkurious
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on SteroidsSiteGround.com
 
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformanceLevel Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformancePantheon
 
Rails Asset Pipeline - What, Why, Tips, Do's and Dont's
Rails Asset Pipeline - What, Why, Tips, Do's and Dont'sRails Asset Pipeline - What, Why, Tips, Do's and Dont's
Rails Asset Pipeline - What, Why, Tips, Do's and Dont'sRohan Daxini
 
Proven ways to improve your website performance optimizing front end and back...
Proven ways to improve your website performance optimizing front end and back...Proven ways to improve your website performance optimizing front end and back...
Proven ways to improve your website performance optimizing front end and back...Katy Slemon
 
HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011Alessandro Nadalin
 

Similar to JS digest. July 2018 (20)

Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdfGuide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
 
Caching 101
Caching 101Caching 101
Caching 101
 
JS digest. Decemebr 2017
JS digest. Decemebr 2017JS digest. Decemebr 2017
JS digest. Decemebr 2017
 
Introduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website SpeedIntroduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website Speed
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
 
Web Client Performance
Web Client PerformanceWeb Client Performance
Web Client Performance
 
Web site loading time optimization
Web site loading time optimizationWeb site loading time optimization
Web site loading time optimization
 
Offline of web applications
Offline of web applicationsOffline of web applications
Offline of web applications
 
Offline for web - Frontend Dev Conf Minsk 2014
Offline for web - Frontend Dev Conf Minsk 2014Offline for web - Frontend Dev Conf Minsk 2014
Offline for web - Frontend Dev Conf Minsk 2014
 
Show Me The Cache!
Show Me The Cache!Show Me The Cache!
Show Me The Cache!
 
7 new techniques every web developer should know
7 new techniques every web developer should know7 new techniques every web developer should know
7 new techniques every web developer should know
 
How To Make Your Wordpress Website Load Faster - 20 Tips
How To Make Your Wordpress Website Load Faster - 20 TipsHow To Make Your Wordpress Website Load Faster - 20 Tips
How To Make Your Wordpress Website Load Faster - 20 Tips
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
 
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformanceLevel Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress Performance
 
Rails Asset Pipeline - What, Why, Tips, Do's and Dont's
Rails Asset Pipeline - What, Why, Tips, Do's and Dont'sRails Asset Pipeline - What, Why, Tips, Do's and Dont's
Rails Asset Pipeline - What, Why, Tips, Do's and Dont's
 
Proven ways to improve your website performance optimizing front end and back...
Proven ways to improve your website performance optimizing front end and back...Proven ways to improve your website performance optimizing front end and back...
Proven ways to improve your website performance optimizing front end and back...
 
HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011
 

More from ElifTech

Go Concurrency Patterns
Go Concurrency PatternsGo Concurrency Patterns
Go Concurrency PatternsElifTech
 
Go Concurrency Basics
Go Concurrency Basics Go Concurrency Basics
Go Concurrency Basics ElifTech
 
Domain Logic Patterns
Domain Logic PatternsDomain Logic Patterns
Domain Logic PatternsElifTech
 
Dive into .Net Core framework
Dive into .Net Core framework Dive into .Net Core framework
Dive into .Net Core framework ElifTech
 
VR digest. August 2018
VR digest. August 2018VR digest. August 2018
VR digest. August 2018ElifTech
 
VR digest. July 2018
VR digest. July 2018VR digest. July 2018
VR digest. July 2018ElifTech
 
IoT digest. July 2018
IoT digest. July 2018IoT digest. July 2018
IoT digest. July 2018ElifTech
 
VR digest. June 2018
VR digest. June 2018VR digest. June 2018
VR digest. June 2018ElifTech
 
IoT digest. June 2018
IoT digest. June 2018IoT digest. June 2018
IoT digest. June 2018ElifTech
 
IoT digest. May 2018
IoT digest. May 2018IoT digest. May 2018
IoT digest. May 2018ElifTech
 
Object Detection with Tensorflow
Object Detection with TensorflowObject Detection with Tensorflow
Object Detection with TensorflowElifTech
 
VR digest. May 2018
VR digest. May 2018VR digest. May 2018
VR digest. May 2018ElifTech
 
Polymer: brief introduction
Polymer: brief introduction Polymer: brief introduction
Polymer: brief introduction ElifTech
 
JS digest. April 2018
JS digest. April 2018JS digest. April 2018
JS digest. April 2018ElifTech
 
VR digest. April, 2018
VR digest. April, 2018 VR digest. April, 2018
VR digest. April, 2018 ElifTech
 
IoT digest. April 2018
IoT digest. April 2018IoT digest. April 2018
IoT digest. April 2018ElifTech
 
IoT digest. March 2018
IoT digest. March 2018IoT digest. March 2018
IoT digest. March 2018ElifTech
 
VR digest. March, 2018
VR digest. March, 2018VR digest. March, 2018
VR digest. March, 2018ElifTech
 
VR digest. February, 2018
VR digest. February, 2018VR digest. February, 2018
VR digest. February, 2018ElifTech
 
IoT digest. February 2018
IoT digest. February 2018IoT digest. February 2018
IoT digest. February 2018ElifTech
 

More from ElifTech (20)

Go Concurrency Patterns
Go Concurrency PatternsGo Concurrency Patterns
Go Concurrency Patterns
 
Go Concurrency Basics
Go Concurrency Basics Go Concurrency Basics
Go Concurrency Basics
 
Domain Logic Patterns
Domain Logic PatternsDomain Logic Patterns
Domain Logic Patterns
 
Dive into .Net Core framework
Dive into .Net Core framework Dive into .Net Core framework
Dive into .Net Core framework
 
VR digest. August 2018
VR digest. August 2018VR digest. August 2018
VR digest. August 2018
 
VR digest. July 2018
VR digest. July 2018VR digest. July 2018
VR digest. July 2018
 
IoT digest. July 2018
IoT digest. July 2018IoT digest. July 2018
IoT digest. July 2018
 
VR digest. June 2018
VR digest. June 2018VR digest. June 2018
VR digest. June 2018
 
IoT digest. June 2018
IoT digest. June 2018IoT digest. June 2018
IoT digest. June 2018
 
IoT digest. May 2018
IoT digest. May 2018IoT digest. May 2018
IoT digest. May 2018
 
Object Detection with Tensorflow
Object Detection with TensorflowObject Detection with Tensorflow
Object Detection with Tensorflow
 
VR digest. May 2018
VR digest. May 2018VR digest. May 2018
VR digest. May 2018
 
Polymer: brief introduction
Polymer: brief introduction Polymer: brief introduction
Polymer: brief introduction
 
JS digest. April 2018
JS digest. April 2018JS digest. April 2018
JS digest. April 2018
 
VR digest. April, 2018
VR digest. April, 2018 VR digest. April, 2018
VR digest. April, 2018
 
IoT digest. April 2018
IoT digest. April 2018IoT digest. April 2018
IoT digest. April 2018
 
IoT digest. March 2018
IoT digest. March 2018IoT digest. March 2018
IoT digest. March 2018
 
VR digest. March, 2018
VR digest. March, 2018VR digest. March, 2018
VR digest. March, 2018
 
VR digest. February, 2018
VR digest. February, 2018VR digest. February, 2018
VR digest. February, 2018
 
IoT digest. February 2018
IoT digest. February 2018IoT digest. February 2018
IoT digest. February 2018
 

Recently uploaded

Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...chiefasafspells
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 

Recently uploaded (20)

Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 

JS digest. July 2018

  • 1. JS Digest By Oleksii Boiko, Software Developer July 2018
  • 2. www.eliftech.com Agenda Browsers: ▪ Web Caching Explained by Buying Milk at the Supermarket ▪ How you can improve your workflow using the JavaScript console Front-end: ▪ HTML element methods you’ve potentially never heard of ▪ The CSS Paint API Node.js ▪ Multi-threading support in Node.js 10.5 ▪ eslint-scope v3.7.2 has been hacked ▪ Why creating an array through a map doesn`t work in JS, and how to solve it Useful libs: ▪ Shepherd ▪ React-scrollbars-custom ▪ Docz
  • 4. www.eliftech.com Web Caching Explained by Buying Milk at the Supermarket If you have ever bought milk at the supermarket, then you can understand server-side and browser-side caching. Without caching, you are limited by the computing power of your servers. Caching is used to load static assets, like: ▪ Images ▪ CSS ▪ Static HTML files ▪ JavaScript files
  • 5. www.eliftech.com What is server-side caching? Back to our farm scenario. Know what would make it a LOT easier to run a successful dairy farm? A supermarket with refrigeration! That way, people will not need to show up to your farm and consume the milk immediately. You will be able to keep it safely stored for a couple weeks at a time. The supermarket removes a lot of the stress on your farm, because your cows will not be expected to produce in real-time. The supermarket will handle the demand. You just need to keep the cows productive on a daily basis. Even better, residents of all the surrounding villages can now buy milk from your farm, because it will always be available in the refrigerator.
  • 6. www.eliftech.com What is a CDN? So far, there is one grocery store selling your milk. Although that is a big improvement, you still have no way to get your milk to people outside the range of this local store. You are going to need to add more stores if you want to scale up your operation. So, let’s say you start distributing your milk to more supermarkets. Now, you can satisfy customers across a much larger geographic range. This is similar to a content delivery network, or a CDN. A CDN is a series of proxy servers (like we discussed above) located all over the world. As an end-user, you probably feel that high-speed internet allows most sites to load very quickly. However, this is only because they use CDNs to deliver static files at rapid speed!
  • 7. www.eliftech.com What about browser caching? Now, people across the country (or the world) can bring home cold milk from your farm. There’s just one issue— they have no way to store it in their own homes. Your customers still need to drink the milk pretty quickly after they buy it, and then return to the grocery store for more. So, this system still doesn’t serve customers particularly well. The solution? A refrigerator! With a fridge, you can store the milk locally and avoid a return trip to the supermarket. In caching terms, we’re talking about a completely separate location for storing static assets since it is on the client-side, or on the same computer as the browser. Our proxy server was located in a remote location.
  • 8. www.eliftech.com Chache expiration date One key thing to note—we are NOT saying that milk magically arrives in your refrigerator! You still need to make that initial request that reaches either the server or the proxy server. After that, you can cache some of the files locally. How does your browser know when to request new files from the server? Otherwise, you would never experience updated versions of these local files. Well, just like milk producers put a date on their milk packaging, servers will add some sort of identifier within the HTTP response header. The scenario shown above closely resembles the “expiration date” method. Some of the other methods still require your browser to check with the server before sending the cached file. More info here
  • 9. www.eliftech.com How you can improve your workflow using the JavaScript console ▪ Console.log, Console.error, Console.warn and Console.info
  • 10. www.eliftech.com How you can improve your workflow using the JavaScript console ▪ Console.group ▪ Console.table
  • 11. www.eliftech.com How you can improve your workflow using the JavaScript console ▪ Console.count, Console.time and Console.timeEnd ▪ Console.trace and Console.assert More info here
  • 13. www.eliftech.com HTML element methods you’ve potentially never heard of #1 table methods #2 scrollIntoView() #3 hidden #4 toggle() #5 querySelector()
  • 14. www.eliftech.com HTML element methods you’ve potentially never heard of #6 getBoundingClientRect() #8 insertAdjacentElement() #7 matches() #9 contains() #10 getAttribute() More info here
  • 15. www.eliftech.com The CSS Paint API The API is just one part of a whole suite of new specifications all under the umbrella of what is known as CSS Houdini. Houdini, in essence, gives developers lower level access to CSS itself. No kidding. The CSS Paint API specifically allows you to call a paint() function wherever you would normally write a value where an image is expected. A common example is the background-image property, where you might use the url() function to a link to an image file, like this: More info here
  • 17. www.eliftech.com Multi-threading support in Node.js 10.5 Version 10.5.0 of Node.js was released and one of the main features it contained was the addition of initial (and experimental) thread support. This is interesting, specially coming from a language that’s always pride itself of not needed threads thanks to it’s fantastic async I/O. So why would we need threads in Node? The quick and simple answer is: to have it excel in the only area where Node has suffered in the past: dealing with heavy CPU intensive computations. This is mainly why Node.js is not strong in areas such as AI, Machine Learning, Data Science and similar. There are a lot of efforts in progress to solve that, but we’re still not as performant as when deploying microservices for instance. More info here
  • 18. www.eliftech.com eslint-scope v3.7.2 has been hacked A hacker has gained access to a developer's npm account and injected malicious code into a popular JavaScript library, code that was designed to steal the npm credentials of users who utilize the poisoned package inside their projects. The JavaScript (npm) package that got compromised is called eslint-scope, a sub-module of the more famous ESLint, a JavaScript code analysis toolkit. More info here
  • 19. www.eliftech.com Why creating an array through a map doesn't work in JS, and how to solve it More info here
  • 21. www.eliftech.com Shepherd As a web developer, you probably realize that creating an application is often the easy part – presenting it to the world is an uphill task in itself. Some prefer creating presentations, some others make videos. Wouldn’t it be nice if you had something to help you walk your users through your app? Enter Shepherd, by HubSpot. Shepherd is a simple JavaScript library which helps you guide your users through a tour of your application. It helps you direct your users to the right place, just like a shepherd takes care of his flock of sheep. More info here
  • 22. www.eliftech.com react-scrollbars-custom ▪ Fully customizable ▪ requestAnimationFrame for 60fps ▪ No extra stylesheets necessary ▪ Cross-browser ▪ Native scrollbars on mobile devices More info here
  • 23. www.eliftech.com Docz Docz has some built-in components that help you to document your things. Using the power of components and some AST parsing algorithms to source data for that components, we can render your components on the fly, create tables with contents, custom getters by traversing your file, etc. The sky is limit here! More info here
  • 24. www.eliftech.com Subscribe not to miss next month JS digest! Find us at eliftech.com Have a question? Contact us: info@eliftech.com