> For the complete documentation index, see [llms.txt](https://riteshs4hu.gitbook.io/infosec-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://riteshs4hu.gitbook.io/infosec-notes/web-appsec/web-application-fundamentals/basic-of-web-application.md).

# Basic of Web Application

## **What is a Web Application?**

A **web application** is a software program that runs on a web server rather than being installed on a user’s local device. Users access and interact with web applications through a web browser (e.g., Google Chrome, Mozilla Firefox) over the internet.

Web applications follow the **Client-Server Architecture**, where the **client** (user’s browser) sends requests for resources or services to the **server** (where the application is hosted). The server processes these requests and returns the appropriate response to the client.

### **Common Components of Web Applications**

#### **1. Frontend (Client-Side)**

The frontend is the user-facing part of the web application and is responsible for displaying content and handling user interactions.

* **HTML & CSS** – Define the structure and styling of the web pages.
* **JavaScript** – Adds interactivity and dynamic behavior.
* **Frontend Frameworks/Libraries** – Tools like **React, Angular, and Vue.js** enable the development of complex user interfaces.

#### **2. Backend (Server-Side)**

The backend processes user requests, manages business logic, and interacts with databases.

* **Server** – Receives client requests, processes data, and sends responses.
* **Database** – Stores essential application data, such as user information and content (e.g., **MySQL, PostgreSQL, MongoDB**).
* **APIs (Application Programming Interfaces)** – Facilitate communication between the frontend and backend, commonly using **REST** or **GraphQL**.

### **Types of Web Applications**

#### **1. Static Web Applications**

Static web applications consist of **predefined, fixed content** that remains unchanged unless manually modified. Each page is a separate **HTML file**, and content is delivered exactly as stored on the server. These applications typically use **HTML, CSS, and JavaScript** to create visual elements but lack real-time interactivity or server-side processing.

**Examples:**

* Company brochure websites
* Personal portfolios
* Landing pages

#### **2. Dynamic Web Applications**

Dynamic web applications generate content **in real-time** based on user interactions, database queries, or server-side processing. Unlike static applications, they can display personalized content and allow users to interact with stored data. These applications utilize **server-side languages** such as **PHP, Python, or Ruby**, along with **databases** like **MySQL or PostgreSQL** to manage data.

**Examples:**

* Social media platforms
* E-commerce websites
* Online banking portals
