Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
How does JavaScript work?
Search
Ulugbek Miniyarov
May 25, 2017
Programming
0
61
How does JavaScript work?
What is Javascript: a single-threaded non-blocking asynchronous concurrent language?
Ulugbek Miniyarov
May 25, 2017
Tweet
Share
More Decks by Ulugbek Miniyarov
See All by Ulugbek Miniyarov
DDD and CQRS Quick Overview
miniyarov
0
53
Software Architecture Patterns
miniyarov
1
25
Secure Software Development
miniyarov
0
34
Introduction to Docker
miniyarov
0
21
Advanced Blockchain Topics
miniyarov
0
39
Blockchain: from 0 to 1
miniyarov
0
79
Continuous Code Quality Inspection
miniyarov
0
31
Bitcoin Scripting, Smart Contracts (Ethereum), Tokens & ICO
miniyarov
0
29
PHP7 New Features
miniyarov
1
37
Other Decks in Programming
See All in Programming
「個人開発マネタイズ大全」が教えてくれたこと
bani24884
1
290
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
240
sappoRo.R #12 初心者セッション
kosugitti
0
280
Datadog Workflow Automation で圧倒的価値提供
showwin
1
300
Django NinjaによるAPI開発の効率化とリプレースの実践
kashewnuts
1
290
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
9
2.5k
AIレビュー導入によるCIツールとの共存と最適化
kamo26sima
1
210
Datadog DBMでなにができる? JDDUG Meetup#7
nealle
0
160
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
320
AIプログラミング雑キャッチアップ
yuheinakasaka
19
5k
機能が複雑化しても 頼りになる FactoryBotの話
tamikof
1
230
5分で理解する SOLID 原則 #phpcon_nagoya
shogogg
1
400
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1369
200k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Adopting Sorbet at Scale
ufuk
75
9.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Statistics for Hackers
jakevdp
797
220k
What's in a price? How to price your products and services
michaelherold
244
12k
Faster Mobile Websites
deanohume
306
31k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
A Philosophy of Restraint
colly
203
16k
Documentation Writing (for coders)
carmenintech
68
4.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
Writing Fast Ruby
sferik
628
61k
Transcript
How does JavaScript work? Ulugbek Miniyarov Software Architect @ENUYGUN Heavily
inspired by Philip Roberts’ JSConf EU 2014 Talk
V8 Engine (Chrome’s JS Runtime) ChakraCore (Egde’s JS Runtime) Nitro
(Safari’s JS Runtime) SpiderMonkey (Firefox’s JS Runtime) JavaScript Engines:
JavaScript? A single-threaded non-blocking asynchronous concurrent language
JavaScript has a Call Stack, an Event Loop, a Callback
Queue, and some other apis (Ajax, Timing ...) Are they inside JavaScript Engines? - Only Call Stack with Heap
None
Asynchronous feature is not included in JavaScript Engine. Browsers /
NodeJS handles asynchronous part: - XHR Request - Timing (setTimeout, setInterval) - Events (onClick, onFocus i.e.)
None
The Call Stack one thread == one call stack ==
one thing at a time
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
Blocking And how non-blocking i/o gives asynchronicity
None
None
None
None
None
None
None
None
Demo: Blocking Script in Browser at: https://jsfiddle.net/9c9ztkvz/
Solution? Asynchronous Callback
None
None
None
None
None
None
None
Concurrency & Event Loop One thing at a time, except
not really.
None
None
None
None
None
None
None
None
None
None
None
None
None
Ready for a Quiz?
None
None
Demo Time!
Thanks