internet programming Unit I
internet programming Unit I
Internet Programming
Evolution
The concept of Internet was originated in 1969 and has undergone several technological & Infrastructural
changes as discussed below:
• The origin of Internet devised from the concept of Advanced Research Project Agency Network
(ARPANET).
• ARPANET was developed by United States Department of Defense.
• Basic purpose of ARPANET was to provide communication among the various bodies of
government.
• Initially, there were only four nodes, formally called Hosts.
• In 1972, the ARPANET spread over the globe with 23 nodes located at different countries and thus
became known as Internet.
• By the time, with invention of new technologies such as TCP/IP protocols, DNS, WWW, browsers,
scripting languages, etc. Internet provided a medium to publish and access information over the
web.
Dr. AMIT SINGLA HOD (Computer Science) Seth G. L. Bihani S. D. PG College
Advantages
Internet covers almost every aspect of life, one can think of. Here, we will discuss some of the advantages
of Internet:
• Internet allows us to communicate with the people sitting at remote locations. There are various apps
available on the wed that uses Internet as a medium for communication. One can find various social
networking sites such as:
o Facebook
o Twitter
o Yahoo
• One can surf for any kind of information over the internet. Information regarding various topics such
as Technology, Health & Science, Social Studies, Geographical Information, Information
Technology, Products etc can be surfed with help of a search engine.
• Apart from communication and source of information, internet also serves a medium for
entertainment. Following are the various modes for entertainment over internet.
o Online Television
o Online Games
o Songs
o Videos
o Social Networking Apps
• Internet allows us to use many services like:
o Internet Banking
o Matrimonial Services
o Online Shopping
o Online Ticket Booking
o Online Bill Payment
o Data Sharing
o E-mail
• Internet provides concept of electronic commerce, that allows the business deals to be conducted on
electronic systems
Disadvantages
However, Internet has proved to be a powerful source of information in almost every field, yet there exists
many disadvantages discussed below:
• There are always chances to loose personal information such as name, address, credit card number.
Therefore, one should be very careful while sharing such information.
Applications
The internet is treated as one of the biggest invention. People of all ages, colors and countries freely share
ideas, data, opinions and products. It has a large number of applications:
1. Communication: Computer users around the world use the email service on internet to
communicate with each other. Pictures, documents and other files are sent as email attachments.
Email can be sent to multiple email addresses at the same time.
2. Online Shopping: The internet has also facilitated the introduction of a new market concept
consisting of virtual shops. They provide information about products or services for sale through
www servers. Using the internet services customers can submit specific product queries and request
specific sales quotes. For example, amazon.com is a www based bookshop on the internet where
information of all types of national and international books can be found and books can be ordered
online.
3. Job Search: Nowadays, many people search for their jobs online as it is quicker and easy to
get the information regarding the availability of jobs in various sectors. People can publish resume
online for prospective job. Some of the web sites providing these services are naukri.com,
monster.com, summerjob.com, etc.
4. Travel: Using internet, people can plan their vacations. Internet can be used for
booking hotels, flights, buses, holiday tours, etc. One can use internet to gather information about
various tourist places. Some of the websites providing these services are goibibo.com,
makemytrip.com, olacabs.com, etc.
5. Research: A large number of people are using internet for research purpose. Students and
writers are looking for information, business people are using it for marketing information,
researchers and scientists are downloading up-to-date research results from around the world. The
internet acts as a library for today as well as for the future.
6. Education and Training: Colleges and other organizations are offering online courses over the
internet. Lectures and study material are available online. Virtual classroom are designed for students
at far off places.
7. Health and Medicine: Internet provides knowledge and information in the field of health and
medicine. People can get information about various diseases and can also receive advice and help
from the doctors. Some of the websites providing these services are telemedicine.com,
earthmed.com, etc.
8. Stock Market Updates: People can sell or buy shares while sitting on the computer through
internet. Several websites provides the information about the proper way of investment so that the
money may be invested at a good place. The websites like ndtvprofit.com, moneycontrol.com, etc.
Dr. AMIT SINGLA HOD (Computer Science) Seth G. L. Bihani S. D. PG College
Basic Terminologies
Web Browser
A browser is a software program that is used to explore, retrieve, and display the information available on
the World Wide Web. This information may be in the form of pictures, web pages, videos, and other files
that all are connected via hyperlinks and categorized with the help of URLs (Uniform Resource
Identifiers). The most commonly used web browsers are Internet-Explorer, Firefox, Google Chrome, etc.
Webpage
A webpage is an electronic document available on the World Wide Web. These webpages are stored on the
web servers and are identified by a unique address. A webpage generally contains a large amount of
information which may include text, graphics, audio, video as well as links to other webpages. The
webpagesa are generally written in Hyper Text Markup Language (HTML).
Web Site
A web site is a collection of linked webpages that are stored on a web server. It is usually maintained by a
company, organization or an individual. A website contains a home page and several linked pages. For
example, www.yahoo.com is a website that contains a large number of linked webpages related to various
topics.
Web Servers
A web server is a computer that runs websites. It's a computer program that distributes web pages as they
are requisitioned. The basic objective of the web server is to store, process and deliver web pages to the
users. This intercommunication is done using Hypertext Transfer Protocol (HTTP). Types of web servers
are:
• Apache HTTP Server. This is the most popular web server in the world developed by the Apache
Software Foundation.
• Internet Information Services. The Internet Information Server (IIS) is a high performance Web
Server from Microsoft.
• Sun Java System Web Server.
• Jigsaw Server.
A URL is a type of uniform resource identifier and is address of a resource on the World Wide Web and the
protocol used to access it. It is used to indicate the location of a web resource to access the web
pages. A URL (Uniform Resource Locator) contains the information, which is as follows:
For Example:
http://www.yahoo.com
Here, the first part of the URL specifies the protocol that will be used to retrieve the specific file. The
various protocols that can be used are http, ftp, etc.
The second part of the URL specifies the domain name of the server on which the file resides. The domain is
prefixed with :// i.e. colon and two slashes.
URL can also contain a port number of the server which is optional. Web servers normally run on port
number 80.
IP Address
IP address is a unique logical address assigned to a machine over the network. An IP address exhibits the
following properties:
• IP address is the unique address assigned to each host present on Internet.
• IP address is 32 bits (4 bytes) long.
• IP address consists of two components: network component and host component.
• Each of the 4 bytes is represented by a number from 0 to 255, separated with dots. For example
137.170.4.124
DNS
The Domain Name System (DNS) is the Internet's system for mapping alphabetic names to numeric Internet
Protocol (IP) addresses like a phone book maps a person's name to a phone number. For example, when a
Web address (URL) is typed into a browser, a DNS query is made to get an IP address of a Web server
associated with that name.
The above figure shows the basic model of the FTP. The FTP client has three components:
the user interface, control process, and data transfer process. The server has two components:
the server control process and the server data transfer process.
Advantages of FTP:
o Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest ways to
transfer the files from one computer to another computer.
o Efficient: It is more efficient as we do not need to complete all the operations to get the
entire file.
o Security: To access the FTP server, we need to login with the username and password.
Therefore, we can say that FTP is more secure.
o Back & forth movement: FTP allows us to transfer the files back and forth. Suppose you are
a manager of the company, you send some information to all the employees, and they all send
information back on the same server.
(B) HTTP (Hyper Text Transfer Protocol): HTTP is a communication protocol. It defines
mechanism for communication between browser and the web server. It is also called request and
response protocol because the communication between browser and server takes place in request
and response pairs. When a user want to retrieve a webpage, the web browser initiates the
communication by issuing a request and after receiving a request, the web server sends back a
response.
There are two types of HTTP messages, requests and responses, each with its own format
HTTP Request: The http request consists of a series of lines which contains request line, header
fields and optionally contents of the message.
Access providers
They provide access to internet through telephone lines, cable Wi-Fi or fiber optics.
Mailbox Provider
Such providers offer mailbox hosting services.
Dr. AMIT SINGLA HOD (Computer Science) Seth G. L. Bihani S. D. PG College
Hosting ISPs
Hosting ISPs offers e-mail, and other web hosting services such as virtual machines, clouds etc.
Virtual ISPs
Such ISPs offer internet access via other ISP services.
Free ISPs
Free ISPs do not charge for internet services.
Electronic-Mail (E-Mail)
Electronic mail or email is one of the most widely used Internet application. It allows a message to be sent
electronically among individuals connected to the internet or some other computer networks. It offers an
efficient, inexpensive and real time mean of distributing information among people.
Each user of email is assigned a unique name for his email account. This name is known as E-mail address.
Different users can send and receive messages according to the e-mail address.
E-mail is generally of the form
username@domainname
For example,
[email protected]
is an e-mail address where amitsingla70 is username and yahoo.com is domain name.
The following points should remember while using e-mail address
• The username and the domain name are separated by @ (at) symbol.
• E-mail addresses are not case sensitive.
• Spaces are not allowed in e-mail address.
• From
The From field indicates the sender’s address i.e. who sent the e-mail.
• Date
The Date field indicates the date when the e-mail was sent.
• To
The To field indicates the recipient’s address i.e. to whom the e-mail is sent.
• Subject
The Subject field indicates the purpose of e-mail. It should be precise and to the point.
• CC
CC stands for Carbon copy. It includes those recipient addresses who receive a copy of the e-mail
message.
• BCC
BCC stands for Black Carbon Copy. It is used when we do not want one or more of the recipients to
know that someone else was copied on the message.
Text
It represents the actual content of the message.
Signature
This is the final part of an e-mail message. It includes Name of Sender, Address, and Contact Number.
Advantages
E-mail has proved to be powerful and reliable medium of communication. Here are the benefits of E-mail:
• Reliable: Many of the mail systems notify the sender if e-mail message was undeliverable.
• Convenience: There is no requirement of stationary and stamps. One does not have to go to post
office.
• Speed: E-mail is very fast. However, the speed also depends upon the underlying network.
• Global: E-mail can be sent and received by a person sitting across the globe.
Disadvantages
Apart from several benefits of E-mail, there also exist some disadvantages as discussed below:
• Junk: Junk emails are undesirable and inappropriate emails. Junk emails are sometimes
referred to as spam.
• No Response: It may be frustrating when the recipient does not read the e-mail and respond on a
regular basis.
• SMTP: SMTP stands for Simple Mail Transfer Protocol. It was first proposed in 1982. It is
a standard protocol used for sending e-mail efficiently and reliably over the internet.
• POP: POP stands for Post Office Protocol. It is generally used to support a single client.
There are several versions of POP but the POP 3 is the current standard.
▪ POP is an application layer internet standard protocol.
▪ Since POP supports offline access to the messages, thus requires less internet usage
time.
▪ POP does not allow search facility.
▪ In order to access the message, it is necessary to download them.
▪ It allows only one mailbox to be created on server.
▪ POP commands are generally abbreviated into codes of three or four letters. Eg.
STAT.
Some of the POP commands are
▪ STAT - used to display number of messages currently in the mailbox.
▪ DELE - used to delete a message.
▪ QUIT - used to log off the session.
There are different types of mailing list which can be classified as follows
▪ Announcement lists and Discussion Lists: Announcement list is just like a newsletter in which
only the owner of the mailing list will send messages to the subscribed users. In discussion list, any
subscriber can post messages to the mailing list.
▪ Public Lists and Private Lists: In public list, anyone can subscribe to the list whereas in
private list if anyone wants to subscribe the list, then an approval is required from the owner of the
list.
For example, if user want to subscribe the Harry Potter list in gurus.com where name of the List Server is
Majordomo then user send an e-mail message to [email protected] (administrative address)
containing the text, subscribe harry potter in its body. User will then receive a message confirming its
subscription.
There are many List Servers available, each having its own set of commands for subscribing to the list.
Some of them are
There are many List Servers available, each having its own set of commands for unsubscribing to the list.
Some of them are