SlideShare a Scribd company logo
1 of 16
 JavaScript functionality in browsers
 Transpiler meaning, comparing with compilers
 Browsers world
 Compiling process in the browsers
 BABELJS
Parham Abolghasemi
parhamab17@gmail.com
21/05/2023
TranspilerVsCompiler
A type of translator that takes piece of source code from a
programming language as input & convert it to another
programming language or another version of the origin
language.
• Compatibility
• Easy debugging
• Better refactoring
• Keeping the code structure
Transpiler’s Example
There are many different types of transpilers that each one of them has a
goal based on target language & usage.
Python
Js2Py, Pythonizer,Gotopy
Go
Godzilla,Gython
C#
JavaSharp,Sharpify, Py2Cs
European computer manufacturer’s association
Ecma International is an industry association dedicated to the
standardization of information and communication systems
Ecma is driven by industry members to meet their needs, providing a healthy
competitive landscape based on differentiation of products and services rather
than technology models, generating confidence among vendors and users of new
technology.
BrowsersWorld
Browser Engine | Rendering Engine
Turn HTML/CSS files into a graphics
page (rendering)
01. JavaScript Engine
Reads the JavaScript code &
communicate with the browser runtime
enviroment
02.
1. Enter theURL
2. Check the database resource
3. Get the HTML/CSS files to process
4. Parse the files separately
5. Do the same scenario forCSS
6. Attach styles to the HTML file
7. Rendering process to display theUI
JavaScript
Code
AST Compiler
parser interpreter
Define by the
programmer A kind of tree that each
nodes indicates an order
/ phrase
Compile process
Read the code &
familiar with the
syntax
Interprets the
codes line by line &
save the results
JavaScript Engine
What Happens InThe
Background
Code execution process
01
02
Writing The Code
• What programmer have written in a file.
• Human readable.
• The code is ready to parse now!
Parsing
• Reads the code
• Know the JavaScript rules & syntax
03
04
Abstract Syntax Tree
Interpreter
• A type of Data Structure
• A tree which each node indicates a phrase
or an order
• Separate the code based on types, vars,
functions, etc.
• Codes interprets line by line
• Codes run
• Save the results in the storage (Heap &
Stack)
V8 JS Engine
1. freeand open-sourceJavaScript and
WebAssemblyengine
3.Compilethe wholecodebefore
interpret it & then run the code
2.All the web browsers switchedto
interpreter modeafterV8 release
4. New technologyin JavaScript
5. Finishes a compilation then run the
code
7.Compile& execution is doneat the same
time.
6.JIT compilation technology
8.Two compilersfor codeoptimization
Babel JS
 Babel is a freeand open-sourceJavaScript transpiler that is mainlyused
to convert ECMAScript 2015+codeinto backwards-compatible
JavaScript codethat can be run by olderJavaScript engines.
 It allowsweb developersto takeadvantage of the newest features of
the language.
Advantages
• Supports all JS new features
• Can be used in any browser
• Compatible with popular techs such as React
JS,TS,Gulp,Webpack
Disadvantages
• When Babel JS code is transpiled, the syntax is
changed, making the code more difficult to
understand when it is released in production
• When compared to the original code, the transpiled
code is larger
ES6: ES5:
Recourses:
https://www.youtube.com/watch?v=tM_S-pa4xDk
https://undraw.co/
https://storyset.com/
https://www.codingninjas.com/codestudio/library/introduction-to-babel
https://hashnode.com/post/compiling-vs-transpiling-cl0z2hugi0cjhj6nv6pp6a1j3
https://levelup.gitconnected.com/how-is-typescript-transpiled-to-javascript-e4493727bd9c?gi=2e9cc1df3213
https://www.ecma-international.org/
https://www.roxo.ir/what-is-babel
https://medium.com/@mrajaeim/babel-the-key-to-using-the-latest-javascript-features-in-any-environment
https://babeljs.io/repl#?browsers=defaults&build=&builtIns=false&core
https://babeljs.io/
https://www.youtube.com/watch?v=AE-TfB6jGtw&list=PL_euSNU_eLbejfEUD0msUF8xf_Zjz2f8r
https://github.com/jarble/list-of-transpilers
https://www.youtube.com/watch?v=DuSURHrZG6I
https://www.youtube.com/watch?v=p-iiEDtpy6I
https://babeljs.io/repl#
https://carbon.now.sh
https://www.npmjs.com/package/@babel/parser
Thank You
BabelJS, JS functionality, transpilers & browsers
21/05/2023
By ParhamAbolghasemi,

More Related Content

Similar to Babel.pptx

Busy developer-html5-javaee7
Busy developer-html5-javaee7Busy developer-html5-javaee7
Busy developer-html5-javaee7
Geertjan Wielenga
 
ASP.NET Session 1
ASP.NET Session 1ASP.NET Session 1
ASP.NET Session 1
Sisir Ghosh
 
2-Lec - History of OOP and Java (1) .ppt
2-Lec - History of OOP and Java  (1) .ppt2-Lec - History of OOP and Java  (1) .ppt
2-Lec - History of OOP and Java (1) .ppt
AqeelAbbas94
 
Prelims Coverage for Int 213
Prelims Coverage for Int 213Prelims Coverage for Int 213
Prelims Coverage for Int 213
Jeph Pedrigal
 
PHP Frameworks & Introduction to CodeIgniter
PHP Frameworks & Introduction to CodeIgniterPHP Frameworks & Introduction to CodeIgniter
PHP Frameworks & Introduction to CodeIgniter
Jamshid Hashimi
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
Rajnish Kalla
 
Onlne Retail Management By Jitendra
Onlne Retail Management By JitendraOnlne Retail Management By Jitendra
Onlne Retail Management By Jitendra
Jitendra
 

Similar to Babel.pptx (20)

Java script
Java scriptJava script
Java script
 
Busy developer-html5-javaee7
Busy developer-html5-javaee7Busy developer-html5-javaee7
Busy developer-html5-javaee7
 
A sneak peek into the similarities and differences between java and java script
A sneak peek into the similarities and differences between java and java scriptA sneak peek into the similarities and differences between java and java script
A sneak peek into the similarities and differences between java and java script
 
intoduction to java
intoduction to javaintoduction to java
intoduction to java
 
Simple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVMSimple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVM
 
javascript 1
javascript 1javascript 1
javascript 1
 
Simple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvmSimple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvm
 
ASP.NET Session 1
ASP.NET Session 1ASP.NET Session 1
ASP.NET Session 1
 
Introduction to .net
Introduction to .netIntroduction to .net
Introduction to .net
 
2-Lec - History of OOP and Java (1) .ppt
2-Lec - History of OOP and Java  (1) .ppt2-Lec - History of OOP and Java  (1) .ppt
2-Lec - History of OOP and Java (1) .ppt
 
Eric grover strategies for sharing code with windows 8 and windows phone 8 ...
Eric grover   strategies for sharing code with windows 8 and windows phone 8 ...Eric grover   strategies for sharing code with windows 8 and windows phone 8 ...
Eric grover strategies for sharing code with windows 8 and windows phone 8 ...
 
Prelims Coverage for Int 213
Prelims Coverage for Int 213Prelims Coverage for Int 213
Prelims Coverage for Int 213
 
Java performance tuning
Java performance tuningJava performance tuning
Java performance tuning
 
Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021
 
Javascript best practices
Javascript best practicesJavascript best practices
Javascript best practices
 
InfluxDB 2.0 Client Libraries by Noah Crowley
InfluxDB 2.0 Client Libraries by Noah CrowleyInfluxDB 2.0 Client Libraries by Noah Crowley
InfluxDB 2.0 Client Libraries by Noah Crowley
 
PHP Frameworks & Introduction to CodeIgniter
PHP Frameworks & Introduction to CodeIgniterPHP Frameworks & Introduction to CodeIgniter
PHP Frameworks & Introduction to CodeIgniter
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
 
VivaCore FAQ
VivaCore FAQVivaCore FAQ
VivaCore FAQ
 
Onlne Retail Management By Jitendra
Onlne Retail Management By JitendraOnlne Retail Management By Jitendra
Onlne Retail Management By Jitendra
 

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Recently uploaded (20)

Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 

Babel.pptx