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

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, Ocado
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
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
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 

Babel.pptx