SlideShare a Scribd company logo
PHP vs NodeJS
Saumya Rastogi
Raghav Garg
Traditional Web Technologies vs NodeJS
PHP is a server-side scripting language designed for web development but also used as a general-purpose
programming language.
Originally created by Rasmus Lerdorf in 1994, the PHP reference implementation is now produced by
The PHP Group.
PHP originally stood for Personal Home Page, but it now stands for the recursive backronym PHP:
Hypertext Preprocessor
● Node.js is an open-source, cross-platform JavaScript run-time environment for executing
JavaScript code on server-side.
● It was originally written by Ryan Dahl in 2009.
● It is built by combining Google's V8 JavaScript engine, an event loop, and a low-level I/O API
● Dahl was inspired to create Node.js after seeing a file upload progress bar on Flickr
Companies
Using PHP
Companies
Using NodeJS
Benchmarking comparison between PHP & NodeJS
Understanding the concept
Why NodeJS?
Traditionally for each connection (request) we
spawns a new thread, taking up system RAM
and eventually maxing-out at the amount of
RAM.
Node.js operates on a single-thread, using
non-blocking I/O calls, allowing it to support
tens of thousands of concurrent connections
(held in the event loop).
NodeJS in brief
● Server side Javascript
● Built on Google’s V8 Engine
● Event driven, non blocking I/O
● CommonJS module system
● 8000 lines of C, C++ Code (at the time of release)
● 2000 lines of Javascript (at the time of release)
● 14 Contributors (at the time of release)
NodeJS equals to
Code written in C,
providing some
functionalities to
make a server
Javascript Runtime
Environment
+
Some more JS
code and some
library like
CommonJS
+
WHY?
because JS is a
Single Threaded
Non Blocking
Asynchronous
Concurrent
language
Single Threaded
Non Blocking
Asynchronous
Concurrent
The process goes into the worker thread, does a task as come back when its work is
done.
But how do they magically re-appear in the main thread.
There is a queue, which is maintained to store which worker thread is completed.
Now there is a dedicated worker thread, whose work is to constantly ping the queue
to check is some new task is completed. If there is a callback in the queue it then
checks the main thread if its idle then pass the callback to run else if busy then wait
for it be to get freed.
This dedicated worker thread is known as Event Loop.
Lets see it in working, Loupe
Coding Style
● PHP
○ As we’re all familiar with PHP’s coding style and we know that its very linear. Trying to multitask in PHP is a
schlep.
○ As we go on writing code, a developer knows that the flow for processing that particular code will be same as
its written (line-by-line).
● NodeJS
○ The major advantage here is asynchronous. Pretty much everything is multitasking.
○ Due to this, a developer must write the code in such a style so that he/she can handle the requests made by
multiple clients efficiently.
Working of PHP vs NodeJS
Working of PHP vs NodeJS
PHP NodeJS
Package Manager NPM
Popular Frameworks
ORM SQL: Eloquent
Mongo: null
SQL: BookshelfJS(KnexJS)
Mongo: Mongoose
Templating Engine Blade Express Handlebars, EJS
Debugging Whoops Node Inspector, App Logs
Testing PHP Unit Mocha, Chai, Assert
Rising
popularity &
usage of
Javascript
Ad

More Related Content

What's hot (20)

The art of concurrent programming
The art of concurrent programmingThe art of concurrent programming
The art of concurrent programming
Iskren Chernev
 
Crystal
CrystalCrystal
Crystal
Kamil Lelonek
 
Typescript for the programmers who like javascript
Typescript for the programmers who like javascriptTypescript for the programmers who like javascript
Typescript for the programmers who like javascript
Andrei Sebastian Cîmpean
 
Intro to Crystal Programming Language
Intro to Crystal Programming LanguageIntro to Crystal Programming Language
Intro to Crystal Programming Language
Adler Hsieh
 
Rubinius - Ruby Implemented with Ruby
Rubinius - Ruby Implemented with RubyRubinius - Ruby Implemented with Ruby
Rubinius - Ruby Implemented with Ruby
Akanksha Agrawal
 
Groovy / comparison with java
Groovy / comparison with javaGroovy / comparison with java
Groovy / comparison with java
Liviu Tudor
 
TypeScript 101 - Studio Session - Accenture Liquid Studio
TypeScript 101 - Studio Session - Accenture Liquid StudioTypeScript 101 - Studio Session - Accenture Liquid Studio
TypeScript 101 - Studio Session - Accenture Liquid Studio
Frances Coronel
 
Scala vs ruby
Scala vs rubyScala vs ruby
Scala vs ruby
Kamil Lelonek
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in os
GenchiLu1
 
A brief intro to RubyMotion
A brief intro to RubyMotionA brief intro to RubyMotion
A brief intro to RubyMotion
Kamil Lelonek
 
Php under the_hood
Php under the_hoodPhp under the_hood
Php under the_hood
frank_neff
 
Writing NetBSD Sound Drivers in Haskell
Writing NetBSD Sound Drivers in HaskellWriting NetBSD Sound Drivers in Haskell
Writing NetBSD Sound Drivers in Haskell
Kiwamu Okabe
 
Sculpin
SculpinSculpin
Sculpin
Chris Tankersley
 
TypeScript - Silver Bullet for the Full-stack Developers
TypeScript - Silver Bullet for the Full-stack DevelopersTypeScript - Silver Bullet for the Full-stack Developers
TypeScript - Silver Bullet for the Full-stack Developers
Rutenis Turcinas
 
Ruby, the language of devops
Ruby, the language of devopsRuby, the language of devops
Ruby, the language of devops
Rob Kinyon
 
Beginning python programming
Beginning python programmingBeginning python programming
Beginning python programming
kanteshraj
 
Always be testing
Always be testingAlways be testing
Always be testing
Ignacio Burgueño
 
PHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the foolPHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the fool
Alessandro Cinelli (cirpo)
 
hexMachina WWX 2016
hexMachina WWX 2016hexMachina WWX 2016
hexMachina WWX 2016
Francis Bourre
 
Proxying DBI with DBD::Gofer and App::Staticperl
Proxying DBI with DBD::Gofer and App::StaticperlProxying DBI with DBD::Gofer and App::Staticperl
Proxying DBI with DBD::Gofer and App::Staticperl
nohuhu
 
The art of concurrent programming
The art of concurrent programmingThe art of concurrent programming
The art of concurrent programming
Iskren Chernev
 
Typescript for the programmers who like javascript
Typescript for the programmers who like javascriptTypescript for the programmers who like javascript
Typescript for the programmers who like javascript
Andrei Sebastian Cîmpean
 
Intro to Crystal Programming Language
Intro to Crystal Programming LanguageIntro to Crystal Programming Language
Intro to Crystal Programming Language
Adler Hsieh
 
Rubinius - Ruby Implemented with Ruby
Rubinius - Ruby Implemented with RubyRubinius - Ruby Implemented with Ruby
Rubinius - Ruby Implemented with Ruby
Akanksha Agrawal
 
Groovy / comparison with java
Groovy / comparison with javaGroovy / comparison with java
Groovy / comparison with java
Liviu Tudor
 
TypeScript 101 - Studio Session - Accenture Liquid Studio
TypeScript 101 - Studio Session - Accenture Liquid StudioTypeScript 101 - Studio Session - Accenture Liquid Studio
TypeScript 101 - Studio Session - Accenture Liquid Studio
Frances Coronel
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in os
GenchiLu1
 
A brief intro to RubyMotion
A brief intro to RubyMotionA brief intro to RubyMotion
A brief intro to RubyMotion
Kamil Lelonek
 
Php under the_hood
Php under the_hoodPhp under the_hood
Php under the_hood
frank_neff
 
Writing NetBSD Sound Drivers in Haskell
Writing NetBSD Sound Drivers in HaskellWriting NetBSD Sound Drivers in Haskell
Writing NetBSD Sound Drivers in Haskell
Kiwamu Okabe
 
TypeScript - Silver Bullet for the Full-stack Developers
TypeScript - Silver Bullet for the Full-stack DevelopersTypeScript - Silver Bullet for the Full-stack Developers
TypeScript - Silver Bullet for the Full-stack Developers
Rutenis Turcinas
 
Ruby, the language of devops
Ruby, the language of devopsRuby, the language of devops
Ruby, the language of devops
Rob Kinyon
 
Beginning python programming
Beginning python programmingBeginning python programming
Beginning python programming
kanteshraj
 
PHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the foolPHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the fool
Alessandro Cinelli (cirpo)
 
Proxying DBI with DBD::Gofer and App::Staticperl
Proxying DBI with DBD::Gofer and App::StaticperlProxying DBI with DBD::Gofer and App::Staticperl
Proxying DBI with DBD::Gofer and App::Staticperl
nohuhu
 

Similar to PHP vs Node.js (20)

PHP Vs NodeJS for Backend Web Development.pdf
PHP Vs NodeJS for Backend Web Development.pdfPHP Vs NodeJS for Backend Web Development.pdf
PHP Vs NodeJS for Backend Web Development.pdf
SofiaCarter4
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
Ahmed Elbassel
 
Nodejs
NodejsNodejs
Nodejs
Vinod Kumar Marupu
 
Node.Js vs PHP Which One Should You Choose.pdf
Node.Js vs PHP Which One Should You Choose.pdfNode.Js vs PHP Which One Should You Choose.pdf
Node.Js vs PHP Which One Should You Choose.pdf
WPWeb Infotech
 
Node.js vs PHP, What should SMBs prefer for web development.pdf
Node.js vs PHP, What should SMBs prefer for web development.pdfNode.js vs PHP, What should SMBs prefer for web development.pdf
Node.js vs PHP, What should SMBs prefer for web development.pdf
Mindfire LLC
 
Kalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect GuideKalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect Guide
Kalp Corporate
 
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
Node Js Non-blocking or asynchronous  Blocking or synchronous.pdfNode Js Non-blocking or asynchronous  Blocking or synchronous.pdf
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
DarshanaMallick
 
Deep Dive into Node.js Event Loop.pdf
Deep Dive into Node.js Event Loop.pdfDeep Dive into Node.js Event Loop.pdf
Deep Dive into Node.js Event Loop.pdf
ShubhamChaurasia88
 
Nodejs
NodejsNodejs
Nodejs
Bhushan Patil
 
PHP and Node.js-Differences and Similarities
PHP and Node.js-Differences and SimilaritiesPHP and Node.js-Differences and Similarities
PHP and Node.js-Differences and Similarities
Cloud Analogy
 
Exploring PHP's Built-in Functions
Exploring PHP's Built-in FunctionsExploring PHP's Built-in Functions
Exploring PHP's Built-in Functions
Emma Thompson
 
Node.Js Vs PHP: Which is Likely a Better Server Side Environment?
Node.Js Vs PHP: Which is Likely a Better Server Side Environment?Node.Js Vs PHP: Which is Likely a Better Server Side Environment?
Node.Js Vs PHP: Which is Likely a Better Server Side Environment?
Believ-In Technologies
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
Khaled Mosharraf
 
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
PixelCrayons
 
Nodejs web service for starters
Nodejs web service for startersNodejs web service for starters
Nodejs web service for starters
Bruce Li
 
Best NODE-JS Online Training - Naresh IT
Best NODE-JS Online Training - Naresh ITBest NODE-JS Online Training - Naresh IT
Best NODE-JS Online Training - Naresh IT
Naresh IT
 
Node.js vs PHP_ Which is a good choice for your project_.pdf
Node.js vs PHP_ Which is a good choice for your project_.pdfNode.js vs PHP_ Which is a good choice for your project_.pdf
Node.js vs PHP_ Which is a good choice for your project_.pdf
MoonTechnolabsPvtLtd
 
Node JS vs PHP Which Backend to Choose for Your Project.pdf
Node JS vs PHP Which Backend to Choose for Your Project.pdfNode JS vs PHP Which Backend to Choose for Your Project.pdf
Node JS vs PHP Which Backend to Choose for Your Project.pdf
Pixlogix Infotech
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1
ADARSH BHATT
 
Presentation php
Presentation phpPresentation php
Presentation php
cegonsoft1999
 
PHP Vs NodeJS for Backend Web Development.pdf
PHP Vs NodeJS for Backend Web Development.pdfPHP Vs NodeJS for Backend Web Development.pdf
PHP Vs NodeJS for Backend Web Development.pdf
SofiaCarter4
 
Node.Js vs PHP Which One Should You Choose.pdf
Node.Js vs PHP Which One Should You Choose.pdfNode.Js vs PHP Which One Should You Choose.pdf
Node.Js vs PHP Which One Should You Choose.pdf
WPWeb Infotech
 
Node.js vs PHP, What should SMBs prefer for web development.pdf
Node.js vs PHP, What should SMBs prefer for web development.pdfNode.js vs PHP, What should SMBs prefer for web development.pdf
Node.js vs PHP, What should SMBs prefer for web development.pdf
Mindfire LLC
 
Kalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect GuideKalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect Guide
Kalp Corporate
 
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
Node Js Non-blocking or asynchronous  Blocking or synchronous.pdfNode Js Non-blocking or asynchronous  Blocking or synchronous.pdf
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
DarshanaMallick
 
Deep Dive into Node.js Event Loop.pdf
Deep Dive into Node.js Event Loop.pdfDeep Dive into Node.js Event Loop.pdf
Deep Dive into Node.js Event Loop.pdf
ShubhamChaurasia88
 
PHP and Node.js-Differences and Similarities
PHP and Node.js-Differences and SimilaritiesPHP and Node.js-Differences and Similarities
PHP and Node.js-Differences and Similarities
Cloud Analogy
 
Exploring PHP's Built-in Functions
Exploring PHP's Built-in FunctionsExploring PHP's Built-in Functions
Exploring PHP's Built-in Functions
Emma Thompson
 
Node.Js Vs PHP: Which is Likely a Better Server Side Environment?
Node.Js Vs PHP: Which is Likely a Better Server Side Environment?Node.Js Vs PHP: Which is Likely a Better Server Side Environment?
Node.Js Vs PHP: Which is Likely a Better Server Side Environment?
Believ-In Technologies
 
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
PixelCrayons
 
Nodejs web service for starters
Nodejs web service for startersNodejs web service for starters
Nodejs web service for starters
Bruce Li
 
Best NODE-JS Online Training - Naresh IT
Best NODE-JS Online Training - Naresh ITBest NODE-JS Online Training - Naresh IT
Best NODE-JS Online Training - Naresh IT
Naresh IT
 
Node.js vs PHP_ Which is a good choice for your project_.pdf
Node.js vs PHP_ Which is a good choice for your project_.pdfNode.js vs PHP_ Which is a good choice for your project_.pdf
Node.js vs PHP_ Which is a good choice for your project_.pdf
MoonTechnolabsPvtLtd
 
Node JS vs PHP Which Backend to Choose for Your Project.pdf
Node JS vs PHP Which Backend to Choose for Your Project.pdfNode JS vs PHP Which Backend to Choose for Your Project.pdf
Node JS vs PHP Which Backend to Choose for Your Project.pdf
Pixlogix Infotech
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1
ADARSH BHATT
 
Ad

More from Squareboat (20)

Squareboat Deck
Squareboat DeckSquareboat Deck
Squareboat Deck
Squareboat
 
Squareboat Branding Proposal
Squareboat Branding ProposalSquareboat Branding Proposal
Squareboat Branding Proposal
Squareboat
 
Squareboat Product Foundation Process
Squareboat Product Foundation ProcessSquareboat Product Foundation Process
Squareboat Product Foundation Process
Squareboat
 
Squareboat Culture Deck
Squareboat Culture DeckSquareboat Culture Deck
Squareboat Culture Deck
Squareboat
 
Squareboat Design Portfolio
Squareboat Design PortfolioSquareboat Design Portfolio
Squareboat Design Portfolio
Squareboat
 
Squareboat Crew Deck
Squareboat Crew DeckSquareboat Crew Deck
Squareboat Crew Deck
Squareboat
 
High Performance Mysql - Friday Tech Talks at Squareboat
High Performance Mysql - Friday Tech Talks at SquareboatHigh Performance Mysql - Friday Tech Talks at Squareboat
High Performance Mysql - Friday Tech Talks at Squareboat
Squareboat
 
CTA - Call to Attention
CTA - Call to AttentionCTA - Call to Attention
CTA - Call to Attention
Squareboat
 
Tech talk on Tailwind CSS
Tech talk on Tailwind CSSTech talk on Tailwind CSS
Tech talk on Tailwind CSS
Squareboat
 
What’s New in Apple World - WWDC19
What’s New in Apple World - WWDC19What’s New in Apple World - WWDC19
What’s New in Apple World - WWDC19
Squareboat
 
Tech Talk on Microservices at Squareboat
Tech Talk on Microservices at SquareboatTech Talk on Microservices at Squareboat
Tech Talk on Microservices at Squareboat
Squareboat
 
Building Alexa Skills
Building Alexa SkillsBuilding Alexa Skills
Building Alexa Skills
Squareboat
 
Making Products to get users “Hooked”
Making Products to get users “Hooked”Making Products to get users “Hooked”
Making Products to get users “Hooked”
Squareboat
 
Moving to Docker... Finally!
Moving to Docker... Finally!Moving to Docker... Finally!
Moving to Docker... Finally!
Squareboat
 
Color Theory
Color TheoryColor Theory
Color Theory
Squareboat
 
Continuous Delivery process
Continuous Delivery processContinuous Delivery process
Continuous Delivery process
Squareboat
 
HTML and CSS architecture for 2025
HTML and CSS architecture for 2025HTML and CSS architecture for 2025
HTML and CSS architecture for 2025
Squareboat
 
Vue JS
Vue JSVue JS
Vue JS
Squareboat
 
The rise of Conversational User Interfaces
The rise of Conversational User Interfaces The rise of Conversational User Interfaces
The rise of Conversational User Interfaces
Squareboat
 
Thinking of growth as a feature
Thinking of growth as a feature Thinking of growth as a feature
Thinking of growth as a feature
Squareboat
 
Squareboat Deck
Squareboat DeckSquareboat Deck
Squareboat Deck
Squareboat
 
Squareboat Branding Proposal
Squareboat Branding ProposalSquareboat Branding Proposal
Squareboat Branding Proposal
Squareboat
 
Squareboat Product Foundation Process
Squareboat Product Foundation ProcessSquareboat Product Foundation Process
Squareboat Product Foundation Process
Squareboat
 
Squareboat Culture Deck
Squareboat Culture DeckSquareboat Culture Deck
Squareboat Culture Deck
Squareboat
 
Squareboat Design Portfolio
Squareboat Design PortfolioSquareboat Design Portfolio
Squareboat Design Portfolio
Squareboat
 
Squareboat Crew Deck
Squareboat Crew DeckSquareboat Crew Deck
Squareboat Crew Deck
Squareboat
 
High Performance Mysql - Friday Tech Talks at Squareboat
High Performance Mysql - Friday Tech Talks at SquareboatHigh Performance Mysql - Friday Tech Talks at Squareboat
High Performance Mysql - Friday Tech Talks at Squareboat
Squareboat
 
CTA - Call to Attention
CTA - Call to AttentionCTA - Call to Attention
CTA - Call to Attention
Squareboat
 
Tech talk on Tailwind CSS
Tech talk on Tailwind CSSTech talk on Tailwind CSS
Tech talk on Tailwind CSS
Squareboat
 
What’s New in Apple World - WWDC19
What’s New in Apple World - WWDC19What’s New in Apple World - WWDC19
What’s New in Apple World - WWDC19
Squareboat
 
Tech Talk on Microservices at Squareboat
Tech Talk on Microservices at SquareboatTech Talk on Microservices at Squareboat
Tech Talk on Microservices at Squareboat
Squareboat
 
Building Alexa Skills
Building Alexa SkillsBuilding Alexa Skills
Building Alexa Skills
Squareboat
 
Making Products to get users “Hooked”
Making Products to get users “Hooked”Making Products to get users “Hooked”
Making Products to get users “Hooked”
Squareboat
 
Moving to Docker... Finally!
Moving to Docker... Finally!Moving to Docker... Finally!
Moving to Docker... Finally!
Squareboat
 
Continuous Delivery process
Continuous Delivery processContinuous Delivery process
Continuous Delivery process
Squareboat
 
HTML and CSS architecture for 2025
HTML and CSS architecture for 2025HTML and CSS architecture for 2025
HTML and CSS architecture for 2025
Squareboat
 
The rise of Conversational User Interfaces
The rise of Conversational User Interfaces The rise of Conversational User Interfaces
The rise of Conversational User Interfaces
Squareboat
 
Thinking of growth as a feature
Thinking of growth as a feature Thinking of growth as a feature
Thinking of growth as a feature
Squareboat
 
Ad

Recently uploaded (20)

Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
MINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PRMINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PR
MIND CTI
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
Top 10 IT Help Desk Outsourcing Services
Top 10 IT Help Desk Outsourcing ServicesTop 10 IT Help Desk Outsourcing Services
Top 10 IT Help Desk Outsourcing Services
Infrassist Technologies Pvt. Ltd.
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
MINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PRMINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PR
MIND CTI
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 

PHP vs Node.js

  • 1. PHP vs NodeJS Saumya Rastogi Raghav Garg Traditional Web Technologies vs NodeJS
  • 2. PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. Originally created by Rasmus Lerdorf in 1994, the PHP reference implementation is now produced by The PHP Group. PHP originally stood for Personal Home Page, but it now stands for the recursive backronym PHP: Hypertext Preprocessor
  • 3. ● Node.js is an open-source, cross-platform JavaScript run-time environment for executing JavaScript code on server-side. ● It was originally written by Ryan Dahl in 2009. ● It is built by combining Google's V8 JavaScript engine, an event loop, and a low-level I/O API ● Dahl was inspired to create Node.js after seeing a file upload progress bar on Flickr
  • 7. Why NodeJS? Traditionally for each connection (request) we spawns a new thread, taking up system RAM and eventually maxing-out at the amount of RAM. Node.js operates on a single-thread, using non-blocking I/O calls, allowing it to support tens of thousands of concurrent connections (held in the event loop).
  • 8. NodeJS in brief ● Server side Javascript ● Built on Google’s V8 Engine ● Event driven, non blocking I/O ● CommonJS module system ● 8000 lines of C, C++ Code (at the time of release) ● 2000 lines of Javascript (at the time of release) ● 14 Contributors (at the time of release)
  • 9. NodeJS equals to Code written in C, providing some functionalities to make a server Javascript Runtime Environment + Some more JS code and some library like CommonJS +
  • 10. WHY?
  • 11. because JS is a Single Threaded Non Blocking Asynchronous Concurrent language
  • 13. The process goes into the worker thread, does a task as come back when its work is done. But how do they magically re-appear in the main thread. There is a queue, which is maintained to store which worker thread is completed. Now there is a dedicated worker thread, whose work is to constantly ping the queue to check is some new task is completed. If there is a callback in the queue it then checks the main thread if its idle then pass the callback to run else if busy then wait for it be to get freed. This dedicated worker thread is known as Event Loop. Lets see it in working, Loupe
  • 14. Coding Style ● PHP ○ As we’re all familiar with PHP’s coding style and we know that its very linear. Trying to multitask in PHP is a schlep. ○ As we go on writing code, a developer knows that the flow for processing that particular code will be same as its written (line-by-line). ● NodeJS ○ The major advantage here is asynchronous. Pretty much everything is multitasking. ○ Due to this, a developer must write the code in such a style so that he/she can handle the requests made by multiple clients efficiently.
  • 15. Working of PHP vs NodeJS
  • 16. Working of PHP vs NodeJS
  • 17. PHP NodeJS Package Manager NPM Popular Frameworks ORM SQL: Eloquent Mongo: null SQL: BookshelfJS(KnexJS) Mongo: Mongoose Templating Engine Blade Express Handlebars, EJS Debugging Whoops Node Inspector, App Logs Testing PHP Unit Mocha, Chai, Assert