Intro To Back-End Dev & Node Js
Intro To Back-End Dev & Node Js
Intro to Back-End
Development & Node JS
Outline
Backend development means working on server-side application, which focuses on everything you
can’t see on a website. Back-end developers ensure the website performs correctly, focusing on
databases, back-end logic, application programming interface (APIs), architecture, and servers. They
use code that helps browsers communicate with databases, store, understand, and delete data.
REST API
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine (written in C++). Node.js uses
an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package
ecosystem, npm, is the largest ecosystem of open source libraries in the world.
Src: https://nodejs.dev/learn
What is API ?
API stands for Application Programming Interfaces. APIs are mechanisms that enable two software
components to communicate with each other using a set of definitions and protocols.
For example, the weather bureau’s software system contains daily weather data. The weather app on
your phone “talks” to this system via APIs and shows you daily weather updates on your phone.
You can think of an API as a gateway between clients and resources on the web.
API Architectures
API architecture is usually explained in terms of client and server. The application sending the request
is called the client, and the application sending the response is called the server. So in the weather
example, the bureau’s weather database is the server, and the mobile app is the client.
There are many different ways that APIs can work depending on when and why they were created.
API Architectures
SOAP Websocket
These APIs use Simple Object Access Protocol. Client and Websocket API is another modern web API development that
server exchange messages using XML. This is a less flexible uses JSON objects to pass data. A WebSocket API supports
API that was more popular in the past. two-way communication between client apps and the server.
The server can send callback messages to connected clients,
making it more efficient than REST API.
RPC REST
These APIs are called Remote Procedure Calls. The client These are the most popular and flexible APIs found on the
completes a function (or procedure) on the server, and the web today. The client sends requests to the server as data.
server sends the output back to the client. The server uses this client input to start internal functions
and returns output data back to the client.
What is REST API ?
REST stands for Representational State Transfer. REST defines a set of functions like GET, PUT, DELETE,
etc. that clients can use to access server data. Clients and servers exchange data using HTTP.
The main feature of REST API is statelessness. Statelessness means that servers do not save client
data between requests. Client requests to the server are similar to URLs you type in your browser to
visit a website. The response from the server is plain data, without the typical graphical rendering of a
web page.
Create Simple REST API with NodeJS
Create Simple REST API with NodeJS
Introduction to ExpressJS
The Express philosophy is to provide small, robust tooling for HTTP servers, making it a great solution
for single page applications, websites, hybrids, or public HTTP APIs.
Create Simple REST API with ExpressJS
2. Installation
A protocol is a set of rules. The network protocols are formal standards and policies, made up of
restrictions, procedures, and formats, that define the exchange of data packets to achieve
communication between two servers or more devices over a network.
Types of protocols :
● Transmission Control Protocol (TCP)
● Internet Protocol (IP)
● User Datagram Protocol (UDP)
● Post office Protocol (POP)
● Simple mail transport Protocol (SMTP)
● File Transfer Protocol (FTP)
● Hyper Text Transfer Protocol (HTTP)
● Hyper Text Transfer Protocol Secure (HTTPS)
● Etc …
HTTP Request Methods
GET
● The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
POST
● The POST method submits an entity to the specified resource, often causing a change in state or side effects on the server.
PUT
● The PUT method replaces all current representations of the target resource with the request payload.
DELETE
PATCH
Create REST API using ExpressJS with all HTTP request methods.
Thank You!