WT Unit1
WT Unit1
Unit 1 2024-25
B.TECH.(CSIT) SEMESTER -V
1. Introduction: Introduction and Web Development Strategies
2. History of Web and Internet, Protocols Governing Web, Writing Web Projects, Connecting to
Internet.
4. Web Page Designing: HTML: List, Table, Images, Frames, forms, XML: Document type
definition (DTD)
5. XML schemes, Object Models, presenting and using XML, Using XML Processors: DOM and
SAX.
Faculty
Dr. Aadarsh Malviya
(Associate Professor Department of CSE)
Affiliated to
1
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
2
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
The Rise of Web 3.0 (2020s): Web 3.0 (often called the decentralized web) is the next evolutionary stage
of the web. It emphasizes decentralization, user empowerment, and blockchain technology, where users
control their data, and applications run on decentralized networks rather than centralized servers.
5. Key Technological Developments
HTML and CSS: HTML, invented by Tim Berners-Lee, is the backbone of web pages, structuring
content. CSS (Cascading Style Sheets), introduced in the 1990s, helped developers style and layout web
content.
JavaScript (1995): Developed by Netscape, JavaScript enabled dynamic and interactive elements within
web browsers, forming the basis for modern web applications.
Web Standards: Organizations like the W3C (World Wide Web Consortium) were established to create
web standards to ensure compatibility and accessibility across platforms and devices.
6. Future of the Web and Internet
Artificial Intelligence (AI) and the Semantic Web: Future versions of the web may involve AI-driven
content and the "semantic web," where machines understand the meaning of content to provide more
intelligent search and interaction.
Internet of Things (IoT): The IoT is connecting everyday devices to the internet, creating a network of
smart devices that communicate with each other to improve user experiences.
5G and Edge Computing: The rollout of 5G networks and advancements in edge computing will
increase the speed and responsiveness of web-based applications, making immersive technologies like
augmented reality (AR) and virtual reality (VR) more mainstream.
3
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
o TCP ensures reliable communication by making sure that packets arrive at their destination in the
correct order. If packets are lost, TCP requests their retransmission.
o It guarantees data integrity and ensures that large pieces of data, like a webpage or video, are
accurately reconstructed.
IP (Internet Protocol):
o IP handles addressing and routing the packets of data from the sender to the receiver.
o Each device on the internet has a unique IP address (e.g., IPv4: 192.168.1.1 or IPv6:
2001:0db8:85a3::8a2e:0370:7334), which is used to locate and communicate with that device.
Together (TCP/IP):
o TCP/IP forms the core communication protocol of the internet, allowing web data (HTTP,
HTTPS) to move between servers and browsers across different networks.
4
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
o SMTP is a protocol used for sending emails across the internet. It defines how emails are sent
from the sender’s mail server to the recipient’s mail server.
Related Protocols:
o IMAP (Internet Message Access Protocol) and POP3 (Post Office Protocol) are used for
retrieving and managing emails from mail servers.
o SMTP is used for outgoing mail, while IMAP and POP3 handle incoming mail.
7. WebSocket Protocol
What it Does:
o WebSocket is a protocol that provides full-duplex communication channels over a single TCP
connection, enabling real-time data exchange between a client and server.
o WebSocket is commonly used in web applications that require live updates, such as chat
applications, gaming platforms, and stock market tickers.
Why it’s Important:
o Unlike HTTP, which is request-response-based, WebSocket allows both the client and server to
send messages to each other independently, resulting in faster communication and real-time
interactivity.
5
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
o Gmail (Google): A free email service offering advanced features like spam filtering, integration
with Google services, and a large amount of storage.
o Outlook (Microsoft): Another major email service, often used in business environments, with
integration into Microsoft Office and productivity tools.
o Yahoo Mail: One of the early email providers, offering both free and premium versions.
Key Tools:
o SMTP (Simple Mail Transfer Protocol): Used to send emails.
o IMAP (Internet Message Access Protocol) & POP3 (Post Office Protocol): Used to retrieve
and manage incoming emails.
2. Web Browsing
What it Is: Web browsing allows users to access information on the World Wide Web. Through
browsers, users can visit websites, read content, watch videos, or perform transactions online.
Popular Web Browsers:
o Google Chrome: One of the fastest and most popular web browsers, known for its simplicity and
speed.
o Mozilla Firefox: A free and open-source web browser focused on user privacy and customizable
features.
o Microsoft Edge: The default web browser on Windows, known for its integration with Microsoft
services and security features.
o Safari: Apple's browser, optimized for macOS and iOS.
Key Tools:
o Search Engines: Tools like Google, Bing, and DuckDuckGo allow users to search for information
by typing queries into the browser.
o Web Extensions: Browser extensions like ad blockers, password managers, and VPNs enhance
browsing experiences by adding extra functionality.
3. Search Engines
What they Are: Search engines help users find specific information on the internet by indexing web
pages and providing results based on keywords.
Popular Search Engines:
o Google: The most widely used search engine globally, offering results based on complex
algorithms and user data.
o Bing: Microsoft’s search engine, often integrated with Microsoft services and products.
o DuckDuckGo: A privacy-focused search engine that doesn’t track user data.
Key Tools:
o Search Algorithms: Search engines use algorithms to determine the relevance of web pages and
rank them accordingly.
o SEO (Search Engine Optimization): A strategy used by web developers to ensure their content
ranks high on search engines.
6
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
Key Tools:
o Cloud Storage: A tool for storing data remotely, making it accessible from anywhere with an
internet connection.
o File Transfer Protocol (FTP): A protocol used to transfer files between a client and a server on a
network.
7. E-Commerce Platforms
What it Is: E-commerce platforms allow users to buy and sell products and services online, facilitating
digital transactions through secure payment gateways.
Popular Platforms:
o Amazon: One of the largest e-commerce platforms globally, selling everything from electronics to
groceries.
o eBay: An online marketplace that allows users to buy, sell, and auction products.
o Shopify: A platform enabling businesses to create online stores and sell products directly to
consumers.
o Alibaba: A major global marketplace specializing in wholesale trade and business-to-business
transactions.
Key Tools:
o Shopping Carts: Tools that allow customers to collect and review items before purchasing.
7
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
o Payment Gateways: Services like PayPal, Stripe, and Square process payments securely between
buyers and sellers.
8. Streaming Media
What it Is: Streaming services deliver media (audio, video, music) over the internet in real time, without
requiring users to download the entire file first.
Popular Streaming Platforms:
o YouTube: The largest video-sharing platform where users can upload, view, and share videos.
o Netflix: A subscription-based streaming service offering movies and TV shows on-demand.
o Spotify: A music streaming service offering access to millions of songs and podcasts.
o Twitch: A live-streaming platform, primarily focused on video gaming, where users can broadcast
or watch live streams.
Key Tools:
o CDNs (Content Delivery Networks): Networks of servers that cache and deliver content more
efficiently to users based on their location.
o Adaptive Streaming: A technology that adjusts the quality of a video or audio stream in real-time
based on the user’s bandwidth.
9. Cloud Computing
What it Is: Cloud computing services provide users with access to computing resources (storage,
processing power, databases) over the internet. This eliminates the need for physical hardware on the
user’s end.
Popular Cloud Computing Platforms:
o Amazon Web Services (AWS): Offers a wide range of cloud services, including storage,
computing power, databases, and machine learning.
o Google Cloud: Google’s cloud platform, providing infrastructure, analytics, and AI services.
o Microsoft Azure: A cloud platform offering solutions for computing, storage, and networking,
integrated with Microsoft products.
Key Tools:
o Virtualization: Allows multiple virtual machines to run on a single physical machine, optimizing
resource usage.
o SaaS (Software as a Service): A cloud service model where software applications are delivered
over the internet, such as Google Workspace or Microsoft 365.
8
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
9
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
10
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
html
<img src="image.jpg" alt="Description of image" width="300" height="200">
4. HTML Frames (Deprecated)
Frames used to be created using the <frameset> and <frame> tags, but they are deprecated and no longer used in
modern HTML5. Instead, <iframe> is used to embed external content like web pages.
<iframe src="https://www.example.com" width="600" height="400"></iframe>
5. HTML Forms
Forms allow user input and submission, with the main tags being <form>, <input>, <textarea>, <select>, etc.
<label for="email">Email:</label>
<input type="email" id="email" name="email">
<label for="message">Message:</label>
<textarea id="message" name="message"></textarea>
XML
What is XML?
XML stands for Extensible Markup Language. It is a markup language designed to store and transport data in a
structured, human-readable, and machine-readable format. XML is a simplified form of SGML (Standard
Generalized Markup Language) and was developed by the W3C (World Wide Web Consortium).
Key Characteristics of XML:
Text-Based: XML documents are plain text files.
Self-Descriptive: XML tags are user-defined and describe the data they enclose, making it easy to
understand the content.
Hierarchical Structure: XML organizes data in a tree-like structure, with elements nested inside one
another.
Extensible: Unlike HTML, XML allows the creation of custom tags suited to the specific needs of the data
being described.
Platform-Independent: XML is both human-readable and machine-readable, allowing easy exchange of
information across different platforms and systems.
Example of XML:
xml
11
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
In this example:
<note> is the root element, and it contains other child elements like <to>, <from>, etc.
XML does not predefine any tags, allowing users to create meaningful tags that describe their data.
Advantages of XML:
Readable by Both Humans and Machines: XML is in plain text, making it readable by both developers
and software.
Extensible and Flexible: XML allows custom tags, providing flexibility to define and represent any kind
of data.
12
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
Platform-Independent: XML can be used across different systems and applications without compatibility
issues.
Well-Supported: XML is supported by a wide range of tools, programming languages, and technologies.
Disadvantages of XML:
Verbose: XML can become large and hard to manage due to its verbose tag structure.
No Native Data Types: Unlike JSON or binary formats, XML does not have native support for data types
(like integers, floats, etc.) and relies on additional definitions like XML Schema for that.
Conclusion:
XML is a versatile and widely used language for structuring, storing, and exchanging data. It is especially useful in
environments where platform independence, extensibility, and self-describing data are important. Despite newer
formats like JSON gaining popularity for web applications, XML remains crucial in many industries and legacy
systems.
13
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
xml
2. XML Schema
XML Schema is a more powerful and flexible way to define the structure and data types of XML documents
compared to DTD. It is defined in XML Schema Definition (XSD), and it supports data types, namespaces, and
constraints on the content of XML documents.
An XML Schema describes:
Elements and their data types (e.g., string, integer).
Attributes.
Hierarchical relationships.
Constraints on data.
Example of XML Schema (XSD)
Here’s an XML document with an associated schema definition:
14
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
XML Document:
xml
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
In this schema:
xs:element defines the elements allowed (to, from, heading, body).
xs:string indicates that each element is of string data type.
The structure of the <note> element is defined as a sequence of these four elements.
Summary:
DTD is an older way of defining the structure of an XML document. It is simple but lacks advanced
features like data types and namespaces.
XML Schema (XSD) is more powerful and provides extensive support for data types, constraints, and
namespaces, making it more suitable for complex XML documents.
15
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
// Access elements
var toElement = xmlDoc.getElementsByTagName("to")[0].childNodes[0].nodeValue;
console.log(toElement); // Output: Tove
16
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
Performance: Since it holds the entire document in memory, it can be slow when working with very large
XML files.
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
@Override
public void startElement(String uri, String localName, String qName, Attributes attributes) throws
SAXException {
if (qName.equalsIgnoreCase("to")) {
System.out.println("Start element: to");
}
}
@Override
public void characters(char[] ch, int start, int length) throws SAXException {
String content = new String(ch, start, length);
System.out.println("Element content: " + content);
}
@Override
public void endElement(String uri, String localName, String qName) throws SAXException {
if (qName.equalsIgnoreCase("to")) {
System.out.println("End element: to");
}
}
}
In this example, the SAX parser triggers events when it encounters the start and end of the <to> element, and when
it reads the character data inside the element.
Pros:
Efficiency: SAX is very memory-efficient and suitable for processing large XML files.
Event-Driven: SAX allows for real-time processing of the XML as it is being read.
Fast: Since it doesn’t require the entire document to be loaded into memory, SAX is faster for large
17
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
datasets.
Cons:
Complexity: SAX can be harder to work with because it is event-driven and doesn’t allow random access
to the document.
Read-Only: SAX is mainly for parsing XML; it doesn’t allow for easy modification of the XML content.
// Sample XML
<catalog>
<book id="bk101">
<title>XML Developer's Guide</title>
</book>
</catalog>
18
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
19
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
20
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
Random Access: You can access any node or element in the document without reading the entire XML
sequentially.
Tree Structure: The hierarchical tree structure makes it easy to visualize and navigate XML elements.
Full Control: DOM allows you to create, read, update, and delete nodes within the XML document.
Cons of DOM:
Memory Intensive: Since the entire document is loaded into memory, DOM is inefficient when dealing
with very large XML documents.
Slower for Large Files: For large files, DOM parsing can be slower due to memory and performance
overhead.
21
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
@Override
public void startElement(String uri, String localName, String qName, Attributes attributes) throws
SAXException {
if (qName.equalsIgnoreCase("title")) {
isTitle = true;
} else if (qName.equalsIgnoreCase("author")) {
isAuthor = true;
}
}
@Override
public void characters(char[] ch, int start, int length) throws SAXException {
if (isTitle) {
System.out.println("Title: " + new String(ch, start, length));
isTitle = false;
}
if (isAuthor) {
System.out.println("Author: " + new String(ch, start, length));
isAuthor = false;
}
}
};
22
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
Conclusion:
DOM is ideal for small to medium XML documents where you need random access and the ability to
modify data.
SAX is preferred for large XML documents and when memory efficiency is crucial, but it is typically used
for read-only tasks due to its sequential nature.
23
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
What is HTTP?
The Hypertext Transfer Protocol (HTTP) is designed to enable communications between clients and servers.
HTTP works as a request-response protocol between a client and server.
Example: A client (browser) sends an HTTP request to the server; then the server returns a response to the client.
The response contains status information about the request and may also contain the requested content.
HTTP Methods
GET
POST
PUT
HEAD
DELETE
PATCH
OPTIONS
CONNECT
TRACE
The two most common HTTP methods are: GET and POST.
name1=value1&name2=value2
Some notes on POST requests:
POST requests are never cached
POST requests do not remain in the browser history
POST requests cannot be bookmarked
POST requests have no restrictions on data length
24
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
25
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
What is Internet?
The Internet is a global network of billions of computers and other electronic devices. With the Internet, it's possible
to access almost any information, communicate with anyone else in the world, and do much more. electronic
devices. With the Internet, it's possible to access almost any information, communicate with anyone else in the
world, and do much more. Internet is global communication accessed through the Web. The Internet is a global
system of interconnected computer networks that use the standard Internet Protocol Suite (TCP/IP) to serve billions
of users worldwide.
What is Interanet?
Intranet is shared content accessed by members within a single organization. An intranet is a private computer
network that uses Internet Protocol technologies to securely share any part of an organization's information or
operational systems within that organization.
What is Extranet?
Extranet is shared content accessed by groups through cross-enterprise boundaries. An extranet is a private network
that uses Internet protocols, network connectivity. An extranet can be viewed as part of a company's intranet that is
extended to users outside the company, usually via the Internet.
Comparative Study
The Internet, extranets, and intranets all rely on the same TCP/IP technologies. However, they are different in terms
of the levels of access they allow to various users inside and outside the organization and the size of the network.
An intranet allows for restricted access to only members of an organization.
An extranet expands that access by allowing non-members such as suppliers and customers to use company
resources. The difference between the Internet and extranets is that while the extranet allows limited access to non-
members of an organization, the Internet generally allows everyone to access all network resources.
How does internet works?
Internet is a global network of physical cables, which can include copper telephone wires, TV cables, and fiber optic
cables. Even wireless connections like Wi-Fi and 3G/4G rely on these physical cables to access the Internet. When
you visit a website, your computer sends a request over these wires to a server. A server is where websites are
stored, and it works a lot like your computer's hard drive. Once the request arrives, the server retrieves the website
and sends the correct data back to your computer.
26
Web Technology (BCS502) 2024-25 (Odd Semester) [ Dr. Aadarsh Malviya DGI]
27