0% found this document useful (0 votes)
42 views24 pages

Unit 1 Notes

IP is a fundamental internet protocol that assigns addresses and routes data packets across networks. It enables key functions like addressing, routing, interoperability, scalability, and security that underpin web technologies. IP also supports mobility and global connectivity, allowing seamless communication regardless of location.

Uploaded by

sonal raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views24 pages

Unit 1 Notes

IP is a fundamental internet protocol that assigns addresses and routes data packets across networks. It enables key functions like addressing, routing, interoperability, scalability, and security that underpin web technologies. IP also supports mobility and global connectivity, allowing seamless communication regardless of location.

Uploaded by

sonal raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

https://www.studocu.

com/in/document/dr-apj-abdul-kalam-technical-university/web-technology/web-
technologies/84552628?origin=course-new-1

2023 ques. what is internet protocol why it is important in web technology?

Ans. Internet Protocol: The Internet Protocol (IP) is a protocol, or set of rules, for routing and
addressing packets of data so that they can travel across networks and arrive at the correct destination.
Data traversing the Internet is divided into smaller pieces, called packets. IP information is attached to
each packet, and this information helps routers to send packets to the right place. Every device
or domain that connects to the Internet is assigned an IP address, and as packets are directed to the
IP address attached to them, data arrives where it is needed.

Or in other words,the Internet Protocol (IP) is a fundamental protocol that governs how data packets
are routed and transmitted over the Internet. It provides the addressing and routing mechanisms
necessary for data to travel from one network device to another across the internet.

IP is crucial in web technology for several reasons:

1. Addressing: IP assigns unique addresses to every device connected to the internet, allowing data
packets to be sent to and received from specific destinations. Without IP addressing, it would be
impossible to reliably route data across the internet.

2. Routing: IP enables routers to efficiently forward data packets along the best path from the source
to the destination. This routing capability is essential for the internet to function as a global network of
interconnected devices.

3. Interoperability: IP is a standardized protocol, ensuring that devices from different manufacturers and
running different software can communicate with each other over the internet. This interoperability is
crucial for the internet's openness and accessibility.

4. Scalability: IP is designed to support a vast number of devices and networks, allowing the internet
to grow and accommodate increasing numbers of users and connected devices without significant
changes to its underlying infrastructure.

5. Layering: IP operates at the network layer of the OSI model, providing a foundation upon which
higher-layer protocols, such as TCP (Transmission Control Protocol) and UDP (User Datagram Protocol),
can build. These protocols rely on IP for addressing and routing, forming the basis of many internet
services and applications.

6. Security: IP supports various security mechanisms, such as IPsec (IP Security), which encrypts and
authenticates data packets as they traverse the internet. These security features help protect sensitive
information transmitted over the web, safeguarding against unauthorized access, interception, and
tampering.

7. Global Connectivity: IP enables seamless communication between devices regardless of their


geographical location. This global connectivity is essential for the internet to serve as a platform for
international collaboration, commerce, and information exchange, fostering a connected global
community.

8. Mobility: With the proliferation of mobile devices and wireless networks, IP plays a crucial role in
enabling mobile internet access. Mobile IP allows devices to maintain continuous connectivity while
moving between different networks, such as switching from Wi-Fi to cellular data, ensuring uninterrupted
access to web services and content on the go.

Internet Protocols:

TCP/IP =

These are a set of standard rules that allows different types of computers to communicate with each
other. The IP protocol ensures that each computer that is connected to the Internet is having a specific
serial number called the IP address. TCP specifies how data is exchanged over the internet and how it
should be broken into IP packets. It also makes sure that the packets have information about the
source of the message data, the destination of the message data, the sequence in which the message
data should be re-assembled, and checks if the message has been sent correctly to the specific
destination. The TCP is also known as a connection-oriented protocol.

Layers in TCP/IP Model: The TCP/IP model generally consists of four essential layers:

1. Application Layer
2. Host-To-Host Layer/Transport Layer
3. Internet Layer/Network Layer
4. Network Access Layer/Link Layer
1. Application Layer- This layer performs the functions of the top three layers of the OSI model, i.e.,
the Application, Presentation, and Session Layer. It is responsible for node-to-node communication and
controls user-interface specifications. Its protocols include HTTP, Post Office Protocol 3, Simple Mail
Transfer Protocol, and File Transfer Protocol. At the application layer, the payload is the actual
application data. Some of the protocols of the application layer are described below.

 HTTP:- It stands for Hypertext transfer protocol. This protocol enables us to access data via the
internet. It sends data in plain text, audio, and video formats. It's called a hypertext transfer
protocol because it's efficient enough to use in a hypertext environment where there are rapid
jumps from one document to another.
 TELNET:- It establishes a connection between the local and remote computers in such a way
that the local computer seems to be a remote terminal.
 SMTP:-The Simple Mail Transfer Protocol (SMTP) is the TCP/IP protocol that handles e-mail.
The data is sent to another e-mail address using this protocol.
 FTP:- The FTP (File Transfer Protocol) is a standard internet protocol for transferring data from
one computer to another.

2.Host-to-Host/Transport Layer- This layer is similar to the OSI model's Transport layer. It specifies
how much data should be sent, when, and where at what rate. The message from the application layer
is built upon this layer. This layer ensures that data units are supplied in a timely and error-free
manner. Through error control, flow control, and segmentation or de-segmentation, the transport layer
helps to control the link's reliability. The transport layer also acknowledges the successful data
transmission and sends the next data if no errors occur. The two important protocols present in this
layer are

 Transmission Control Protocol (TCP):-It is known for offering error-free and reliable
communication between end systems. It does data segmentation and sequencing. It also features
an acknowledgment feature and uses a flow control method to govern data flow. It is a very
effective protocol, but it has a lot of overhead because of these features. Increased overhead
translates to higher costs. TCP uses three-way handshaking to establish and acknowledge the
connection between the two devices.
 User Datagram Protocol (UDP):-On the other side, it doesn't have any of these properties. If
your application does not require dependable transmission, one must use this protocol because it
is relatively cost-effective. UDP is a connectionless protocol, so it does not provide assurance of
data delivery.

3.Internet Layer- This layer is also known as the network layer. The Internet layer's primary function is
to send packets from the source or computer to their destination, regardless of their route. The Internet
layer or Network Layer provides a functional and procedural means for sending variable-length data
sequences between nodes across multiple networks. Message delivery at the Internet layer does not
guarantee reliable network layer protocol. The main protocols lie in the layer are

 IP:-The Internet Protocol (IP) is in charge of sending packets from a source host to a destination
host based on the IP addresses in the packet headers. There are two variations of IP IPv6 and
IPv4.
 ICMP:- ICMP stands for Internet Control Message Protocol. It is encapsulated within IP
datagrams and is responsible for providing hosts with information about network problems.
 ARP:- Address Resolution Protocol (ARP) is a protocol for resolving conflicts between computers.
Its task is to determine a host's hardware address from an IP address. ARP's primary function is
to convert 32-bit addresses to 48-bit addresses and vice versa. ARP is necessary because IP
addresses in IP version 4 (IPv4) are 32 bits long, but MAC addresses are 48 bits long.

4. Network Access Layer/Link Layer- Network access or Link layer specifies the physical transmission
of data over the network. This layer handles data transmission between two adjacent devices on the
same network. It also determines how bits should be optically signaled by hardware devices that
interface directly with a network media such as coaxial, optical, fiber, or twisted-pair cables.

UDP: User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of the Internet
Protocol suite, referred to as UDP/IP suite. Unlike TCP, it is an unreliable and connectionless protocol.
So, there is no need to establish a connection before data transfer. The UDP helps to establish low-
latency and loss-tolerating connections over the network. The UDP enables process-to-process
communication.

UDP Header Format:-


Source Port: Source Port is a 2 Byte long field used to identify the port number of the source.
Destination Port: It is a 2 Byte long field, used to identify the port of the destined packet.
Length: Length is the length of UDP including the header and the data. It is a 16-bits field.
Checksum: Checksum is 2 Bytes long field. It is the 16-bit one’s complement of the one’s complement
sum of the UDP header, the pseudo-header of information from the IP header, and the data, padded
with zero octets at the end (if necessary) to make a multiple of two octets.

TCP\IP vs UDP:

Factor Transmission Control Protocol (TCP) User Datagram Protocol (UDP)


Connection Before transferring data, an established There is no need for a connection to begin
Establishment connection is required. or finish a data transfer.
TCP is dependable because it guarantees Getting the data to where it needs to be
Reliability
data delivery to the destination router. delivered cannot be guaranteed in UDP.
TCP includes numerous error-checking
UDP only provides a simple error-checking
Error Checking techniques. It is because it enables data
mechanism based on checksums.
flow control and acknowledgement.
Compared to TCP, UDP is a fast, simple,
Speed TCP is significantly slower than UDP.
and efficient tool.
Congestion
TCP uses congestion avoidance methods UDP does not manage congestion.
Control
Video conferencing, streaming, DNS, VoIP,
HTTPS, HTTP, SMTP, POP3, FTP, and
and other technologies. VoIP, game
other protocols use it. This protocol is
streaming, video and music streaming, etc.
mostly utilized in situations requiring a
Usage are examples of situations where fast
safe and dependable communication
communication is not necessary, but
mechanism, such as military services, web
reliability is not an issue. This protocol is
browsing, and e-mail.
used in such cases.
Ports Ports that adhere to the transmission UDP/IP protocols rely on UDP ports. The
control protocols are known as TCP ports. DNS port (53), Dynamic Host Configuration
File Transfer Protocol ports (20 and 21), Protocol port (68), and Kerberos port (88),
Factor Transmission Control Protocol (TCP) User Datagram Protocol (UDP)
SMTP ports (25), IMAP ports (143), and
which are utilized by gambling services, are
Secure Shell ports (22) are a few
all UDP ports.
examples of TCP ports.
TCP uses sequencing and ordering
Data can be delivered in any order because
Packet mechanisms to make sure that the data
UDP lacks any sort of ordering or
structure packets are received in the same order
sequencing mechanism.
that they are transmitted.
A huge data stream is divided into smaller
Handling Large Each message is sent as a single UDP
segments by the TCP segmentation
Amounts of datagram; UDP lacks any mechanisms for
procedure so that it can be sent over the
Data message segmentation or reassembling.
network as packets.
Broadcasting and Multicasting are not Broadcasting and Multicasting are supported
Multicasting
supported by TCP. by UDP.
There are built-in security features in TCP, UDP requires application-level security
Security
including authentication and encryption. because it lacks built-in security measures.
TCP permits the retransmission of dropped UDP is a much faster, easier, and more
Scalability
data packets. effective protocol overall.
The more intricate and powerful protocol is
Complexity UDP is easy and quick.
TCP.

2023 ques. What is HTTP and how it works?

HTTP: HTTP stands for HyperText Transfer Protocol.

o It is a protocol used to access the data on the World Wide Web (www).
o The HTTP protocol can be used to transfer the data in the form of plain text, hypertext, audio,
video, and so on.
o This protocol is known as HyperText Transfer Protocol because of its efficiency that allows us to
use in a hypertext environment where there are rapid jumps from one document to another
document.
o HTTP is similar to the FTP as it also transfers the files from one host to another host. But,
HTTP is simpler than FTP as HTTP uses only one connection, i.e., no control connection to
transfer the files.
o HTTP is used to carry the data in the form of MIME-like format.
o HTTP is similar to SMTP as the data is transferred between client and server. The HTTP differs
from the SMTP in the way the messages are sent from the client to the server and from server
to the client. SMTP messages are stored and forwarded while HTTP messages are delivered
immediately.
Working of HTTP
First of all, whenever we want to open any website then first open a web browser after that we will
type the URL of that website (e.g., www.facebook.com ). This URL is now sent to the Domain Name
Server (DNS). Then DNS first check records for this URL in their database, then DNS will return the IP
address to the web browser corresponding to this URL. Now the browser is able to send requests to
the actual server.
After the server sends data to the client, the connection will be closed. If we want something else from
the server we should have to re-establish the connection between the client and the server.

HTTP Request:- HTTP request is simply termed as the information or data that is needed by Internet
browsers for loading a website. This is simply known as HTTP Request.
There is some common information that is generally present in all HTTP requests. These are mentioned
below.
1. HTTP Version
2. URL
3. HTTP Method
4. HTTP Request Headers
5. HTTP Body

HTTP Request Headers:- HTTP Request Headers generally store information in the form of key-value
and must be present in each HTTP Request. The use of this Request Header is to provide core
information about the client’s information, etc.

HTTP Request Body:- HTTP Request Body simply contains the information that has to be transferred.
HTTP Request has the information or data to be sent to these browsers.

HTTP Method:- HTTP Methods are simply HTTP Verb. In spite of being present so many HTTP
Methods, the most common HTTP Methods are HTTP GET and HTTP POST. These two are generally
used in HTTP cases. In HTTP GET, the information is received in the form of a website.

HTTP Response:- HTTP Response is simply the answer to what a Server gets when the request is
raised. There are various things contained in HTTP Response, some of them are listed below.
1.HTTP Status Code
2.HTTP Headers
3.HTTP Body
4.HTTP Response
5.HTTP Response

HTTP Response Headers:- HTTP Response headers are simply like an HTTP Request where it has
that work to send some important files and data to the HTTP Response Body.

HTTP Response Body:- HTTP Responses are the responses that are received successfully upon the
request. Generally, it comes under the requests generated by the web. In most cases, the request is of
transferring the HTML data into a webpage.

Characteristics of HTTP= HTTP is IP based communication protocol that is used to deliver data from
server to client or vice-versa.

o The server processes a request, which is raised by the client, and also server and client know
each other only during the current bid and response period.
o Any type of content can be exchanged as long as the server and client are compatible with it.
o Once data is exchanged, servers and clients are no longer connected.
o It is a request and response protocol based on client and server requirements.
o It is a connection-less protocol because after the connection is closed, the server does not
remember anything about the client and the client does not remember anything about the server.
o It is a stateless protocol because both client and server do not expect anything from each other
but they are still able to communicate.

Advantages of HTTP:

o Memory usage and CPU usage are low because of fewer simultaneous connections.
o Since there are few TCP connections hence network congestion is less.
o Since handshaking is done at the initial connection stage, then latency is reduced because there
is no further need for handshaking for subsequent requests.
o The error can be reported without closing the connection.
o HTTP allows HTTP pipe-lining of requests or responses.

Disadvantages of HTTP:

o HTTP requires high power to establish communication and transfer data.


o HTTP is less secure because it does not use any encryption method like HTTPS and use TLS
to encrypt regular HTTP requests and response.
o HTTP is not optimized for cellular phones and it is too gabby.
o HTTP does not offer a genuine exchange of data because it is less secure.
o The client does not close the connection until it receives complete data from the server; hence,
the server needs to wait for data completion and cannot be available for other clients during this
time.

Cookies in HTTP
An HTTP cookie (web cookie, browser cookie) is a little piece of data that a server transmits to a
user’s web browser. When making subsequent queries, the browser may keep the cookie and transmit
it back to the same server. An HTTP cookie is typically used, for example, to maintain a user’s login
state, to determine whether two requests originate from the same browser. For the stateless HTTP
protocol, it retains stateful information.

HTTPS(Secure HTTP):

Hypertext Transfer Protocol Secure is a protocol that is used to communicate between the user browser
and the website. It also helps in the transfer of data. It is the secure variant of HTTP. To make the
data transfer more secure, it is encrypted. Encryption is required to ensure security while transmitting
sensitive information like passwords, contact information, etc.

How Does HTTPS Work?


HTTPS establishes the communication between the browser and the web server. It uses the Secure
Socket Layer (SSL) and Transport Layer Security (TLS) protocol for establishing communication. The
new version of SSL is TLS(Transport Layer Security).
HTTPS uses the conventional HTTP protocol and adds a layer of SSL/TLS over it. The workflow of
HTTP and HTTPS remains the same, the browsers and servers still communicate with each other using
the HTTP protocol. However, this is done over a secure SSL connection. The SSL connection is
responsible for the encryption and decryption of the data that is being exchanged to ensure data safety.
Secure Socket Layer (SSL)
The main responsibility of SSL is to ensure that the data transfer between the communicating systems
is secure and reliable. It is the standard security technology that is used for encryption and decryption
of data during the transmission of requests.
As discussed earlier, HTT PS is basically the same old HTTP but with SSL. For establishing a secure
communication link between the communicating devices, SSL uses a digital certificate called SSL
certificate.
There are two major roles of the SSL layer

o Ensuring that the browser communicates with the required server directly.
o Ensuring that only the communicating systems have access to the messages they exchange.

Encryption in HTTPS
HTTP transfers data in a hypertext format between the browser and the web server, whereas HTTPS
transfers data in an encrypted format. As a result, HTTPS protects websites from having their
information broadcast in a way that anyone eavesdropping on the network can easily see. During the
transit between the browser and the web server, HTTPS protects the data from being accessed and
altered by hackers. Even if the transmission is intercepted, hackers will be unable to use it because the
message is encrypted.
It uses an asymmetric public key infrastructure for securing a communication link. There are two
different kinds of keys used for encryption –

o Private Key: It is used for the decryption of the data that has been encrypted by the public key.
It resides on the server-side and is controlled by the owner of the website. It is private in nature.
o Public Key: It is public in nature and is accessible to all the users who communicate with the
server. The private key is used for the decryption of the data that has been encrypted by the
public key.

HTTP (Hypertext Transfer Protocol) and HTTPS (Hypertext Transfer Protocol Secure) are both protocols
used for transmitting data over the internet, but they differ in terms of security:

How is HTTPS different from HTTP?


1. Security: The primary difference between HTTP and HTTPS is the level of security they provide.
HTTP sends data in plain text, making it vulnerable to interception and tampering by malicious actors.
In contrast, HTTPS encrypts the data transmitted between the client (e.g., web browser) and the server
using SSL/TLS (Secure Sockets Layer/Transport Layer Security) encryption. This encryption ensures that
even if intercepted, the data remains unreadable to anyone without the decryption key, enhancing the
security and privacy of communication.

2. Authentication: HTTPS also provides authentication, verifying the identity of the server to ensure that
the client is connecting to the intended website. This authentication helps prevent man-in-the-middle
attacks, where an attacker intercepts communication between the client and the server and poses as
the legitimate server to eavesdrop on or manipulate the data exchange.

3. Trust: HTTPS relies on digital certificates issued by trusted third-party Certificate Authorities (CAs) to
establish the authenticity of websites. When a user accesses a website over HTTPS, their browser
checks the validity of the digital certificate presented by the server. If the certificate is valid and issued
by a trusted CA, the browser displays a padlock icon or similar indicator to indicate that the connection
is secure. This trust model enhances user confidence in the integrity and legitimacy of the websites
they visit.

Secure Connections:

SSL (Secure Sockets Layer) is a cryptographic protocol designed to provide secure communication over
a computer network, typically the internet. It operates at the transport layer, ensuring that data
exchanged between a client (such as a web browser) and a server (such as a web server) is
encrypted and remains confidential during transmission. SSL has been succeeded by TLS (Transport
Layer Security), but the term SSL is still commonly used colloquially to refer to both SSL and TLS.

Working and protocols= SSL operates through several protocols, each serving a specific purpose:

1. SSL Record Protocol: The SSL Record Protocol is responsible for fragmenting data into manageable
chunks, encrypting the data (using symmetric encryption algorithms like AES or DES), and adding
integrity checks (using message authentication codes like HMAC) to ensure data integrity. Once the
data is encrypted and integrity-checked, it is transmitted over the network. At the receiving end, the
SSL Record Protocol decrypts the data and verifies its integrity before passing it to higher-level
protocols.

2. SSL Handshake Protocol: The SSL Handshake Protocol is used to establish a secure connection
between the client and the server. During the handshake process, the client and server exchange
messages to negotiate cryptographic algorithms, authenticate each other's identities, and establish
session keys for encrypting and decrypting data. The handshake involves several steps:

- ClientHello: The client initiates the handshake by sending a message containing supported
cryptographic algorithms, cipher suites, and other parameters.
- ServerHello: The server responds with its own message, selecting the preferred cryptographic
algorithms and cipher suite from the options provided by the client.

- Certificate: If the server requires client authentication or the client needs to verify the server's
identity, the server sends its digital certificate, which includes its public key and other identifying
information.

- Key Exchange: The client and server perform a key exchange to generate session keys for
encrypting and decrypting data. This key exchange may involve asymmetric encryption (such as RSA)
or symmetric encryption (such as Diffie-Hellman).

- Finished: Finally, both the client and server send a Finished message to confirm that the
handshake process is complete and that they are ready to begin secure communication.

3. SSL Change Cipher Spec Protocol: The SSL Change Cipher Spec Protocol is a simple protocol
that consists of a single message, indicating to the receiving party that subsequent data will be
encrypted using the negotiated cryptographic parameters. This protocol ensures that both the client and
server are synchronized and ready to switch to secure communication.

5. SSL Alert Protocol: The SSL Alert Protocol handles error messages and notifications related to
the SSL connection. It allows either party to send alert messages to the other party to indicate
various conditions, such as unexpected closure of the connection, cryptographic errors, or fatal
errors that require immediate termination of the connection. These alert messages help diagnose
and troubleshoot issues with the SSL connection.

Application and development tools:


1. Integrated Development Environments (IDEs): Integrated Development Environments (IDEs) provide
a complete set of tools for software development, including web development. Here's a more detailed
explanation:

- Visual Studio Code (VS Code): Developed by Microsoft, VS Code is a highly popular and
versatile code editor. It offers features such as syntax highlighting, intelligent code completion,
debugging support, version control integration (e.g., Git), and a rich extension ecosystem. VS
Code is known for its performance, customizability, and support for a wide range of programming
languages and frameworks.
- JetBrains WebStorm: WebStorm is a specialized IDE tailored for web development by
JetBrains. It offers advanced features like intelligent code analysis, refactorings, debugging, and
built-in support for popular web technologies like HTML, CSS, JavaScript, TypeScript, Node.js,
and Angular, among others. WebStorm's powerful tools help developers write clean, efficient code
and improve productivity.
- Adobe Dreamweaver: Dreamweaver is a visual IDE that combines a code editor with visual
design tools, making it suitable for both beginners and experienced developers. It provides
features for designing, coding, and managing websites and web applications, including WYSIWYG
(What You See Is What You Get) editing, code hinting, integrated FTP/SFTP support, and
responsive design capabilities.

2. Text Editors: Text editors are lightweight tools primarily focused on editing code. They are often
favored by developers for their simplicity, speed, and customization options. Let's explore some popular
text editors in more detail:

- Sublime Text: Sublime Text is a highly customizable and cross-platform text editor known
for its speed and efficiency. It offers features like multiple selections, split editing, command
palette, syntax highlighting, and a powerful package ecosystem through Package Control. Sublime
Text's minimalist interface and extensive customization options make it a favorite among
developers.
- Atom: Developed by GitHub, Atom is an open-source text editor built using web
technologies (HTML, CSS, JavaScript). It provides a modern and hackable environment with
features like a built-in package manager, smart autocompletion, multiple panes, and a rich
ecosystem of community-contributed packages and themes. Atom's flexibility and extensibility
make it suitable for various programming tasks.
- Notepad++: Notepad++ is a free and lightweight text editor for Windows with a focus on
simplicity and speed. It offers features like syntax highlighting, auto-completion, macros, and
plugin support for extending functionality. Notepad++ is widely used for editing code files and text
documents due to its small footprint and ease of use.
3. Version Control Systems (VCS): Version Control Systems (VCS) are essential tools for managing
changes to code and collaborating with other developers. Let's explore Git, the most widely used VCS,
and some popular platforms for hosting Git repositories:

- Git: Git is a distributed version control system designed for tracking changes to files and
coordinating work among multiple contributors. It provides features such as branching, merging,
tagging, and decentralized repositories, enabling developers to work on projects collaboratively
and efficiently. Git's command-line interface (CLI) and graphical user interface (GUI) clients offer
a range of tools for managing version-controlled projects.
- GitHub: GitHub is a web-based platform for hosting Git repositories and collaborating on
software projects. It offers features such as code hosting, issue tracking, pull requests, code
review, and project management tools. GitHub provides a social coding environment where
developers can contribute to open-source projects, showcase their work, and collaborate with
peers worldwide.
- GitLab: GitLab is a self-hosted or cloud-based platform similar to GitHub, offering Git
repository hosting, continuous integration/continuous deployment (CI/CD) pipelines, issue tracking,
and collaboration tools. GitLab provides a comprehensive DevOps platform for managing the
entire software development lifecycle, from planning and coding to testing and deployment.

4. Web Browsers and Developer Tools: Web browsers are indispensable tools for testing and
debugging web applications. Let's explore the features of modern web browsers and their built-in
developer tools in more detail:

- Google Chrome Developer Tools: Chrome's Developer Tools offer a suite of features for
inspecting and debugging web pages. It includes tools for inspecting HTML, CSS, and
JavaScript, editing styles and markup in real-time, analyzing network activity, profiling
performance, and debugging JavaScript code using breakpoints and console messages.
- Mozilla Firefox Developer Tools: Firefox's Developer Tools provide similar features to
Chrome's Developer Tools, including an inspector for examining HTML/CSS, a JavaScript
debugger, a network monitor, and a performance profiler. Firefox also offers unique tools like the
Accessibility Inspector and the CSS Grid Inspector for advanced web development tasks.
- Microsoft Edge Developer Tools: Edge's Developer Tools, built using the Chromium
DevTools protocol, offer a familiar set of features for inspecting and debugging web pages.
Developers can use Edge's DevTools to inspect DOM elements, modify CSS styles, debug
JavaScript, analyze network requests, and optimize performance for Microsoft's web browser.

5. Package Managers: Package managers simplify the process of managing dependencies and
libraries in web development projects. Let's explore npm for JavaScript and Composer for PHP in more
detail:
- npm (Node Package Manager): npm is the default package manager for Node.js, a popular
runtime environment for JavaScript. It allows developers to install, publish, and manage
packages/modules (JavaScript libraries) for frontend and backend development. npm's extensive
registry hosts thousands of packages for various purposes, including frameworks, utilities, and
tools.
- Composer: Composer is a dependency manager for PHP that simplifies the installation and
management of PHP libraries and frameworks. It uses a `composer.json` file to define project
dependencies and versions, which are then fetched from the Packagist repository. Composer
automatically resolves dependencies, downloads packages, and generates an autoloader for PHP
classes, streamlining the development process for PHP projects.

2022pyq: explain 3 tier architecture of web application development

o A three-tier architecture is a client-server architecture in which the functional process logic, data
access, computer data storage and user interface are developed and maintained as independent
modules on separate platforms.Three-tier architecture is a software design pattern and a well-
established software architecture.
o Three-tier architecture allows any one of the three tiers to be upgraded or replaced
independently.
o The user interface is implemented on any platform such as a desktop PC, smartphone or tablet
as a native application, web app, mobile app, voice interface, etc. It uses a standard graphical
user interface with different modules running on the application server.
o The relational database management system on the database server contains the computer data
storage logic.
o The middle tiers are usually multitiered.
o Since the three are not physical but logical in nature, they may run in different servers both in
on-premises based solutions, as well as in software-as-a-service (SaaS).

The 3-tier architecture is a popular design pattern used in web application development to organize the
components of an application into three separate tiers or layers: presentation, application (business
logic), and data. Each tier has a specific role and responsibility, and they work together to create a
scalable, maintainable, and efficient web application. Let's explore each tier in more detail:

1. Presentation Tier:
- The presentation tier, also known as the user interface (UI) layer, is responsible for presenting
information to users and gathering input from them. It represents the visual and interactive aspects of
the application that users interact with directly.

- Components in the presentation tier include web pages, user interfaces, forms, menus, and any
other elements that users interact with through their web browsers or client applications.

- Technologies commonly used in the presentation tier include HTML, CSS, JavaScript, and front-end
frameworks/libraries such as React, Angular, or Vue.js. These technologies are used to create
responsive, visually appealing, and interactive user interfaces.

2. Application Tier:

- The application tier, also known as the business logic or middle tier, contains the core logic and
functionality of the web application. It processes requests from the presentation tier, executes business
rules, performs data validation, and orchestrates interactions between different components.

- Components in the application tier include server-side scripts, web services, APIs, controllers, and
application logic modules. These components handle business operations, such as user authentication,
authorization, data processing, and workflow management.

- Technologies commonly used in the application tier depend on the programming language and
framework chosen for server-side development. For example, in a Java-based application, the
application tier may be implemented using Java servlets, JSP (JavaServer Pages), Spring MVC
framework, or similar technologies. In a Python-based application, Flask or Django may be used.

3. Data Tier:

- The data tier, also known as the data access layer or backend, is responsible for managing and
storing data used by the web application. It interacts with databases, file systems, external APIs, or
other data sources to retrieve, store, update, and manipulate data.

- Components in the data tier include databases, data access objects (DAOs), data models, ORM
(Object-Relational Mapping) frameworks, and caching mechanisms. These components abstract the
underlying data storage and provide an interface for the application tier to access and manipulate data.

- Technologies commonly used in the data tier include relational databases (e.g., MySQL,
PostgreSQL, SQL Server), NoSQL databases (e.g., MongoDB, Redis), ORM frameworks (e.g., Hibernate
for Java, SQLAlchemy for Python), and caching solutions (e.g., Redis, Memcached).

The 3-tier architecture separates the concerns of user interface, business logic, and data storage into
distinct layers, which promotes modularity, scalability, and maintainability in web application development.
This architectural pattern allows developers to focus on individual layers independently, facilitates code
reuse, and enables easier troubleshooting and debugging.
The Web Browser:

what is WWW how it works?

The World Wide Web (WWW) is a vast collection of interconnected websites stored on web servers
and accessible worldwide via the internet. Websites contain various media such as text, images, and
videos, accessible through devices like computers and phones. HTML-formatted web pages are linked
together via hypertext, allowing users to quickly navigate between related information. Each web page is
assigned a Uniform Resource Locator (URL), forming a website. Larger websites distribute their pages
across multiple servers globally to enhance access speed. The web facilitates information retrieval and
exchange through hypertext links, providing a communication platform accessible via web browsers
installed on user devices.

Working of WWW:

 The Web works as per the internet's basic client-server format as shown in the following
image. The servers store and transfer web pages or information to user's computers on
the network when requested by the users. A web server is a software program which
serves the web pages requested by web users using a browser. The computer of a user
who requests documents from a server is known as a client. Browser, which is installed
on the user' computer, allows users to view the retrieved documents.

 All the websites are stored in web servers. Just as someone lives on rent in a house, a website
occupies a space in a server and remains stored in it. The server hosts the website whenever a
user requests its WebPages, and the website owner has to pay the hosting price for the same.

 The moment you open the browser and type a URL in the address bar or search something on
Google, the WWW starts working. There are three main technologies involved in transferring
information (web pages) from servers to clients (computers of users). These technologies include
Hypertext Markup Language (HTML), Hypertext Transfer Protocol (HTTP) and Web browsers.
 HTML : HTML is a standard markup language which is used for creating web pages. It
describes the structure of web pages through HTML elements or tags. These tags are used to
organize the pieces of content such as 'heading,' 'paragraph,' 'table,' 'Image,' and more. You
don't see HTML tags when you open a webpage as browsers don't display the tags and use
them only to render the content of a web page. In simple words, HTML is used to display text,
images, and other resources through a Web browser.
 Web Browser: A web browser, which is commonly known as a browser, is a program that
displays text, data, pictures, videos, animation, and more. It provides a software interface that
allows you to click hyperlinked resources on the World Wide Web. When you double click the
Browser icon installed on your computer to launch it, you get connected to the World Wide Web
and can search Google or type a URL into the address bar.
 HTTP: Hyper Text Transfer Protocol (HTTP) is an application layer protocol which enables WWW
to work smoothly and effectively. It is based on a client-server model. The client is a web
browser which communicates with the web server which hosts the website. This protocol defines
how messages are formatted and transmitted and what actions the Web Server and browser
should take in response to different commands. When you enter a URL in the browser, an HTTP
command is sent to the Web server, and it transmits the requested Web Page.

When we open a website using a browser, a connection to the web server is opened, and the
browser communicates with the server through HTTP and sends a request. HTTP is carried
over TCP/IP to communicate with the server. The server processes the browser's request and
sends a response, and then the connection is closed. Thus, the browser retrieves content from
the server for the user.

What is server:

A server is a program or device that processes requests from clients and provides various services,
following the client-server model. It distributes computation across multiple processes or devices, serving
multiple clients simultaneously. Servers include database, mail, print, file, web, application, and game
servers, which communicate through request-response interactions. Server-class hardware is specialized
for reliability and power, often comprising CPU, memory, storage, network interfaces, and management
tools. High-availability features ensure continuous operation, including redundant storage, power supplies,
and network interfaces, with configuration tools for failover and load balancing.

Types of Servers and Their Applications

1. Application Server: These servers host web apps (computer programs that run inside a web
browser) allowing users in the network to run and use them preventing the installation of a copy on
their own computers. These servers need not be part of the World Wide Web. Their clients are
computers with a web browser.

2. Catalog Server: These servers maintain an index or table of contents of information that can be
found across a large distributed network. Distributed networks may include computers, users, files
shared on file servers, and web apps. Examples of catalog servers are directory servers and name
servers. Their clients are any computer program that needs to find something on the network. An
example can be a domain member attempting to log in, an email client looking for an email address, or
a user looking for a file

3. Communication Server: These servers maintain an environment needed for one communication
endpoint to find other endpoints and then communicate with them. These servers may or may not
include a directory of communication endpoints and a presence detection service, depending on the
openness and security parameters of the network. Their clients are communication endpoints.

4. Computing Server: These servers share vast amounts of computing resources which include CPU
and random-access memory over a network. Any computer program that needs more CPU power and
RAM than a personal computer can probably afford can use these types of servers. The client must be
a networked computer to implement the client–server model which is a necessity.

5. Database Server: These servers maintain and share any form of database over a network. A
database is an organized collection of data with predefined properties that may be displayed in a table.
Clients of these servers are spreadsheets, accounting software, asset management software, or virtually
any computer program that consumes well-organized data, especially in large volumes.

6. Fax Server: These servers share one or more fax machines over a network which eliminates the
hassle of physical access. Any fax sender or recipient is the client of these servers.
7. File Server: Shares files and folders, storage space to hold files and folders, or both, over a
network. Networked computers are the intended clients, even though local programs can be clients.

8. Game Server: These servers enable several computers or gaming devices to play multiplayer games.
Personal computers or gaming consoles are their clients.

9. Mail Server: These servers make email communication possible in the same way as a post office
makes snail mail communication possible. Clients of these servers are senders and recipients of email.

10. Print Server: These servers share one or more printers over a network which eliminates the hassle
of physical access. Their clients are computers in need of printing something.

11. Proxy Server: This server acts as an intermediary between a client and a server accepting
incoming traffic from the client and sending it to the server. Reasons to use a proxy server include
content control and filtering, improving traffic performance, preventing unauthorized network access,
simply routing the traffic over a large and complex network. Their clients are any networked computer.

12. Web Server: These servers host web pages. A web server is responsible for making the World
Wide Web possible. Each website has one or more web servers. Their clients are computers with a
web browser.

Installing Linux using USB stick

This is one of the easiest methods of installing Ubuntu or any distribution on your computer.

Follow the steps to install Ubuntu from USB.

Step 1) Download required files.

Download the .iso or the OS files on your computer from this link.

Step 2) Download Universal USB Installer.

Download free software like Universal USB installer to make a bootable USB stick.

Step 3) Select Distribution.

Select an Ubuntu Distribution form the dropdown to put on your USB

Select your Ubuntu iso file download in step 1.

Select the drive letter of USB to install Ubuntu and Press create button.

Step 4) Install Ubuntu.

Click YES to Install Ubuntu in USB.


Step 5) Check your window.

After everything has been installed and configured, a small window will appear Congratulations!

You now have Ubuntu on a USB stick, bootable and ready to go.

Pyq 2022: What is Domain Name Server?

Domain Name System (DNS) is a hostname for IP address translation service. DNS is a distributed
database implemented in a hierarchy of name servers. It is an application layer protocol for message
exchange between clients and servers. It is required for the functioning of the Internet.

What is the Need of DNS?


Every host is identified by the IP address but remembering numbers is very difficult for people also the
IP addresses are not static therefore a mapping is required to change the domain name to the IP
address. So DNS is used to convert the domain name of the websites to their numerical IP address.

Types of Domain
There are various kinds of domain:

1. Generic domains: .com(commercial), .edu(educational), .mil(military), .org(nonprofit


organization), .net(similar to commercial) all these are generic domains.
2. Country domain: .in (India) .us .uk
3. Inverse domain: if we want to know what is the domain name of the website. Ip to domain
name mapping. So DNS can provide both the mapping for example to find the IP addresses of
geeksforgeeks.org then we have to type

Types of DNS Servers:


1. Root DNS Servers: These are the top-level servers in the DNS hierarchy. They don't store specific
domain information but maintain information about the authoritative name servers for each TLD.
2. Top-Level Domain (TLD) Servers: These servers are responsible for storing information about the
second-level domains within their respective TLDs. For example, the .com TLD servers store information
about domains like example.com, google.com, etc.
3. Authoritative DNS Servers: These servers store the actual DNS records for specific domains. There
can be multiple authoritative DNS servers for a single domain, and they are responsible for providing
DNS information about that domain.
4. Recursive DNS Servers: These are typically provided by ISPs or DNS service providers. When a
client requests a domain name resolution, recursive DNS servers query other DNS servers on behalf of
the client until they obtain the IP address associated with the requested domain name.

 Caching: DNS servers often cache query results to improve performance and reduce the load on
authoritative DNS servers. Cached records have a time-to-live (TTL) value associated with them,
after which they expire and must be re-fetched from authoritative servers

IP Addresses:
An IP address represents a unique address that distinguishes any device on the internet or
any network from another. IP or Internet Protocol defines the set of commands directing the
setup of data transferred through the internet or any other local network.
An Internet protocol address (IP address) is a unique combination of numbers and periods
such as 172.1.1.1. This combination of numbers acts as an identity for the network device
when it connects to the internet.

This identity is then used to access data and information available on the web when the client
device sends a request to the server and is passed through routers, hubs, and other network
nodes.

Versions of IP Address
IPv4:

This is the original version of the IP address, which was developed based on a 32-bit binary format
and contained 232 addresses, which was sufficient at the initial time of making but somewhat lacking
considering the increase in the current network advancement.

The addresses ranged from 0 to 255 in terms of 0s and 1s, with four octets, each of them separated
by a period (.). The network device uses the binary format, whereas the numerical format is used for
the host's reference.
IPv6:
An IPv6 address is designed from 128 bits from which 4 hexadecimal digits and eight sets are created,
with each block containing 16 bits separated by a colon (:).

IPv6 addresses are used to indicate the source and destination of each packet by including them in the
packet header. The routing structure of the IP packets is assigned by using the IP address of the
destination.

Classification of IP Address
An IP address is classified into the following types:

1. Public IP Address: This address is available publicly and it is assigned by your network provider to
your router, which further divides it to your devices. Public IP Addresses are of two types,

Dynamic IP Address: When you connect a smartphone or computer to the internet, your Internet
Service Provider provides you an IP Address from the range of available IP Addresses. Now, your
device has an IP Address and you can simply connect your device to the Internet and send and
receive data to and from your device. The very next time when you try to connect to the internet with
the same device, your provider provides you with different IP Addresses to the same device and also
from the same available range. Since IP Address keeps on changing every time when you connect to
the internet, it is called a Dynamic IP Address.
Static IP Address: Static address never changes. They serve as a permanent internet address. These
are used by DNS servers. What are DNS servers? Actually, these are computers that help you to open
a website on your computer. Static IP Address provides information such as device is located on which
continent, which country, which city, and which Internet Service Provider provides internet connection to
that particular device. Once, we know who is the ISP, we can trace the location of the device
connected to the internet. Static IP Addresses provide less security than Dynamic IP Addresses
because they are easier to track.
2. Private IP Address: This is an internal address of your device which are not routed to the internet
and no exchange of data can take place between a private address and the internet.

3. Shared IP addresses: Many websites use shared IP addresses where the traffic is not huge and
very much controllable, they decide to rent it to other similar websites so to make it cost-friendly.
Several companies and email sending servers use the same IP address (within a single mail server) to
cut down the cost so that they could save for the time the server is idle.

4. Dedicated IP addresses: A dedicated IP Address is an address used by a single company or an


individual which gives them certain benefits using a private Secure Sockets Layer (SSL) certificate
which is not in the case of a shared IP address. It allows to access the website or log in via File
Transfer Protocol (FTP) by IP address instead of its domain name. It increases the performance of the
website when the traffic is high. It also protects from a shared IP address that is black-listed due to
spam.

You might also like