Web Application Notes Unit 1
Web Application Notes Unit 1
application development
Unit 1 –
1.The Internet
*The internet connects computers and people worldwide. It allows instant sharing of
information and ideas. Students depend on the internet for learning and research. The
internet supports communication by email and video calls. Shopping and banking are
easier online.
*The Internet is an increasingly important part of everyday life for people around the
world. But if you've never used the Internet before, all of this new information might feel a
bit confusing at first.
Throughout this tutorial, we'll try to answer some basic questions you may have about the
Internet and how it's used. When you're done, you'll have a good understanding of how the
Internet works, how to connect to the Internet, and how to browse the Web.
2.File Transfer
File transfer is the process of moving or copying a file from one computer or device to
another. It allows users to share documents, images, videos, or any data between systems,
either locally or over a network like the internet.
File Transfer:
Sender (Source Device): The system from which the file originates.
Receiver (Destination Device): The system to which the file is being sent.
1. Local Transfer (e.g., USB, Bluetooth)zRemote Transfer (e.g., FTP, HTTP, Cloud
Storage)
| | 2. Authenticate/Authorize | |
3. Transmission: File is broken into data packets and sent over the
network.
3.Telnet
Telnet is a network protocol that allows users to connect to remote computers over
the internet or a local network using a command-line interface. A Telnet web
application uses this protocol to access and manage servers or network devices
through a web interface.
other
he primary protocol for Usenet is the Network News Transfer Protocol
(NNTP). NNTP is used for reading, posting, and transferring Usenet articles
across the internet. It allows clients to connect to news servers, retrieve
articles, and post new content, as well as facilitating the transfer of articles
between servers to ensure efficient propagation of news across the network.
*On the Internet, Usenet is transported via the Network News Transfer Protocol
(NNTP) on Transmission Control Protocol (TCP) port 119 for standard, unprotected
connections, and on TCP port 563 for Secure Sockets Layer (SSL) encrypted
connections.
5.Gopher
Gopher is the fastest way to find and get text files from different computers on the
internet. It came before the World Wide Web that we use today. Gopher lets you
see a list of files and folders, almost like looking at files and folders on your own
computer. You could click on the items in the list to read text files from other
computers connected to the internet.
Gopher used very simple text without any pictures or formatting, unlike websites
today. It made it easy for beginners to access information online without needing
complex programs or skills.
How Does Gopher Work?
1. Client Interaction: computers: You use a program called a Gopher client on your
computer. This program will allow you to look at the files and folders on the other
computers that are connected to the internet.
2. Server Response: When you look at the different computers using the Gopher
client that computer (called a server) shows you the list of the files and folders you
can choose from.
3. Getting Files: When you click on the file or on a folder from the list your Gopher
client program onto your computer gets that file or the folder from the server
computer and shows it to you.
Key Features of Gopher
1. Simple Text: Gopher uses just plain text to show information, without any
pictures or fancy formatting. This makes it easy and fast to use.
2. Organized Menus: The files and folders on Gopher servers are organized like a
tree, with main folders and sub-folders. You can easily move through these folders
by selecting them from a menu.
3. Flexibility: While Gopher was mostly used for text files, it could also handle
other types of files like images or videos. It could even connect to other systems
that had different types of information.
Benefits of Gopher
1. Easy to Use: Gopher has a very simple and straightforward interface that uses
just plain text menus and navigation. This makes the Gopher incredibly easy to
understandable and useful even for the people with the little knowledge and
technical experience or computer knowledge.
2. Low Data Usage: Because Gopher only deals with the basic text content without
any images, videos, or complex formatting, it requires very little data to be
transferred over the internet connection. This makes the Gopher highly efficient
and ideal for use on slow or on the limited internet connections.
3. Focuses on Information: With its text-driven approach Gopher puts the
emphasis entirely on the actual content and information being presented, rather
than on visual elements or presentation. This allows users to quickly access and
consume the information they need without distractions.
Uses of Gopher
1. Sharing Files
Gopher was an ideal system for distributing and sharing text documents, files, and
other information in a structured, organized manner. Its hierarchical menu system
made it easy for users to navigate and access the content they needed from
different servers and locations.
2. Schools and Learning
Many educational institutions found the Gopher to be very useful tool for sharing
the course materials, lecture notes, and the other information with the students in
a simple and in accessible way. It is a text based nature made and easy for the
students to access and read the content, and instructors could use the Gopher for
the basic course management tasks.
3. Old Style Computing
With the rise of more advanced and visually rich technologies like the World Wide
Web, some computing enthusiasts and hobbyists have maintained an interest into
the retro or minimal computing experiences. For these individuals, using the
Gopher allows them to experience the more stripped down, text based way of
accessing and consuming the information online, similar to the early days of the
internet.
Internet Protocol
Why is Internet Protocol Important?
The Internet Protocol is a fundamental component of the Internet and computer
networks, responsible for delivering packets of data from the source host to the
destination host based on their IP addresses. It ensures that packets of data get to
the right destination from the source device.
Each device connected to a network is assigned an IP address, which serves as a
"home address" for the device, enabling other devices to locate and send messages
to it and providing the addressing and routing mechanisms the devices require for
their communications.
IP works in conjunction with the Internet Control Message Protocol (ICMP) to send
error messages and operational information (e.g., destination unreachable, echo
requests), which inform senders about issues in packet delivery. Unlike some
protocols, IP does not establish a connection before transmitting data, making it a
connectionless protocol that allows for more flexible and efficient data
transmission
L(IP)
HTTP (Hypertext Transfer Protocol)
HTTP stands for Hypertext Transfer Protocol, and it’s the system that allows
communication between web browsers (like Google Chrome or Firefox) and
websites. When you visit a website, your browser uses HTTP to send a request to
the server hosting that site, and the server sends back the data needed to display
the page.
Think of HTTP as a set of rules or a language used by your browser and the web
server to talk to each other, ensuring that websites load properly when you type in
their URLs.
How HTTP Works: Step-by-Step Process
Here’s how HTTP works when you visit a website:
1. Open Web Browser: First, you open your web browser and type a website URL
(e.g., www.example.com).
2. DNS Lookup: Your browser asks a Domain Name System (DNS) server to find out
the IP address associated with that URL. Think of this as looking up the phone
number of the website.
3. Send HTTP Request: Once the browser has the website’s IP address, it sends an
HTTP request to the server. The request asks the server for the resources
needed to display the page (like text, images, and videos).
4. Server Response: The server processes your request and sends back an
HTTP response. This response contains the requested resources (like HTML, CSS,
JavaScript) needed to load the page.
5. Rendering the Web Page: Your browser receives the data from the server and
displays the webpage on your screen.
After the page is loaded, the connection between the browser and server is closed.
If you request a new page, a new connection will be made.
What is HyperText?
HyperText is a way of structuring text so that it can contain links (called
"hyperlinks") to other documents or resources. When you click on a link in a
webpage, you are typically directed to another page or resource on the internet.
HTML (HyperText Markup Language) is used to create and format this type of text
for web pages.
HTTP is the protocol used to transfer this hypertext between the web browser and
the server, allowing you to click links and move around the web.
Understanding HTTP Request and Response
1. HTTP Request
An HTTP request is how your browser asks the server for something. It includes:
HTTP Version: The version of HTTP (like HTTP/1.1 or HTTP/2) being used.
URL: The specific address of the resource
(e.g., https://www.example.com/about).
HTTP Method: The type of action being requested (e.g., GET to retrieve
information or POST to send data).
HTTP Request Headers: Extra information about the request, like what kind of
browser you're using or what kind of content you’re expecting.
HTTP Request Body: In some cases, the request will include a body that contains
data (e.g., when you submit a form).
2. HTTP Response
An HTTP response is the server’s answer to your request. It includes:
HTTP Status Code: A number that tells you if the request was successful or not
(e.g., 200 OK means everything is fine, 404 Not Found means the requested
page doesn’t exist).
Response Headers: Information about the response, like what kind of data is
being sent (e.g., Content-Type: text/html means it’s an HTML page).
Response Body: The content that the server sends back (e.g., HTML code that
the browser will use to display the webpage).
HTTP is a protocol used for transferring data over the internet. It allows devices to communicate
with each other and exchange information in a standardized way.
1. Request-Response Model: HTTP uses a request-response model, where a client (e.g., web
browser) sends a request to a server, and the server responds with the requested data.
2. Stateless: HTTP is a stateless protocol, meaning that each request is independent and doesn't
retain any information from previous requests.
3. Flexible: HTTP can transfer various types of data, including text, images, audio, and video.
SMTP
Before diving deeper into the Model of SMTP System, it's important to understand
how SMTP is leveraged by service providers like SMTP.com in the real-world
scenario.
SMTP.com is a platform that caters to all your transaction, email relay and email
delivery needs at lla very affordable price. With decades of experience, SMTP.com is
regarded as the most trusted sender in the industry by ISPs. SMTP.com had been
trusted by over 100,000 customers over the years. SMTP.com is extremely intuitive
and easy to set up. It can be integrated seamlessly into your current business system.
If you need to migrate from another provider, SMTP.com make it effortless.
Features
Dedicated IP
Email API: Integrating SMTP.com with your business can be easy with the email
API feature. They have complete API documentation on their website that can
help you integrate your business in just 5 minutes.
24x7 Customer Support: The round-the-clock support is one of the best features
of SMTP.com. Support is available both on the website and also for paid
customers. 24x7, all human support is available for all customers across all plans.
No third party is involved and solutions are provided fast for easy implementation.
Online chat support is also available for those who are looking for more
information about SMTP.com
High Volume Sending Solutions: This newly launched feature is great for those
businesses who want to send more than 250 million emails a month. Customized
quotations and solutions are available.
Reputation Defender: This is an add-on feature that helps clean up your email
lists. It doesn’t need any integration but actively monitors your lists and provides
a report.
Pricing
SMTP.com offers affordable delivery services and caters to all kinds of businesses.
Their plans range from $25 to $500 and above. The best part about this platform is
that all the features are available in all the plans. The prices change only based on
the volume of emails sent monthly. Even with the lowest price pack, users can get
access to 24x7 customer support and all the SMTP tools. The Reputation Defender
for list cleaning is an add-on feature available for all users.
In the SMTP model user deals with the user agent (UA), for example, Microsoft
Outlook, Netscape, Mozilla, etc. To exchange the mail using TCP, MTA is used. The
user sending the mail doesn't have to deal with MTA as it is the responsibility of the
system admin to set up a local MTA. The MTA maintains a small queue of mail so
that it can schedule repeat delivery of mail in case the receiver is not available. The
MTA delivers the mail to the mailboxes and the information can later be downloaded
by the user agents.
Components of SMTP
Mail User Agent (MUA): It is a computer application that helps you in sending and
retrieving mail. It is responsible for creating email messages for transfer to
the mail transfer agent(MTA).
Mail Submission Agent (MSA): It is a computer program that receives mail from a
Mail User Agent(MUA) and interacts with the Mail Transfer Agent(MTA) for the
transfer of the mail.
Mail Transfer Agent (MTA): It is software that has the work to transfer mail from
one system to another with the help of SMTP.
Mail Delivery Agent (MDA): A mail Delivery agent or Local Delivery Agent is
basically a system that helps in the delivery of mail to the local system.
How does SMTP Work?
SMTP
1. Sending Email:
When a user wants to send an email, they use a User Agent (UA), like Outlook or
Gmail.
The email is handed over to the MTA, which is responsible for transferring the
email to the recipient’s mail server.
2. SMTP Client and Server:
Sender-SMTP (Client): The email sender’s MTA initiates the connection to the
recipient’s MTA (Receiver-SMTP).
Receiver-SMTP (Server): The receiving MTA listens for incoming connections and
receives the email from the sender-SMTP.
This communication happens over TCP port 25.
3. Relays and Gateways:
Relays: In some cases, the email may pass through several intermediate MTAs
before reaching the destination server. These MTAs act as relays.
Gateways: If the sending and receiving systems use different email protocols (e.g.,
SMTP and non-SMTP), an email gateway can convert the email to the appropriate
format for delivery.
4. Email Delivery:
The sender’s MTA sends the email to the receiver’s MTA, either directly or
through relays.
The MTA uses the SMTP protocol to transfer the message. Once it’s delivered to
the destination MTA, the email is placed in the recipient’s mailbox.
The recipient’s User Agent (UA) can then download the email.
Multipurpose Internet Mail Extension (MIME) Protocol
It was designed to make email messages more versatile and allow a wider variety of
content to be sent over email systems that traditionally only supported plain ASCII
text. MIME works by encoding the message content in a way that ensures it can be
transmitted over email protocols like SMTP (Simple Mail Transfer Protocol) without
loss of data or corruption. It breaks down the data into a format that's safe for
email transmission and provides metadata that helps identify the type of content.
Characteristics of MIME
Text Encoding: It allows email messages to contain characters from character
sets beyond ASCII (such as UTF-8).
Attachments: It enables emails to include multimedia content such as images,
video, and audio files as attachments.
Multipart Messages: It allows the message to be divided into multiple parts,
such as plain text and HTML content, or different types of media files.
Header Fields: It introduces special header fields that define how the content
should be interpreted (e.g., Content-Type, Content-Disposition).
MIME Structure
A typical MIME email consists of several parts:
MIME-Version: Specifies the version of MIME being used.
Content-Type: Describes the type of the content (e.g., text, image, audio).
Content-Transfer-Encoding: Specifies how the content is encoded for
transmission (e.g., base64, quoted-printable).
Content-Disposition: Defines whether the content is inline or as an attachment.
Working of MIME
Suppose a user wants to send an email through a user agent and it is in a non-ASCII
format so there is a MIME protocol that converts it into 7-bit NVT ASCII format.
The message is transferred through the e-mail system to the other side in the 7-bit
format now MIME protocol again converts it back into non-ASCII code and now the
user agent of the receiver side reads it and then information is finally read by the
receiver. MIME header is basically inserted at the beginning of any e-mail transfer.
The below diagram shows the working of the MIME protocol:
MIME working
Content-Type Header: MIME introduces the Content-Type header, which tells
the receiving email client what kind of data is being sent (e.g., text, image, audio).
Encoding: Non-textual data (e.g., images or files) is encoded into ASCII text
format using base64 or other encoding schemes. This ensures that binary data
can be sent over a text-based protocol.
Multipart Messages: If the message contains more than one part (such as a mix
of text and attachments), MIME can structure the email as multipart with a
boundary separator to distinguish between different parts.
MIME Header Key Fields and Their Functions
MIME-Version: Defines the version of the MIME protocol. Must be 1.0,
indicating the message uses MIME formatting.
Content-Type: Specifies the type of data in the message body, such
as text/plain, text/html, image/jpeg, or audio/mpeg.
Content-Transfer-Encoding: Indicates the encoding method used to transmit the
message safely such as 7bit, 8bit, base64, or quoted-printable.
Content-ID: Provides a unique identifier for each MIME part, useful for
referencing embedded objects like inline images.
Content-Description: Describes the nature of the content (e.g., “Image file”,
“Video clip”, or “PDF Document”) to understand what’s included.
Advantages of MIME
Supports Multiple Data Types : MIME enables the transfer of diverse data
formats such as text, audio, video, images, and application files in email
messages.
Multilingual Compatibility : Emails can be composed and read in various
languages including Hindi, French, Japanese, Chinese, and more.
Rich Formatting with HTML/CSS : Allows users to attach HTML and CSS, making
it possible to customize and stylize emails with enhanced formatting.
Handles Long Messages : Capable of delivering large or lengthy email content
without loss of data or formatting.
Unique Identification : Assigns a unique Content-ID to each message or
attachment, helpful in managing embedded media.
Disadvantages of MIME
Inconsistent Interpretation : The receiver’s system may not interpret MIME
types correctly, potentially affecting content display or behavior.
Increased Overhead : MIME adds extra headers and encoding, increasing the
size of the email and possibly slowing down transmission.
Complexity for Users : Most users are unfamiliar with MIME types, and multiple
media types can make the message harder to understand.
Compatibility Issues : Some older or limited systems may not support MIME,
leading to errors or loss of content during transmission.