0% found this document useful (0 votes)
45 views26 pages

Unit-1 ITE

Uploaded by

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

Unit-1 ITE

Uploaded by

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

UNIT-I

WEB ESSENTIALS
WEBSITE ESSENTIALS: CLIENT-SERVER PARADIGM – BROWSER FUNDAMENTALS –
AUTHORING TOOLS – TYPES OF SERVERS: APPLICATION SERVER – WEB SERVER –
DATABASE SERVER

WEBSITE ESSENTIALS
CREATING WEB SITE
 Web site is a collection of web pages. Hence for a website design we need to design the webpages. Each
webpage may contain texts, photos, videos, and social media buttons and so on.
 Technically, a webpage is a special type of document written in scripting languages such as HTML,CSS,
JavaScript, PHP and so on. Web pages are written for web browsers.
 The web browsers are the programs like Internet Explorer, Google Chrome and Safari. These browsers
have a simple outlook and perform a crucially important job: they read the web page document and
display the perfectly formatted result.

Definition of website:
Website is a collection of webpages that are grouped together to achieve certain task under single domain name.

Why do people visit website?


 The most important reason is to find the required information. This could be anything from a student
looking for images for a school project, to finding the latest stock quotes, for getting the address of the
nearest restaurant and so on.
 To complete a task: Visitors may want to buy the latest best-seller, download a software program, or
participate in an online discussion about a favourite hobby.

Steps for creating the Website:

Step 1: Website creation:


 Create a webpage using suitable scripting language. If any image is associated with this web page then
convert this image into appropriate format (JPEG or GIF is preferable). Embed this image appropriately
in this webpage.

Step 2: Choosing the web hosting services


 Web hosting company hosts your webpages on web server. Thus your website will be available to
anyone who knows your URL.
 Most web hosting companies offer hosting services for both personal and business use.
 The web host provides you with Internet access, email accounts and space for a personal or business
website.
 If you are building a website for business use, your web host can register a personalized domain name
for your website.
 Small web sites (around 15-20 pages of contents) do not need much more than 1 or 2 MB of server
space for holding all the HTML pages and graphics. Your web hosting package should provide at least
a few additional MB of space so that your web page has room to grow.

Step 3: Registering Domain Name


 Domain name is an alias that points to actual location of your web site on web server. Domain names
are managed by the Internet Corporation for Assigned Names and Numbers (ICANN). ICANN has
agreements with a number of vendors to provide domain name registration services.

Step 4: Planning your website


 Type: The type of site you need. Is this a news or informational site, a site for a company or service, a
non-profit or cause driven site, an E-commerce shop etc. Each of these kinds of site has a slightly
different focus that will influence its design.
 Navigation: Navigation means indicating how users will move around your site that will affect its
information architecture as well as the overall usability of that site. Plan out the pages of the site, create
a sitemap, and develop a navigational structure from there.
 Content: The quality of your site’s content will play an important role in it’s success. Content is
everything that your pages will contain, such as text, images, videos and more. Before you start
designing or building pages, you should have a clear strategy for the content as what those pages will
contain.

Step 5: Uploading Files


 To publish a website on the web, you must send the web pages created by you to the webserver using
File Transfer Protocol (FTP). Using some software such as Microsoft Visual Studio or Adobe
Dreamweaver one can upload the files on the webserver.

Testing the website:


Testing must be performed throughout the development of website
 Multiple Browsers: It is necessary to display the website on as many web browsers as possible to
ensure that the contents of the website are consistently displayed and the work done is portable.
 Multiple Operating Systems: It is necessary to display the website on different operating systems.
 Connection Speed: Do not rely on the same connection speed when testing your website, especially if
you work in a corporate environment where the connection to the Internet usually is faster than the
average user’s. Also test the download time for different connection speed.
 Device Types: Test the websites on the computer’s having different screen size. It is necessary to ensure
that pages are displayed consistently on all screen sizes.
 Links: Use a link validation tool to ensure that all of your links connect to a live page.
 Security Testing: This step is necessary to test the security vulnerabilities in application running on the
website. Security is an important part of any web development plan.

IP ADDRESSING
Each host on a TCP/IP network is assigned a unique 32-bit logical address that is divided into two main parts:
the network number and the host number, called IP address. The IP address is grouped as 4 X 8-bits separated
by dots. Each bit in the octet has binary weight. There are five classes namely A, B, C, D and E.

 IP address is assigned to the devices participating in computer network. The IP protocol makes use of
this address for communication between two computers. Using IP address, any particular node can be
identified in the network.

DOMAIN NAME SERVER (DNS) is a system that translates human-friendly domain names (like
www.example.com) into IP addresses (like 192.0.2.1) that computers use to identify each other on the
network. Here’s a brief overview of how it works:
• Domain Name Resolution: When you enter a website URL in your browser, a DNS request is
made to resolve the domain name into its corresponding IP address.
• DNS Hierarchy: The DNS is structured in a hierarchical manner:
– Root Servers: The highest level, directing requests to TLD (Top-Level Domain)
servers (.com, .org, etc.).
– TLD Servers: These manage the domains under their respective TLDs.
– Authoritative DNS Servers: These hold the actual DNS records for specific domains.
• Caching: To improve speed and efficiency, DNS responses are often cached by ISPs and local
devices. This reduces the need for repeated lookups.
• User Requests Domain: When you type a domain name in your browser, the browser doesn't
know the IP address yet, so it contacts a DNS server.

• DNS Lookup: The DNS server checks its records (DNS cache) to see if it has the
corresponding IP address for the domain. If not, it queries other DNS servers.
• Query Resolution: The DNS server communicates with root name servers, top-level domain
(TLD) servers (like .com or .net), and authoritative name servers to get the correct IP address.
• Response Sent: The DNS server sends the IP address back to your browser.
• Connection Established: The browser connects to the web server using the IP address, and
the website loads.

Top-Level Domains (TLDs)


TLDs are the highest level in the hierarchical domain name system. They appear at the end of
a domain name (e.g., .com, .org). There are two main types of TLDs:
• a. Generic Top-Level Domains (gTLDs):
• These are the most widely recognized domains, not specific to any particular country.
• .com: Used for commercial purposes, but it’s the most commonly used TLD for almost
anything.
• .org: Traditionally used by organizations, especially non-profits.
• .net: Originally meant for network organizations, now used more broadly.
• .edu: Reserved for educational institutions (mainly in the U.S.).
• .gov: Used by governmental institutions (mainly in the U.S.).
• .mil: Reserved for the U.S. military.
• .info: Often used for informational websites.
• .biz: Intended for business use.
• There are also newer gTLDs like .tech, .shop, .blog, .xyz, and many more, which give users
more creative choices.

b. Country Code Top-Level Domains (ccTLDs):


These are specific to countries or geographic areas and are typically two letters.
• .us: United States
• .uk: United Kingdom
• .de: Germany
• .jp: Japan
• .cn: China
• .ca: Canada
• .in: India
• .au: Australia

Second-Level Domains (SLDs)


• The second part of a domain name is the SLD, which comes immediately before the TLD. For
example, in example.com, "example" is the SLD. It’s the main identifier for your website and
is typically the name of a company, brand, or personal name.
• .ac.in domain is a country code second-level domain (ccSLD) used specifically for academic
and educational institutions in India. It is a subdomain of the .in top-level domain (TLD), which
represents India.

A URL (UNIFORM RESOURCE LOCATOR) is the address used to access resources on the
internet, such as web pages, files, or services. It is a reference to a resource that specifies its location
and how to retrieve it.
• https://www.example.com:8080/path/to/resource?query=example#section
• Scheme/Protocol (https://):
Defines the protocol used to access the resource. Common examples include:
• http:// (HyperText Transfer Protocol)
• https:// (Secure version of HTTP)
• ftp:// (File Transfer Protocol)
• mailto: (Used for email addresses)
• Subdomain (www.):
• This is optional but can be used to separate different sections of a domain, such as www. or
blog..
• Domain Name (example.com):
• The readable address that corresponds to the IP address of the server hosting the resource. It's
the primary identifier of a website, consisting of:
• Second-Level Domain (SLD) (example): The name of the website or organization.
• Top-Level Domain (TLD) (.com): The suffix indicating the domain category (e.g., .com,
.org, .edu, .net, or country-specific TLDs like .in or .uk).
• Port (:8080):
• Specifies the port number used by the server to listen for connections. Default ports (like 80
for HTTP and 443 for HTTPS) are usually omitted, but non-standard ports must be specified.
• Path (/path/to/resource):
• The location of a specific resource on the server. This could be a file or directory path.
• Query String (?query=example):
• Contains parameters passed to the resource. It's used to send data to the server, often in the
form of key-value pairs.
• Example: ?search=shoes&type=running
• Fragment Identifier (#section):
• Refers to a specific part of the resource, often used to jump to a section of a webpage.

URL Types:
Absolute URL: Contains the full address of a resource, including the protocol, domain, and full path.
Example: https://www.example.com/page1
Relative URL:Omits the domain name and protocol, using only the path and query to locate the
resource relative to the current domain.
Example: /page1

URL:
• A URL is the complete address used to access a specific resource on the web. It specifies the
location of the resource, the protocol to be used (e.g., HTTP/HTTPS), the domain name, and
sometimes the path, query, or port.
Example:
• https://www.example.com/index.html
DNS:
• DNS is a system that translates human-readable domain names (like www.example.com) into
IP addresses (like 192.0.2.1), which computers use to identify each other on the network.
Example:
• DNS translates www.example.com to 192.0.2.1
• URL Components
• URL:A URL includes several components:
• Protocol (e.g., https://)
• Domain Name (e.g., www.example.com)
• Path (e.g., /index.html)
• Query Parameters (optional)
Fragment Identifiers (optional)

WORKING PRINCIPLE OF A WEBSITE


Features of Website Design
 Quality of Web content – people desire information in fast and reliable fashion. For business websites,
content should include important information. These type of websites need to display high quality
pictures of their products, and highlight clients testimonials.

 Clear, User- friendly navigation – A user friendly navigation scheme allows visitors to quickly find
the information needed. Important links must be easy to find and given in a logical and simple way,
including easy understanding of labels.

 Simple and professional design - The website design must be simple and professional. Google is an
excellent example of such a site. To keep websites simple a balanced distribution of contents and
graphics is required. The use of slightly contrasting colors, and clear fonts is necessary. Also, one should
break up sizeable blocks of texts with either spacing or images as appropriate.

 Webpage speed – People inherently lose patience quickly, when visiting a website. The website with
heavy graphics, audio and video takes more time to load. A web design company must take care of all
the controlling factors that will maintain the desirable speed of the website.

 Search Engine optimization – A well-designed website generally will receive many visitors, and one
method to attract visitors is search engine optimization. This allows the insertion of search keywords in
website content, an appropriate link profile, social media signals etc.

 Web compatibility – A website should easily render on various resolutions, screen sizes and browsers
and with the increasing popularity of mobile devices, websites should function properly on these types
of devices.

Web site Design Issues


 Simplicity – It is a general tendency of web designers to provide lot of animations, huge amount of
information, extreme visuals and so on. This makes the web design enormous and it should be avoided.
The web application must be moderate and simple.
 Identity – Web design must be based on the nature of the web application. It is driven by the objective
of the web application, category of user using it. A web engineer must work to establish an identity for
the web application through the design.
 Consistency – The contents of the web application should be constructed consistently. For example:
text formatting, font style should be the same over the entire text document of the web application.
Similarly, the graphics design, color scheme and style must be identical over the entire web pages of
the web application. Navigation mechanism must be used consistently across web application elements.
 Robustness – The users always expects robust contents and functions of the web application. That
means any required functionality should not be missing at all. If any function or content is missing or
insufficient then that web application will fail.

 Navigability – The navigation should be simple and consistent. The design of navigations should be
intuitive and predictable in nature. That means any user should be in a position to make use of navigation
links without any help.

 Visual Appeal – The web application should be most dynamic and aesthetic in nature. There are various
factors that contribute to visual appeal. The factors are – look and feel of the content, interface layout,
color co-ordination, the balance of text, graphics and other media, navigation mechanism and so on.

 Compatibility – The web application can be used in variety of environment and configurations such as
different browsers, internet connection types, and operating systems.
PHASES OF WEBSITE DEVELOPMENT
Web project can be designed in the four phases as given below -
Phase I: Strategy
 In this phase, a strategic planner or project manager along with the client determines the objectives of
the site. As an output of this phase creative briefs are prepared.

 The creative brief is a kind of document in which project objectives, requirements and key insights are
clearly mentioned. Every team member makes use of creative brief as guidelines for the development.

Phase II: Design


 In this phase actual design of the website is done with the help of creative and technical team members.
The front end is designed by the creative team in which user interface and interactions are designed.

 The back end is designed by the technical team which is responsible for designing the database
architecture. As an outcome of this phase, functional and technical specifications, site architecture are
prepared.

Phase III: Production


 During this phase actual site is built using the source code. Functionalities and features of the website
are closely examined. If the client demands for a change in any functionality then a change order is
issued. At the end of this phase a production guide is prepared.

Phase IV: Testing


 At this phase all the functionalities and features of the website are tested, bugs are identified and
resolved before launching the website. The QA manager develops the test plan. The test suit mentioned
in it is used to test the product thoroughly.

ENHANCING WEBSITE
There are varieties of ways by which one can enhance the website. The website
can be enhanced using some key elements such as:
 Contents - This is the most important element of website. It helps to spread the business message in an
appropriate manner. The content should be easy to understand. Those should be to the point and
relevant. The information available on the website must be useful to the user.

 Graphics - Adding too much graphics in the webpage slows down its speed of loading. Hence Graphics
is undesirable by any user. However the relevant and appealing graphics can be added to the website.

 Color and Text - The colors and text that is appearing on the website must be pleasant to the eyes. As
a rule of thumb, the entire site must use at the most five to six colors. The text should not be too small
or too large. The selection of the family of font for displaying the text must be appropriate so that the
text can be readable.
 Flash – Use of flash animation makes the site attractive but at the same time there are many drawbacks
that are associated with this key element. The first drawback is the flash files take a large amount time
to load the data on the web page.
 Secondly if the flash animation is placed on the web page then the link for downloading the flash player
must also be provided so that the animation can be viewed by the user.

 Frames – Frames must be avoided while designing the website. Instead of using frames the web
designer must prefer the tables. The reason why the use of frames must be avoided in the web page is
that – the search engine finds it difficult to search the contents from the site containing the frames.

 Organizing Files - The files required by the website must be categorized and stored in sorted manner.
This makes it easier to manage the information.

CLIENT-SERVER PARADIGM:

1. Client:
o The client is the system or application that requests services or resources.
o Clients initiate requests and communicate with servers to retrieve or manipulate data.
o Examples: web browsers (requesting web pages), mobile apps (requesting backend data),
desktop applications (accessing online storage).
2. Server:
o The server is the system that provides services, processing, and resources to clients.
o Servers wait for requests from clients, process them, and respond with the requested
information or actions.
o Examples: web servers (serving web pages), database servers (storing and retrieving data),
application servers (handling complex business logic).

Working of the Client-Server Model:

1. Request:
o The client sends a request to the server, usually over a network using protocols like HTTP,
FTP, or TCP/IP.
2. Processing:
o The server receives the request and processes it. This may involve retrieving data from a
database, executing business logic, or returning a static resource.
3. Response:
o The server sends a response back to the client, which may be data, a confirmation of an
action, or an error message.

Characteristics of the Client-Server Paradigm:

 Centralization:
o Servers centralize resources and services, which can be accessed by multiple clients. This
makes it easier to maintain and secure data centrally.
 Scalability:
o The architecture is scalable as servers can be upgraded or replicated to handle more clients or
larger datasets.
 Reliability and Robustness:
o Servers are typically designed for continuous operation, ensuring consistent access for clients.
 Resource Management:
o Efficient resource sharing is achieved as servers provide services to multiple clients, making
better use of resources.

Examples of Client-Server Applications:

 Web Browsing:
o The client (browser) requests a web page from a web server, which serves the requested page.
 Email:
o The client (email app) requests access to emails stored on an email server, which sends the
data back to the client.
 Database Access:
o The client (e.g., a CRM application) requests information from a database server, which
retrieves and sends the data.

Advantages of the Client-Server Paradigm:

 Enhanced Security: Servers manage data access and security protocols centrally.
 Efficient Resource Use: Centralized servers mean clients don’t need powerful hardware to process or
store data.
 Ease of Maintenance: Centralized systems are easier to maintain, upgrade, and back up.

Disadvantages of the Client-Server Paradigm:

 Network Dependency: Clients rely on continuous network connectivity to communicate with servers.
 Scalability Limits: As the number of clients grows, the server might require additional resources to
handle the load.
 Single Point of Failure: If the server goes down, clients cannot access services or resources.

Diagram of the Client-Server Model:

Client (e.g., Browser, Mobile App) <----> Server (Web, App, Database)

BROWSER FUNDAMENTALS
Definition:
 Web browser is a kind of software which is basically used to access resources on the web.

 Over the networks, two computers communicate with each other. In this communication, when request
is made by one computer then that computer is called a client and when the response gets served by
another computer then that computer is called server. Thus exchange of information takes place via
client-Server communication.

 When user wants some web document then a request is sent using the web browser. The browsers are
the programs that are running on the client‘s machines. The request then gets served by the server and
the requested page is then returned to the client. It gets displayed to the client on the web browser. The
web browser can browse the information on the server and hence the name.

 Various web browsers that are commonly used are:

 Web browser supports variety of protocols but the most commonly used protocol on the web browser
is Hyper Text Transfer Protocol (HTTP). This protocol is typically used when browser communicates
with the server.

Functions Defined by Web Browser


Various functions of web browser are -
1. Reformat the URL and send a valid HTTP request.
2. When user gives the address of particular website it is in the form of domain name. The web browser contacts
the DNS to convert it into corresponding IP address.
3. The web browser establishes a TCP connection with the Web server while processing the user‘s request.
4. The web browser sends the HTTP request to the web server.
5. The web server processes the HTTP request sent by the web browser and returns the desired web page to the
client machine. The web browser on the client‘s machine displays this webpage in appropriate format.

WEB BROWSER ARCHITECTURE


The web browser architecture is represented by following figure:

1. User Interface (UI)

 What it is: The visible part of the browser that users interact with. This includes:
o Address bar (URL input field)
o Back/forward buttons
o Bookmarking options
o Refresh button
o Home button
o Menu options

 Address bar: Where users input URLs.


 Tabs: Displays open pages.
 Bookmarks and History: User interaction with saved data.
 Menus and Context Menus: Interaction options. Popups and Modals: Displaying alerts and
dialogs.

 Purpose: Allows the user to navigate through web pages and interact with browser settings.

2. Browser Engine

 What it is: Acts as a bridge between the user interface and the rendering engine.
 Purpose: Queries and manipulates the rendering engine to display web content properly based
on user interactions (like clicking links or buttons).
3. Rendering Engine

In web browsers, the rendering engine is responsible for converting HTML, CSS, and JavaScript into
a visual representation of a webpage. Similarly, rendering engines can be used in apps to draw and
display UI components, process graphical elements, and ensure the visual layout adheres to the app’s
design specifications.

 What it is: The core component responsible for rendering HTML, CSS, and JavaScript to
display content.
 Common Engines:
o Blink (used by Google Chrome and Opera)
o WebKit (used by Safari)
o Gecko (used by Mozilla Firefox)
 Purpose: Transforms the content of a web page (HTML documents) into visual output on the
screen. It converts HTML and CSS into a DOM (Document Object Model) tree and renders it
graphically.

4. Networking Layer

 What it is: Handles all network communication using protocols such as HTTP or HTTPS.
 Purpose: Retrieves documents from the web server. It manages tasks like opening TCP
connections, sending HTTP requests, and receiving responses (HTML, CSS, JavaScript,
images, etc.).

5. JavaScript Engine

 What it is: A dedicated engine that parses, compiles, and executes JavaScript code in web
pages.
 The primary role of a JavaScript engine is to parse, interpret, and execute JavaScript code
embedded in web pages.
  Web browsers fetch web pages from servers, which often contain JavaScript either inline
(inside the HTML document) or linked as external files.
  The engine executes this JavaScript, allowing the web page to interact with users and perform
complex tasks such as form validation, animations, fetching data from APIs, or responding to
user inputs like mouse clicks and keystrokes.
 Common Engines:
o V8 (used by Chrome)
o SpiderMonkey (used by Firefox)
o JavaScriptCore (used by Safari)
 Purpose: Handles JavaScript code execution, manipulating the DOM in real-time, performing
calculations, animations, and enabling interactivity.

Interfacing with Web APIs

 JavaScript engines provide access to a variety of Web APIs, enabling JavaScript to interact
with the browser environment and perform many powerful tasks, such as:
o DOM APIs: Manipulate the structure and content of web pages.
o Fetch API: Send network requests to servers to fetch or send data.
o Geolocation API: Retrieve the user’s geographic location.
o Web Storage API: Store data in the browser (localStorage, sessionStorage).
o Canvas/WebGL APIs: Enable drawing and rendering graphics.
o Service Workers: Allow JavaScript to handle background tasks like caching and
notifications, supporting offline capabilities for web applications.
 These APIs allow developers to create complex web applications with capabilities traditionally
reserved for desktop applications.

6. UI Backend

 What it is: A component that is platform-specific (varies by operating system) and draws basic
widgets like windows, buttons, and dropdowns.
 Purpose: Provides the basic rendering and display of the browser's interface (like rendering
controls and popups).

UI backend in a browser is the layer responsible for translating the layout and visual components of a
webpage or web application into pixel data that can be displayed on the screen. It handles how the
browser interacts with the operating system’s graphical APIs to render content, manage events (like
mouse clicks, keyboard input), and display elements on the user interface (UI).

Chrome (Chromium UI Backend):

 Chrome's UI backend is built on top of Skia, an open-source 2D graphics library used for
rendering. It handles everything from rendering text and images to drawing the browser’s user
interface components.

Firefox (Gecko UI Backend):


Safari (WebKit UI Backend):

7. Data Storage

 What it is: Used to store various types of data, including cookies, cache, and databases.
 Types of Storage:
o Cookies: Small pieces of data stored by websites.
o Local Storage/Session Storage: Allows web applications to store data in the browser.
o IndexedDB: A low-level API for storing large amounts of structured data.
o Cache: Temporary storage of web resources for faster retrieval.
 Purpose: Maintains persistent data between sessions and stores web application data for faster
load times and offline access.

8. Compositor

 What it is: A layer that coordinates drawing web content on the screen.
 Purpose: Efficiently manages how web pages are rendered by combining different layers (text,
images, CSS styles) into a single output on the screen, especially when dealing with complex
layouts, animations, or scrolling.

9. GPU Process

 What it is: A separate process that handles GPU-accelerated rendering.


 Purpose: Speeds up rendering by offloading certain tasks to the Graphics Processing Unit
(GPU), which can be used to handle complex tasks like 3D rendering, animations, or video
playback.

GPU-accelerated rendering in a web browser allows web applications to leverage the graphics
processing unit (GPU) to speed up the rendering of visual content. This is essential for rendering
complex animations, graphics, videos, and interactive content smoothly.

Workflow of Web Browser Architecture:

1. User Input: The user enters a URL in the address bar or interacts with a web page.
2. Network Layer: The browser retrieves the web page from the server using the network layer,
often through HTTP/HTTPS requests.
3. Rendering Engine: The HTML and CSS from the web page are passed to the rendering engine,
which builds the DOM tree and a CSSOM (CSS Object Model).
4. JavaScript Engine: The JavaScript code from the page is executed by the JavaScript engine,
which can modify the DOM in real-time.
5. Compositing: The rendering engine combines the layout and style information into visual
blocks.
6. Display: The final visual layout is sent to the UI Backend, which draws the content on the
screen, often with the help of GPU acceleration.

HTTP PROTOCOL

The HTTP (HyperText Transfer Protocol) is a protocol used for transferring hypertext requests and information
between servers and browsers. It forms the foundation of data communication on the World Wide Web. HTTP
works as a request-response protocol in the client-server computing model, where a user (the client) sends a
request to a web server, which then responds with the requested resources, like web pages, files, or other data.

Key Features of HTTP:


Stateless: Each request is independent, meaning the server does not retain any information about previous
requests from the same client.
Request-Response Model:
Request: The client sends an HTTP request to the server. It includes methods like GET, POST, PUT,
DELETE, etc.
Response: The server responds with a status code (e.g., 200 OK, 404 Not Found), along with the requested
resource or an error message.
Methods (or Verbs):
 GET: Requests data from a specified resource.
 POST: Sends data to the server, often used for submitting form data or uploading files.
 PUT: Updates a current resource with new data.
 DELETE: Deletes a specified resource.
 HEAD: Same as GET, but it retrieves only the headers, not the body.
 OPTIONS: Returns the HTTP methods that the server supports.
 PATCH: Partially modifies a resource.

HTTP Versions:
HTTP/1.0: The original version, supporting only one request per connection.
HTTP/1.1: Supports persistent connections (more than one request per connection) and introduced
improvements like chunked transfer encoding.
HTTP/2: A more efficient version with binary framing, header compression, and multiplexing of requests
to reduce latency.
HTTP/3: Built on top of QUIC (a UDP-based protocol), offering faster and more reliable communication.

Headers: HTTP allows additional information to be sent with requests and responses in the form of headers.
For example:
Content-Type: Specifies the media type (e.g., text/html, application/json).
User-Agent: Information about the client making the request (e.g., browser type).
Accept: Specifies the media types the client is willing to receive.

Status Codes:
 1xx (Informational): Request received, continuing process.
 2xx (Success): The request was successfully received, understood, and accepted (e.g., 200 OK).
 3xx (Redirection): The client must take additional action to complete the request (e.g., 301 Moved
permanently).
 4xx (Client Error): The request contains incorrect syntax or cannot be fulfilled (e.g., 404 Not Found).
 5xx (Server Error): The server failed to fulfill a valid request (e.g., 500 Internal Server Error).

HTTPS
HTTPS (HTTP Secure) is the secure version of HTTP. It uses encryption (usually via SSL/TLS) to protect the
data exchanged between the client and the server from eavesdropping and tampering.

An HTTP request message consists of several components that allow a client (like a web browser) to
communicate with a web server. The structure of an HTTP request includes the following parts:

An HTTP request message consists of several components that allow a client (like a web browser) to
communicate with a web server. The structure of an HTTP request includes the following parts:

HTTP REQUEST MESSAGE STRUCTURE


The basic structure of request message is given by the following general form -
<start line>
<Header fields>
<Blank Line>
<Message Body>

Let us discuss this structure in detail: Start line - The start line consist of three parts which are separated by a
single space. These parts are - 1) Request method 2) Request-URI 3) HTTP version
1. Request Line
The request line contains the method (HTTP verb), the target resource (URI or path), and the HTTP version
being used. This is the first line of the HTTP request.
Format:
<HTTP Method> <Request Target> <HTTP Version>
Example:
GET /index.html HTTP/1.1

HTTP Method: Specifies the action to be performed (e.g., GET, POST, PUT, etc.).
Request Target (URI): The path to the resource on the server. It may also include a query string for additional
parameters.
HTTP Version: Indicates the HTTP version, usually HTTP/1.1, HTTP/2, or HTTP/3.

2. Headers
Headers provide additional information about the request. Each header consists of a name followed by a colon
(:) and a value. Headers are used to provide metadata about the request, such as the type of content the client
can accept, the language preferences, or authorization information.

Format:
Header-Name: Header-Value
Common Headers:
Host: Specifies the domain name of the server.
Host: www.example.com
User-Agent: Information about the client making the request (browser type, OS, etc.).
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...
Accept: Specifies the media types that the client is willing to accept.
Accept: text/html,application/xhtml+xml,application/xml;q=0.9
Content-Type: Specifies the media type of the body of the request (if applicable).
Content-Type: application/json
Authorization: Contains credentials to authenticate the client to the server.
Authorization: Bearer <token>

3. Blank Line
After the headers, there must be a blank line to separate the headers from the optional body. This is simply a
line break (\r\n or \n).
4. Message Body (Optional)
The message body contains the data that is sent to the server. This is only included for certain methods, such as
POST or PUT. The body can contain form data, JSON, XML, or other content types, depending on the Content-
Type header.
For example, a POST request might send form data in the body:
username=admin&password=1234 Or it could send JSON data:
json

{
"username": "admin",
"password": "1234"
}

Example of an HTTP Request:


POST /login HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
Content-Type: application/x-www-form-urlencoded
Content-Length: 27
//BLANKLINE
username=admin&password=1234

Breakdown of the example:


Request Line: POST /login HTTP/1.1
HTTP method is POST, targeting the /login resource, using HTTP version 1.1.
Headers:
Host: Indicates the host server (www.example.com).
User-Agent: Information about the client.
Content-Type: Indicates that form data is being sent in URL-encoded format.
Content-Length: The length of the message body (27 characters).
Blank Line: A line break separating the headers and body.
Body: Contains the form data: username=admin&password=1234.

An HTTP RESPONSE MESSAGE is sent by the server in response to an HTTP request from a client.
The HTTP Response Message Structure
<status line>
<Header fields>
<Blank Line>
<Message Body>

An HTTP response has the following key components:


1. Status Line
The first line of the HTTP response is the status line, which contains three elements: the HTTP version, the
status code, and the reason phrase.

Format:
<HTTP Version> <Status Code> <Reason Phrase>

HTTP Version: The version of HTTP used by the server (e.g., HTTP/1.1, HTTP/2).
Status Code: A 3-digit code that indicates the result of the request (e.g., 200, 404, 500).
Reason Phrase: A human-readable explanation of the status code (e.g., OK, Not Found, Internal Server Error).

Example: HTTP/1.1 200 OK

HTTP/1.1: HTTP version.


200: Status code indicating success.
OK: Reason phrase indicating that the request was successful.

2. Response Headers

Headers provide additional information about the response, such as content type, length, server details, caching
policies, etc. Each header is a key-value pair, separated by a colon (:).

Format:

Header-Name: Header-Value

Common Response Headers:

Content-Type: Specifies the media type of the response body (e.g., text/html, application/json).

Content-Type: text/html; charset=UTF-8

Content-Length: The size of the response body in bytes.

Content-Length: 3495

Date: The date and time when the response was generated.

Date: Tue, 01 Oct 2024 10:20:30 GMT

Server: Information about the server software.

Server: Apache/2.4.41 (Ubuntu)

Cache-Control: Directives for caching mechanisms.

Cache-Control: no-cache, no-store, must-revalidate

3. Blank Line

A blank line separates the headers from the body of the response. This is represented by a simple line break (\r\n
or \n).

4. Message Body (Optional)

The message body contains the actual content being returned by the server, such as an HTML page, an image,
or JSON data. The content is usually defined by the Content-Type header.

If the request was for an HTML page (GET /index.html), the body would contain the HTML code for that
page.
If the request was for a JSON API (GET /api/data), the body might contain a JSON object.

Example of a Response with an HTML Body:

HTTP/1.1 200 OK
Date: Tue, 01 Oct 2024 10:20:30 GMT
Server: Apache/2.4.41 (Ubuntu)
Content-Type: text/html; charset=UTF-8
Content-Length: 138

<html>
<head>
<title>Example Page</title>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>

Breakdown of the Example:

Status Line: HTTP/1.1 200 OK


The server is responding with HTTP version 1.1, status code 200 indicating success, and reason phrase
OK.

Headers:
Date: The date and time the response was generated.
Server: Information about the server (Apache/2.4.41).
Content-Type: Specifies the response body as HTML with UTF-8 character encoding.
UTF (Unicode Transformation Format), especially UTF-8, plays a crucial role in how browsers display text and
content. It ensures that web pages can be rendered correctly, regardless of the languages, symbols, or special
characters they contain.
Content-Length: The size of the response body (138 bytes).

Blank Line: A line break separating the headers and body.

Body: The HTML content for a simple webpage with a title and a "Hello, World!" message.

Common HTTP Response Status Codes:


1xx (Informational): The server acknowledges the request but has not yet completed processing.
100 Continue
101 Switching Protocols
2xx (Success): The server successfully processed the request.
200 OK: The request was successful, and the response contains the result.
201 Created: The request was successful, and a new resource was created.
3xx (Redirection): The client must take additional action to complete the request.
301 Moved Permanently: The resource has been moved to a new URL.
302 Found: The resource is temporarily located at a different URL.
4xx (Client Errors): There was an error with the client’s request.
400 Bad Request: The request was malformed.
401 Unauthorized: Authentication is required and has failed or has not been provided.
403 Forbidden: The client does not have permission to access the resource.
404 Not Found: The requested resource could not be found.
5xx (Server Errors): The server encountered an error while processing the request.
500 Internal Server Error: A generic error message indicating a problem with the server.
502 Bad Gateway: The server was acting as a gateway and received an invalid response.
503 Service Unavailable: The server is temporarily unavailable, often due to overload or maintenance.

AUTHORING TOOLS

Definition:
 A web authoring tool is a software package which developers use to create and package e-learning
content deliverable to end users. The multimedia authoring tools provide the capability for creating a
complete multimedia presentation, including interactive user control.

 Some examples of the authoring tools are Macromedia Flash, Macromedia Director, Author ware and
Quest

 Authoring software provides an integrated environment for combining the content and functions of a
project. It enables the developer to create, edit, and import data.
 In multimedia authoring tools, multimedia elements and events are considered as objects. Each object
is assigned properties and modifiers. On receiving messages, the objects perform tasks depending upon
properties and modifiers.

Features of Authoring tools:


1. Programming Features:
 Authoring tools offer programming feature support using high level languages or support for scripting
environment. The tools that offer the programming features are Macromedia Flash, HyperCard,
Metacard and Tool Book.
 Some authoring tools offer direct importing of preformatted text, including facilities for complex text
search mechanisms and hyper linkage tools. Visual authoring tools such as Author ware and Icon Author
are suitable for slideshows and presentations.

2. Interactivity features:
 The interactivity feature allows the user to have control over the flow of information. Using the
interactivity features the contents are well organized by the user. The conditional branching supports
the complex programming logic, subroutines, event tracking and message passing among objects and
elements.

3. Editing and organizing features:


 The elements of multimedia – image, animation, text, digital audio and MIDI music and video clips
need to be created, edited and converted to standard file formats and the specialized applications provide
these capabilities.

 Editing tools for these elements, particularly text and still images are often included in as authoring
tools. Some authoring tools provide a visual flowchart system or overview facility for illustrating your
project’s structure at a macro level. Storyboard navigation diagrams too can help organize a project.

4. Delivery Features:
 Delivering your project may require building run time version of the project using the multimedia
authoring software. A run time version allows the project to play back without requiring the full
authoring of Multimedia Systems software and all its tools and editors. Many times the run time version
does not allow user to access or change the content, structure and programming of the project.

5. Cross Platform feature:


 By this feature, it is possible to transfer the content across the platform easily. The run time players are
available for providing the compatibility to the authoring tools to work in other platforms.

Examples of Authoring Tools:


1. Macromedia Flash:
 Adobe Flash Player is a multimedia platform which has become the standard for implementing
animation and interactivity into web pages to create ads, integrate video into websites.

2. HyperCard:
 It is a hypermedia program created for Macintosh Computer. It combines database abilities with a
graphical, flexible, user-modifiable interface. HyperCard also features Hyper talk, a programming
language for manipulating data and the user interface.

3. Front Page:
 It is a website administration tool from Microsoft for the Microsoft windows. FrontPage consists of a
Split View option to allow the user to code in code view and preview in design view without the hassle
of switching from the design view and code view tabs for each review.

 Interactive Buttons gives users a new way to create web graphics for navigation and links eliminating
the need for a complicated package.

4. Dreamweaver:
 Dreamweaver is a web authoring tool rather than a multimedia tool. It does however support a wide
range of multimedia file types. These include graphics formats such as JPEG, GIF, PNS as well as Short
wave files.

 Support exists for embedding other media such as audio and video within HTML or a script. A range
of interactive elements are pre-scripted as behaviors, including some that can be used for multimedia
and interactivity. An extensive range of languages including HTML, XML, ASP, PHP, JSP, JavaScript
and VBScript are supported by Dreamweaver.

5. Netobjects Fusion:
 It is a tool that is a solution for small business websites, from planning, building and managing your
site to promoting and growing online business quickly and effectively.

 One can drag images, text and other objects anywhere on the page and simply drop them in. The
Netobjects fusion is the first program to remove the tedious hand coding from creating pixel-precise
page layouts in HTML.

TYPES OF SERVER:

APPLICATION SERVER

An application server is a software framework that provides an environment for running applications,
typically web-based applications. It acts as a middle layer between the client (often a web browser)
and back-end services like databases. Application servers handle business logic, manage resources,
and facilitate communication between different application components.

Key Roles of an Application Server:

1. Business Logic Execution: Executes the core functionality of applications, separating it from
the client-side presentation.
2. Resource Management: Manages system resources like memory, threads, and database
connections.
3. Security and Authentication: Provides security features like authentication, authorization,
and encryption.
4. Load Balancing and Failover: Distributes traffic and provides redundancy in case of server
failure.
5. Connection to Databases: Facilitates communication with databases and other back-end
systems.
6. Web Services Support: Provides support for web services (like SOAP or REST APIs).

Working Principle of Application Server

1. Client Request Initiation

 A client application (such as a web browser, mobile app, or another service) sends a request to
the application server. This request may be for data, processing a business transaction, or
executing a specific application function (e.g., user authentication, data retrieval).

2. Receiving and Parsing the Request

 The application server receives the incoming request, which typically includes:
o Request Method: (GET, POST, PUT, DELETE, etc.) indicating the action to be
performed.
o Endpoint or URL: The specific resource or service being requested (e.g., /api/users).
o Headers: Additional information such as content type, authorization tokens, and user
details.
o Payload: Data sent by the client, especially for POST or PUT requests.

3. Routing the Request

 The application server routes the request to the appropriate application logic or service based
on the requested endpoint. This is often done using a framework or routing mechanism.

4. Business Logic Execution

 The application server executes the appropriate business logic associated with the requested
endpoint. This may involve:
o Data Processing: Performing calculations, validations, or transformations on the
incoming data.
o Database Interaction: Executing queries to retrieve or modify data stored in a
database. This may involve using an Object-Relational Mapping (ORM) tool or direct
SQL queries.
o Service Integration: Interacting with other services or APIs, including third-party
services (e.g., payment gateways, external databases) to fulfill the request.

5. Building the Response

 After processing the request, the application server constructs an HTTP response. This typically
includes:
o Status Code: Indicates the outcome of the request (e.g., 200 OK, 201 Created, 400 Bad
Request, 500 Internal Server Error).
o Headers: Information about the response, such as content type (application/json,
text/html), caching policies, and authentication details.
o Body: The actual content being returned, which could be data in JSON, XML, HTML,
or plain text format.

6. Sending the Response to the Client

 The application server sends the constructed HTTP response back to the client. The client
application processes the response as needed.
 If the response contains data (e.g., user information, results of a transaction), the client
application can display this data to the user or perform further actions.

7. Handling Session Management (Optional)

 If the application requires user sessions (e.g., for maintaining state in web applications), the
application server manages sessions through cookies or tokens.
 It tracks user interactions, authenticates users, and stores session data in memory or a database.

8. Logging and Monitoring

 The application server logs details about each request and response, which can be used for
performance monitoring, debugging, and analyzing usage patterns.
 Logs may include timestamps, IP addresses, request types, response times, and error messages.

Common Application Servers:

 Java EE Application Servers: Examples include Apache Tomcat, JBoss, WildFly, and Oracle
WebLogic.
 Microsoft's .NET Framework: Often combined with IIS (Internet Information Services) to
run .NET applications.
 Node.js: Used for running JavaScript-based applications, often with Express.js as the web
server framework

Real Life Applications of Application Server:

1. E-Commerce Platforms

Example: Amazon, eBay, Alibaba

 Role of Application Server: E-commerce platforms handle massive amounts of traffic,


manage user sessions, and execute complex business logic like product searches,
recommendations, payment processing, and inventory management.
 How Application Servers Help: They provide scalable environments to manage heavy traffic,
ensure secure transactions, handle shopping cart sessions, and interact with databases to fetch
product information and order status in real-time.

2. Social Media Platforms

Example: Facebook, Twitter, Instagram

 Role of Application Server: Social media platforms require dynamic content delivery, session
management, and real-time communication between users.
 How Application Servers Help: They manage user requests, update feeds, handle
notifications, and enable real-time interactions (e.g., comments, likes, and messaging).
Application servers also scale automatically to handle millions of concurrent users, distributing
the load across multiple servers.

3. Streaming Services

Example: Netflix, YouTube, Spotify

 Role of Application Server: Streaming services deliver high-quality video, music, and content
to users worldwide while managing user preferences, recommendations, and subscriptions.
 How Application Servers Help: They manage content requests, authenticate users, maintain
playlists or watchlists, and provide personalized recommendations. Application servers also
manage buffering, content delivery, and DRM (Digital Rights Management) systems.

4. Online Education Platforms

Example: Coursera, Khan Academy, Udemy

 Role of Application Server: Online learning platforms deliver course content, manage user
progress, and enable real-time communication like live sessions or discussions.
 How Application Servers Help: They manage user authentication, track learning progress,
stream video lectures, and provide interactive quizzes. The servers also enable discussion
forums, assignment submissions, and grading in a scalable environment.

WEB SERVER:

A web server is a software or hardware system that stores, processes, and delivers web content to users
over the internet. It communicates with web browsers using the Hypertext Transfer Protocol (HTTP)
or its secure variant, HTTPS. When a user requests a webpage by entering a URL in their browser, the
web server retrieves the requested content and sends it back to the browser for display.

Key Functions of a Web Server:

1. Serving Static Content: Web servers deliver static files such as HTML pages, images, CSS
stylesheets, and JavaScript files. Static content remains the same regardless of user interaction.
2. Processing Dynamic Content: While traditional web servers primarily serve static content,
they can also interact with application servers or scripts (e.g., PHP, Python, Ruby) to generate
dynamic content based on user input or other factors.
3. Handling HTTP Requests: Web servers process incoming HTTP requests, interpret the
request, and send back the appropriate response, such as a webpage or an error message.
4. Logging and Monitoring: Web servers maintain logs of requests, which can be analyzed for
performance monitoring, debugging, and security purposes.
5. SSL/TLS Support: Web servers can handle secure connections using SSL (Secure Sockets
Layer) or TLS (Transport Layer Security) protocols, ensuring that data transmitted between the
server and the client is encrypted.
6. Load Balancing: In large-scale applications, multiple web servers can be configured to
distribute incoming traffic, ensuring optimal performance and availability.

Working Principle of Web Server:

1. Receiving HTTP Requests

 When a user enters a URL into their web browser or clicks a link, the browser sends an HTTP
request to the appropriate web server.
 The request typically includes:
o Method: (GET, POST, PUT, DELETE, etc.) indicating the action to be performed.
o URL: The specific resource requested (e.g., https://example.com/page.html).
o Headers: Additional information about the request, such as the browser type (User-
Agent), accepted content types, and cookies.

2. Resolving Domain Names

 Before reaching the web server, the domain name in the URL (e.g., example.com) is resolved
to an IP address using the Domain Name System (DNS).
 This process involves querying DNS servers to convert the human-readable domain name into
an IP address, which identifies the server on the internet.

3. Processing the Request

 Once the web server receives the request, it processes it:


o Routing: The server checks the requested URL against its directory structure to locate
the corresponding file or resource.
o Dynamic Content Generation: If the request is for a dynamic resource (e.g., a PHP
script or a web application), the server may need to interact with an application server
or execute server-side scripts to generate the content.
o Static Content Retrieval: If the request is for a static file (e.g., an HTML, CSS, or
image file), the server retrieves it directly from its file system.

4. Building the Response

 After processing the request, the web server constructs an HTTP response that typically
includes:
o Status Code: Indicates the result of the request (e.g., 200 OK, 404 Not Found, 500
Internal Server Error).
o Headers: Information about the response, such as content type (text/html, image/png),
length, caching policies, and server details.
o Body: The actual content being returned, which could be the HTML of a webpage, an
image, or data in JSON or XML format.

5. Sending the Response

 The web server sends the constructed HTTP response back to the client’s web browser over
the same TCP connection used for the request.
 The browser receives the response and processes it accordingly:
o If it’s an HTML page, the browser renders the content.
o If it’s a media file, the browser plays or displays it as appropriate.

6. Handling Additional Requests

 If the HTML page contains references to additional resources (like images, CSS, or JavaScript
files), the browser will make separate HTTP requests for each of those resources.
 The web server will handle these requests in the same manner, responding with the necessary
files.

7. Logging and Monitoring

 The web server logs details about each request and response, which can be used for monitoring
performance, analyzing traffic, and troubleshooting issues

Common Web Servers:

 Apache HTTP Server: One of the most popular and widely used open-source web servers. It
supports various modules and is highly configurable.
 Nginx: Known for its high performance and low resource consumption, Nginx is used for
serving static content and as a reverse proxy server.
 Microsoft Internet Information Services (IIS): A web server developed by Microsoft,
primarily used for hosting .NET applications and integrating with Windows Server
environments.
 LiteSpeed: A commercial web server known for its speed and efficiency, often used for
WordPress hosting and other CMS platforms.
 Caddy: A modern web server that comes with automatic HTTPS, making it easy to configure
and secure web applications.

DATABASE SERVER

A database server is a specialized computer system or software application designed to store, retrieve,
and manage data in a structured format, typically using a Database Management System (DBMS).
It serves as the backend for many applications, handling large volumes of data, processing queries, and
ensuring data integrity, security, and availability.

Key Functions of a Database Server:

1. Data Storage: A database server stores data in structured formats, typically using tables in
relational databases (like MySQL, PostgreSQL) or collections in NoSQL databases (like
MongoDB).
2. Data Retrieval: It processes queries to retrieve specific data requested by an application or a
user. Queries are written in query languages like SQL (Structured Query Language) for
relational databases or using query methods in NoSQL databases.
3. Data Management: Database servers manage operations such as data insertions, updates, and
deletions while ensuring data integrity (e.g., through constraints, relationships, or transaction
management).
4. Concurrency Control: In multi-user environments, a database server handles multiple
simultaneous requests from clients, ensuring that transactions are processed efficiently and
without conflicts (through locking mechanisms, for example).
5. Security: Database servers enforce security measures like user authentication, role-based
access control, encryption, and backup mechanisms to protect sensitive data.
6. Backup and Recovery: Database servers are equipped with tools and processes for regular
data backups, and they offer recovery mechanisms in case of system failure, ensuring data is
not lost.
7. Data Integrity and Consistency: Database servers maintain the consistency and accuracy of
data through transaction management (e.g., using ACID properties in relational databases:
Atomicity, Consistency, Isolation, Durability).

Working Principle of a Database Server:

1. Receiving Client Requests


o The database server receives requests from client applications (such as web servers,
application servers, or direct user queries). These requests can involve:
 Data retrieval: (e.g., a SELECT SQL query to fetch specific records from the
database).
 Data modification: (e.g., INSERT, UPDATE, or DELETE queries to modify
the data).
 Administrative tasks: (e.g., managing users, performing backups, or
optimizing queries).
2. Query Parsing and Optimization
o Upon receiving a query (e.g., SQL), the database server parses it to understand its
structure and validity.
o The server optimizes the query, determining the most efficient way to retrieve or
manipulate the data. This optimization involves using indexes, query caching, and
choosing the best execution plan.
3. Executing the Query
o The server then executes the optimized query:
 For retrieval queries: It locates the relevant data in the database, leveraging
indexes and relationships to quickly access the needed information.
4. Transaction Management
o If the query involves multiple operations (such as inserting multiple rows or making
updates across multiple tables), the database server handles them as a single
transaction.
o Transactions ensure that either all operations are successfully completed or none are
(using rollback mechanisms), preserving the integrity of the database.
5. Returning Results
o Once the query is executed, the database server sends the results back to the client:
 For SELECT queries, the results may be rows of data.
6. Logging and Monitoring
o Database servers maintain logs of transactions, queries, and operations for auditing and
performance monitoring purposes.
o Logs also play a crucial role in recovery and debugging.
7. Data Replication and Clustering
o Many modern database servers support replication (keeping multiple copies of the
same data across servers) to enhance performance and reliability.
o In clustered environments, data can be distributed across multiple servers to balance the
load and improve fault tolerance.

Types of Database Servers:

1. Relational Database Servers (RDBMS)


o These store data in tables with rows and columns, supporting SQL queries. Examples
include:
 MySQL
 PostgreSQL
 Microsoft SQL Server
 Oracle Database

DIFFERENCE BETWEEN WEB SERVER, APPLICATION SERVER AND DATABASE


SERVER

1. Web Server
Definition:

A web server is a server that handles HTTP requests from clients (usually web browsers) and serves
static content such as HTML pages, images, CSS, and JavaScript files.

Primary Function:

 Serves static content like web pages, images, videos, and CSS/JS files over the internet.
 Processes HTTP/HTTPS requests and sends responses.
 Often used as a front-end for handling client requests before forwarding them to the application
server (if needed).

Examples:

 Apache HTTP Server


 Nginx
 Microsoft IIS (Internet Information Services)

Key Features:

 Handles client (browser) requests via the HTTP/HTTPS protocol.


 Manages static content, caching, and security (SSL/TLS).
 Can forward dynamic requests to an application server using reverse proxy.

Diagram:

Client (Browser) ---> Web Server ---> Application Server (if required.

Use Case:

If a user requests a static HTML page, the web server will directly return the page without requiring
any backend logic or data processing.
2. Application Server
Definition:

An application server is a server that runs applications and provides business logic to web applications
through various protocols, including HTTP but also others like TCP or SOAP.

Primary Function:

 Serves dynamic content by executing server-side scripts or programs.


 Processes business logic and interacts with databases or other services.
 Handles complex operations like transaction management, authentication, and session
management.

Examples:

 Apache Tomcat
 JBoss (WildFly)
 IBM WebSphere
 Oracle WebLogic

Key Features:

 Executes server-side scripts (e.g., PHP, Java, Python) to generate dynamic web pages.
 Manages application-specific logic such as authentication, session handling, and transactions.
 Often works with a web server, receiving requests for dynamic content.

Diagram:

Client (Browser) ---> Web Server ---> Application Server ---> Database Server.

Use Case:

If a user requests a webpage that requires querying a database or running complex business logic (e.g.,
a login system or online shopping), the application server processes the request and returns a
dynamically generated page.

Database Server
Definition:

A database server is a server dedicated to managing databases, handling data storage, retrieval, and
management. It responds to queries and processes data for applications or websites.

Primary Function:

 Stores, retrieves, and manages data for applications.


 Handles SQL queries from application servers to store, update, or fetch data.
 Ensures data integrity and provides backup and recovery mechanisms.

Examples:

 MySQL
 PostgreSQL
 Oracle Database
 Microsoft SQL Server

Key Features:

 Handles large amounts of data and performs complex queries.


 Provides transaction support and ensures the consistency and integrity of data.
 Works in tandem with application servers to provide data-driven functionality.

Diagram:

Client (Browser) ---> Web Server ---> Application Server ---> Database Server.

Use Case:
If a user submits a form (e.g., user registration), the application server processes the form data and sends a
request to the database server to store the information in the database.

Feature Web Server Application Server Database Server


A server that handles HTTP A server dedicated to
A server that runs applications
Definition requests and serves static managing and storing
and provides business logic.
content. data.
Serves static content Stores, retrieves, and
Primary Executes server-side logic to
(HTML, CSS, JS, images) manages data for
Function generate dynamic content.
over HTTP/HTTPS. applications.
Apache Tomcat, JBoss MySQL, PostgreSQL,
Apache HTTP Server,
Examples (WildFly), IBM WebSphere, Oracle Database,
Nginx, Microsoft IIS
Oracle WebLogic Microsoft SQL Server
Key
HTTP/HTTPS HTTP, TCP, SOAP, RMI SQL, NoSQL
Protocols
Content Dynamic content generated Data for storage and
Primarily static content
Type based on business logic retrieval
Directly interacts with Interacts with
Client Processes requests forwarded
clients, typically via web application server for
Interaction by the web server
browsers data-related queries
Caching & Manages caching and Manages application-level Ensures data integrity,
Security SSL/TLS security security, transactions, sessions transaction management
Generating a login page or Storing and retrieving
Use Case
Serving a static HTML page dynamic content like an order user data from a
Example
page registration form
Client -> Web Server -> Client -> Web Server ->
Typical Client -> Web Server ->
Application Server -> Database Application Server ->
Diagram App Server (if needed)
Server Database Server

You might also like