SlideShare une entreprise Scribd logo
1  sur  16
© 2017 Citrix | Confidential
Developing with
Node.js
Tech Bytes
Subramanian Krishnan
Architect, Management & Analytics
AUGUST 3, 2022
© 2017 Citrix | Confidential
“People don’t buy
what you do; they
buy why you do it. ”
Simon Sinek
Image source: Google search
Stackoverflow survey 2017
Source: https://insights.stackoverflow.com/survey/2017
Stackify report 2017
Source: https://stackify.com/trendiest-programming-languages-hottest-sought-programming-languages-2017/
1. Build APIs
• BFF
2. Rapid experimentation
• Hackathons
3. Application modernization
• Strangler
4. Cross platform digital
experiences
• Electron
5. IoT applications
• Small footprint
Forrester Report 2016
Common use-cases
• Built almost twice as fast with fewer people
• Written in 33% fewer lines of code
• Constructed with 40% fewer files
PayPal case study
• Double the requests per second vs. the Java
application.
• 35% decrease in the average response time
for the same page.
Source: https://www.paypal-engineering.com/2013/11/22/node-js-at-paypal/
What is Node.js?
• Open source
• Cross platform
• Server-side
• Javascript runtime
• Event driven
• Non-blocking IO
• Scaleable
Runtime Architecture
• Google V8 => Open-source JavaScript engine,
JIT compiled, efficient GC, fast property access
• Libuv => Multi-platform, high performance,
event driven, async io library
• Event Loop => Single threaded, non-blocking,
executes all user code
• Bindings => Bind JavaScript to native
implementations
• Core Library => System JS libraries for File,
Network, Crypto and other basic functions
Source: https://nodejs.org/en/about/
Event-Loop
• Implemented in libuv
• Event-loop starts automatically at program
startup after initialization script is run
• Exits if there are no active callbacks
• Each phase has a FIFO queue of callbacks to
executed
• Network IO performed on single thread
• File IO performed using threads from pool
Event-loop
Source: http://docs.libuv.org/en/v1.x/design.html
Thread vs Event-Loop
Source: https://strongloop.com/strongblog/node-js-is-faster-than-java/
1. Most fundamental programming construct of Node.js
2. Introduces a different mental and programming paradigm
3. All async functions needs to have a callback defined
4. By convention callback is usually the last parameter
5. By convention, first parameter of callback is error
Callbacks in Node.js
Source: https://www.tutorialspoint.com/nodejs/nodejs_callbacks_concept.htm
• NPM is package manager for JavaScript and Node.js
• World’s largest software registry (477,000)
• Install, share, distribute code and manage
dependencies
• Vibrant ecosystem
• Command line client
• OSS contribution
• 3,052,839,996 weekly package downloads
Node Package Manager (NPM)
Image source: Google search
• Minimal and flexible web application framework
• Robust set of features for web and mobile
applications
• Myriad of HTTP utility methods and middleware at
your disposal
• Creating a robust API is quick and easy
• De-facto app server framework for Node.js
• Integrates well with frontend frameworks like
JQuery, AngularJS, ReactJS
Express
Image source: Google search
• Feature-rich JavaScript test framework
• Simple and fun
• Test coverage reporting
• Async testing support
• Reports test durations
• before, after, before each, after each hooks
• Optionally run tests that match a regexp
• More…
TDD with Mocha
Image source: Google search
• GET /timeofday
 Returns me current
timestamp
Demo – I need an API
• GET /timeofday
 Authenticates request
• GET /timeofday?epoch=true
 Returns me current time as
epoc value
Req1
Req2
Req3
Anatomy of the Node.js app

Contenu connexe

Similaire à Nodejs Techtalk.pptx

Reaktive Programmierung mit den Reactive Extensions (Rx)
Reaktive Programmierung mit den Reactive Extensions (Rx)Reaktive Programmierung mit den Reactive Extensions (Rx)
Reaktive Programmierung mit den Reactive Extensions (Rx)NETUserGroupBern
 
Keynote - Open Source 101 - How JavaScript Became a Legitimate Open Source En...
Keynote - Open Source 101 - How JavaScript Became a Legitimate Open Source En...Keynote - Open Source 101 - How JavaScript Became a Legitimate Open Source En...
Keynote - Open Source 101 - How JavaScript Became a Legitimate Open Source En...Mark Hinkle
 
Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Reactive Fast Data & the Data Lake with Akka, Kafka, SparkReactive Fast Data & the Data Lake with Akka, Kafka, Spark
Reactive Fast Data & the Data Lake with Akka, Kafka, SparkTodd Fritz
 
How do JavaScript frameworks impact the security of applications?
How do JavaScript frameworks impact the security of applications?How do JavaScript frameworks impact the security of applications?
How do JavaScript frameworks impact the security of applications?Ksenia Peguero
 
Stacker's the way you connect the world .pptx
Stacker's the way you connect the world .pptxStacker's the way you connect the world .pptx
Stacker's the way you connect the world .pptxBOBY RISHABH KUMAR SHARMA
 
DeveloperWeek Global 2020 - OpenJS Foundation - The First 25 Years of Javascr...
DeveloperWeek Global 2020 - OpenJS Foundation - The First 25 Years of Javascr...DeveloperWeek Global 2020 - OpenJS Foundation - The First 25 Years of Javascr...
DeveloperWeek Global 2020 - OpenJS Foundation - The First 25 Years of Javascr...Bethany Nicolle Griggs
 
Сергей Лёвкин «Технологии Microsoft для актуальных трендов»
Сергей Лёвкин «Технологии Microsoft для актуальных трендов»Сергей Лёвкин «Технологии Microsoft для актуальных трендов»
Сергей Лёвкин «Технологии Microsoft для актуальных трендов»SpbDotNet Community
 
IoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
IoTWorld 2016 OSS Keynote Param Singh, Ian SkerrettIoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
IoTWorld 2016 OSS Keynote Param Singh, Ian SkerrettParam Singh
 
DotnetConf - Cloud native and .Net5 announcements
DotnetConf - Cloud native and .Net5 announcementsDotnetConf - Cloud native and .Net5 announcements
DotnetConf - Cloud native and .Net5 announcementsSajeetharan
 
ModSecurity 3.0 and NGINX: Getting Started
ModSecurity 3.0 and NGINX: Getting StartedModSecurity 3.0 and NGINX: Getting Started
ModSecurity 3.0 and NGINX: Getting StartedNGINX, Inc.
 
OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture Dev_Events
 
Serverless apps with OpenWhisk
Serverless apps with OpenWhiskServerless apps with OpenWhisk
Serverless apps with OpenWhiskDaniel Krook
 
2022-Devnexus-StatefulMicroservices.pptx.pdf
2022-Devnexus-StatefulMicroservices.pptx.pdf2022-Devnexus-StatefulMicroservices.pptx.pdf
2022-Devnexus-StatefulMicroservices.pptx.pdfGrace Jansen
 
Back to the Future: Containerize Legacy Applications - Rob Tanner, Northern T...
Back to the Future: Containerize Legacy Applications - Rob Tanner, Northern T...Back to the Future: Containerize Legacy Applications - Rob Tanner, Northern T...
Back to the Future: Containerize Legacy Applications - Rob Tanner, Northern T...Docker, Inc.
 
How APIs are Transforming Cisco Solutions and Catalyzing an Innovation Ecosystem
How APIs are Transforming Cisco Solutions and Catalyzing an Innovation EcosystemHow APIs are Transforming Cisco Solutions and Catalyzing an Innovation Ecosystem
How APIs are Transforming Cisco Solutions and Catalyzing an Innovation EcosystemCisco DevNet
 
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, SparkBuilding Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, SparkTodd Fritz
 
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...ServerlessConf
 
A164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdkA164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdkToby Corbin
 

Similaire à Nodejs Techtalk.pptx (20)

Reaktive Programmierung mit den Reactive Extensions (Rx)
Reaktive Programmierung mit den Reactive Extensions (Rx)Reaktive Programmierung mit den Reactive Extensions (Rx)
Reaktive Programmierung mit den Reactive Extensions (Rx)
 
Keynote - Open Source 101 - How JavaScript Became a Legitimate Open Source En...
Keynote - Open Source 101 - How JavaScript Became a Legitimate Open Source En...Keynote - Open Source 101 - How JavaScript Became a Legitimate Open Source En...
Keynote - Open Source 101 - How JavaScript Became a Legitimate Open Source En...
 
Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Reactive Fast Data & the Data Lake with Akka, Kafka, SparkReactive Fast Data & the Data Lake with Akka, Kafka, Spark
Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
 
How do JavaScript frameworks impact the security of applications?
How do JavaScript frameworks impact the security of applications?How do JavaScript frameworks impact the security of applications?
How do JavaScript frameworks impact the security of applications?
 
Stacker's the way you connect the world .pptx
Stacker's the way you connect the world .pptxStacker's the way you connect the world .pptx
Stacker's the way you connect the world .pptx
 
DeveloperWeek Global 2020 - OpenJS Foundation - The First 25 Years of Javascr...
DeveloperWeek Global 2020 - OpenJS Foundation - The First 25 Years of Javascr...DeveloperWeek Global 2020 - OpenJS Foundation - The First 25 Years of Javascr...
DeveloperWeek Global 2020 - OpenJS Foundation - The First 25 Years of Javascr...
 
Сергей Лёвкин «Технологии Microsoft для актуальных трендов»
Сергей Лёвкин «Технологии Microsoft для актуальных трендов»Сергей Лёвкин «Технологии Microsoft для актуальных трендов»
Сергей Лёвкин «Технологии Microsoft для актуальных трендов»
 
Microservices
MicroservicesMicroservices
Microservices
 
IoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
IoTWorld 2016 OSS Keynote Param Singh, Ian SkerrettIoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
IoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
 
DotnetConf - Cloud native and .Net5 announcements
DotnetConf - Cloud native and .Net5 announcementsDotnetConf - Cloud native and .Net5 announcements
DotnetConf - Cloud native and .Net5 announcements
 
ModSecurity 3.0 and NGINX: Getting Started
ModSecurity 3.0 and NGINX: Getting StartedModSecurity 3.0 and NGINX: Getting Started
ModSecurity 3.0 and NGINX: Getting Started
 
OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture
 
Serverless apps with OpenWhisk
Serverless apps with OpenWhiskServerless apps with OpenWhisk
Serverless apps with OpenWhisk
 
2022-Devnexus-StatefulMicroservices.pptx.pdf
2022-Devnexus-StatefulMicroservices.pptx.pdf2022-Devnexus-StatefulMicroservices.pptx.pdf
2022-Devnexus-StatefulMicroservices.pptx.pdf
 
Back to the Future: Containerize Legacy Applications - Rob Tanner, Northern T...
Back to the Future: Containerize Legacy Applications - Rob Tanner, Northern T...Back to the Future: Containerize Legacy Applications - Rob Tanner, Northern T...
Back to the Future: Containerize Legacy Applications - Rob Tanner, Northern T...
 
How APIs are Transforming Cisco Solutions and Catalyzing an Innovation Ecosystem
How APIs are Transforming Cisco Solutions and Catalyzing an Innovation EcosystemHow APIs are Transforming Cisco Solutions and Catalyzing an Innovation Ecosystem
How APIs are Transforming Cisco Solutions and Catalyzing an Innovation Ecosystem
 
Open by Design
Open by DesignOpen by Design
Open by Design
 
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, SparkBuilding Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
 
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
 
A164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdkA164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdk
 

Dernier

%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxalwaysnagaraju26
 
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
 
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
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 

Dernier (20)

%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
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...
 
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
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

Nodejs Techtalk.pptx

  • 1. © 2017 Citrix | Confidential Developing with Node.js Tech Bytes Subramanian Krishnan Architect, Management & Analytics AUGUST 3, 2022 © 2017 Citrix | Confidential
  • 2. “People don’t buy what you do; they buy why you do it. ” Simon Sinek Image source: Google search
  • 3. Stackoverflow survey 2017 Source: https://insights.stackoverflow.com/survey/2017
  • 4. Stackify report 2017 Source: https://stackify.com/trendiest-programming-languages-hottest-sought-programming-languages-2017/
  • 5. 1. Build APIs • BFF 2. Rapid experimentation • Hackathons 3. Application modernization • Strangler 4. Cross platform digital experiences • Electron 5. IoT applications • Small footprint Forrester Report 2016 Common use-cases
  • 6. • Built almost twice as fast with fewer people • Written in 33% fewer lines of code • Constructed with 40% fewer files PayPal case study • Double the requests per second vs. the Java application. • 35% decrease in the average response time for the same page. Source: https://www.paypal-engineering.com/2013/11/22/node-js-at-paypal/
  • 7. What is Node.js? • Open source • Cross platform • Server-side • Javascript runtime • Event driven • Non-blocking IO • Scaleable
  • 8. Runtime Architecture • Google V8 => Open-source JavaScript engine, JIT compiled, efficient GC, fast property access • Libuv => Multi-platform, high performance, event driven, async io library • Event Loop => Single threaded, non-blocking, executes all user code • Bindings => Bind JavaScript to native implementations • Core Library => System JS libraries for File, Network, Crypto and other basic functions Source: https://nodejs.org/en/about/
  • 9. Event-Loop • Implemented in libuv • Event-loop starts automatically at program startup after initialization script is run • Exits if there are no active callbacks • Each phase has a FIFO queue of callbacks to executed • Network IO performed on single thread • File IO performed using threads from pool Event-loop Source: http://docs.libuv.org/en/v1.x/design.html
  • 10. Thread vs Event-Loop Source: https://strongloop.com/strongblog/node-js-is-faster-than-java/
  • 11. 1. Most fundamental programming construct of Node.js 2. Introduces a different mental and programming paradigm 3. All async functions needs to have a callback defined 4. By convention callback is usually the last parameter 5. By convention, first parameter of callback is error Callbacks in Node.js Source: https://www.tutorialspoint.com/nodejs/nodejs_callbacks_concept.htm
  • 12. • NPM is package manager for JavaScript and Node.js • World’s largest software registry (477,000) • Install, share, distribute code and manage dependencies • Vibrant ecosystem • Command line client • OSS contribution • 3,052,839,996 weekly package downloads Node Package Manager (NPM) Image source: Google search
  • 13. • Minimal and flexible web application framework • Robust set of features for web and mobile applications • Myriad of HTTP utility methods and middleware at your disposal • Creating a robust API is quick and easy • De-facto app server framework for Node.js • Integrates well with frontend frameworks like JQuery, AngularJS, ReactJS Express Image source: Google search
  • 14. • Feature-rich JavaScript test framework • Simple and fun • Test coverage reporting • Async testing support • Reports test durations • before, after, before each, after each hooks • Optionally run tests that match a regexp • More… TDD with Mocha Image source: Google search
  • 15. • GET /timeofday  Returns me current timestamp Demo – I need an API • GET /timeofday  Authenticates request • GET /timeofday?epoch=true  Returns me current time as epoc value Req1 Req2 Req3
  • 16. Anatomy of the Node.js app

Notes de l'éditeur

  1. .
  2. Source: https://insights.stackoverflow.com/survey/2017 64,000 developers took our annual survey in January. Developer profile – Geo, Type, Experience, Education, Gender, Ethnicity,
  3. Source: https://stackify.com/trendiest-programming-languages-hottest-sought-programming-languages-2017/ Published November 2017 Here are the top 20 programming languages by total GitHub pushes
  4. Lowe’s NASA Node.js Foundation NodeSource Solstice WillowTree YLD BFF – Server side api to access SoR, downstream services
  5. Source: https://www.paypal-engineering.com/2013/11/22/node-js-at-paypal/ 5 java developers with 2 months headstart 2 Node developers Meet at the same point
  6. Source: https://docs.cloudfoundry.org/services/overview.html
  7. Source: https://nodejs.org/en/about/ https://en.wikipedia.org/wiki/Node.js https://github.com/v8/v8/wiki/Introduction https://www.slideshare.net/garyyeh165/node-js-51267496 http://docs.libuv.org/en/v1.x/design.html https://blog.risingstack.com/writing-native-node-js-modules/
  8. Source: http://docs.libuv.org/en/v1.x/design.html https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/ timers: this phase executes callbacks scheduled by setTimeout() and setInterval(). I/O callbacks: executes almost all callbacks with the exception of close callbacks, the ones scheduled by timers, and setImmediate(). idle, prepare: only used internally. poll: retrieve new I/O events; node will block here when appropriate. check: setImmediate() callbacks are invoked here. close callbacks: e.g. socket.on('close', ...). Handles represent long-lived objects capable of performing certain operations while active. Requests represent (typically) short-lived operations. These operations can be performed over a handle.
  9. Source: https://strongloop.com/strongblog/node-js-is-faster-than-java/
  10. Source: https://docs.nodejitsu.com/articles/getting-started/control-flow/what-are-callbacks/
  11. Source: https://www.npmjs.com/ Productivity Liberal license
  12. Source: https://expressjs.com/
  13. Source: https://mochajs.org/
  14. References: https://medium.com/@adnanrahic/hello-world-app-with-node-js-and-express-c1eb7cfa8a30
  15. References: https://www.sitepoint.com/10-tips-to-become-a-better-node-developer/ https://www.sitepoint.com/node-js-best-practices-from-the-node-gurus/ http://davidshariff.com/blog/javascript-inheritance-patterns/