0% found this document useful (0 votes)
13 views19 pages

Unit 05 - Full Stack Web Development

The document outlines key web design issues, including browser compatibility, bandwidth, display resolution, and the importance of sitemaps for SEO and user navigation. It also introduces MongoDB as a NoSQL database, highlighting its features like document-oriented storage and flexible schema. Additionally, it explains the HTTP request-response model, detailing the components of both requests and responses.

Uploaded by

rahulbisht0118
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)
13 views19 pages

Unit 05 - Full Stack Web Development

The document outlines key web design issues, including browser compatibility, bandwidth, display resolution, and the importance of sitemaps for SEO and user navigation. It also introduces MongoDB as a NoSQL database, highlighting its features like document-oriented storage and flexible schema. Additionally, it explains the HTTP request-response model, detailing the components of both requests and responses.

Uploaded by

rahulbisht0118
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/ 19

Full Stack Web

Development
by Dr Piyush Bagla
Web Design Issues
1. Browser Compatibility
• Different browsers (Chrome, Firefox, Safari, Edge) render websites differently.
• Use cross-browser testing to ensure consistent appearance and functionality.
• Use web standards (HTML5, CSS3) and avoid browser-specific code.

2. Bandwidth and Cache


• Bandwidth: Low-bandwidth users may face slow-loading websites.
➢ Use image compression, minified CSS/JS, and lazy loading.
• Cache: Browsers store static files (images, CSS, JS) to reduce load time.
➢ Set proper cache headers to improve performance and reduce server load.
Web Design Issues
3. Display Resolution
• Devices have different screen sizes and resolutions.
➢ Use responsive web design with flexible grids, media queries, and scalable
images.
➢ Test on mobile, tablet, laptop, and desktop views.

4. Look and Feel of the Website


• Consistent color schemes, fonts, and design elements.
• It should reflect the brand identity.
• Focus on user experience (UX) and user interface (UI) design principles.
• Balance aesthetics (looks good) with usability.
Web Design Issues
5. Page Layout and Linking
• Layout should be intuitive and easy to navigate.
• Use clear headings, sections, and spacing.
• Internal linking helps users and improves SEO.
• Use breadcrumb navigation, header/footer menus, and call-to-action buttons.

Breadcrumb = Home > Products > Electronics > Headphones

6. Sitemap
• A sitemap lists all pages of the website.
➢ XML sitemap for search engines.
➢ HTML sitemap for users.
• Helps in SEO and crawling by search engines like Google.
Sitemaps

A sitemap is a crucial component of effective web design and SEO strategy. It serves as a blueprint of
your website, detailing how the pages are structured and interlinked. Sitemaps come in two primary
types: XML sitemaps and HTML sitemaps. Each serves a different purpose and audience.

Sitemaps are vital tools for both search engines and users, aiding in efficient navigation and indexing of
your website. XML sitemaps improve how search engines crawl your site, while HTML sitemaps enhance
user experience. By regularly maintaining and optimizing these sitemaps, you can significantly improve
your website's accessibility and search engine visibility.
Types of Sitemaps
1. XML Sitemap:

1. Purpose: Primarily designed for search engines to help them crawl and index your website more
effectively.
2. Content: Lists the URLs of all pages on your website, along with additional metadata like the last
modified date, change frequency, and priority.
3. Format: Written in XML format.
4. Submission: Typically submitted to search engines through tools like Google Search Console.

2. HTML Sitemap:

1. Purpose: Designed for human visitors to help them navigate your website more easily.
2. Content: Presents a hierarchical view of your website’s pages, similar to a table of contents.
3. Format: Written in HTML and accessible from the website.
4. Location: Often linked in the footer or within the navigation menu for easy access.
Benefits of Sitemaps
Improved Crawling and Indexing: XML sitemaps help search engines find and index all the important pages
on your website, including those that might be difficult to discover through normal crawling.

Enhanced Navigation: HTML sitemaps improve user experience by providing a clear and structured overview
of your site’s content, making it easier for users to find what they’re looking for.

SEO Advantages: Both types of sitemaps contribute to better SEO. XML sitemaps help ensure all your pages
are indexed, while HTML sitemaps can reduce bounce rates by improving site navigation.
XML Sitemap

<?xml version="1.0" encoding="UTF-8"?>


<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/</loc>
<lastmod>2025-04-24</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.example.com/about</loc>
<lastmod>2025-04-20</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
HTML Sitemap
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML Sitemap</title>
</head>
<body>
<h1>Sitemap</h1>
<ul>
<li><a href="https://www.example.com/">Home</a></li>
<li><a href="https://www.example.com/about">About Us</a></li>
<li><a href="https://www.example.com/services">Services</a>
<ul>
<li><a href="https://www.example.com/services/design">Design</a></li>
<li><a href="https://www.example.com/services/development">Development</a></li>
</ul>
</li>
<li><a href="https://www.example.com/contact">Contact</a></li>
</ul>
</body>
</html>
Website Planning

Key steps to plan your website:

• Define Goals and Purpose

• Content Strategy

• User Experience (UX) Design

• Choose Technology Stack


Content Management System (CMS)

A CMS is a software application that allows users to create, manage, and modify
digital content on a website without needing specialized technical knowledge.

Popular CMS Platforms:

• WordPress
• Joomla
• Drupal
• Shopify
Content Management System (CMS)

• Choose a Domain Name

• Select a Web Hosting Provider

• Test the Website

• Publish the Website

• Regular Maintenance
Introduction to MongoDB

MongoDB is a NoSQL database used to store large amounts of unstructured data.


Unlike traditional SQL databases that store data in tables and rows, MongoDB stores
data in documents (in a format called BSON - Binary JSON) that allows for flexible,
dynamic schemas.
Key Features of MongoDB

1. Document-Oriented Storage
Data is stored in documents (similar to JSON), making it easy to represent complex
data structures.
2. Scalable
MongoDB supports horizontal scaling by sharing data across multiple servers. This
helps manage large volumes of data efficiently.
3. Flexible Schema
Unlike SQL databases, MongoDB doesn’t require a fixed schema for its collections. You
can store different fields in different documents.
4. Indexing and Querying
MongoDB supports various types of indexes (e.g., text, geospatial) and allows for fast
querying of large datasets.
5. Aggregation
MongoDB provides an aggregation framework for performing data transformations and
computations (e.g., counting, grouping, sorting).
How MongoDB Works :

1. Database: The highest level of the organization in MongoDB.

2. Collection: Equivalent to a table in a SQL database. A collection contains


documents.

3. Document: A record in the collection, stored in BSON format. It is a set


of key-value pairs.
MongoDB Document

{
"_id": ObjectId("624e1b2f832d7f9f7b39b60a"),
"name": "John Doe",
"email": "[email protected]",
"age": 30,
"address": {
"street": "123 Main St",
"city": "Dehradun",
"state": "Uttarakhand",
"zip": "248001"
},
"interests": ["Reading", "Cycling", "Traveling"],
"isActive": true,
"joinedAt": ISODate("2021-04-15T10:00:00Z")
}
The HTTP (HyperText Transfer Protocol) protocol operates on a request-response model, where a
client (usually a web browser) sends a request to a server, and the server responds with the appropriate data.
Here’s a detailed breakdown of this process:

HTTP Request
An HTTP request is sent by the client to request a resource from the server. The request consists of several
components:

1. Request Line: This includes the method (e.g., GET, POST), the URL of the requested resource, and the HTTP
version.
- Example: GET /index.html HTTP/1.1

2. Headers: These provide additional information about the request, such as the type of content the client can
accept, the user agent (browser type), and any cookies.
- Example:

Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
Accept: text/html

3. Body: This is optional and typically used with methods like POST to send data to the server (e.g., form data).
HTTP Response
An HTTP response is sent by the server in reply to an HTTP request. The response consists of several
components:

1. Status Line: This includes the HTTP version, a status code, and a reason phrase.
- Example: HTTP/1.1 200 OK

2. Headers: These provide additional information about the response, such as the content type, length, and
any cookies.
- Example:

Content-Type: text/html
Content-Length: 138

3. Body: This contains the requested resource (e.g., an HTML document, image, or JSON data). The body is
optional and depends on the type of response.
Example Interaction
Client Request:
GET /index.html HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
Accept: text/html
In this example, the client requests the
Server Response: `/index.html` page from the server, and
HTTP/1.1 200 OK the server responds with an HTML
Content-Type: text/html document containing the content of the
Content-Length: 138 page.

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

You might also like