BEC1102
Internet Programming
CHAPTER 1: Internet Technologies and Protocols
What is Internet?
• It is a world-wide global system of interconnected computer networks. A computer network is the
interconnection of many individual computers to exchange message. Network is a group of two or
more computer connected together.
• It uses the standard Internet Protocol TCP/IP. Every computer in internet is identified by a unique IP
address. IP Address is a unique set of numbers which identifies a computer location. Domain Name
server (DNS) is used to give name to the IP Address so that user can locate a computer by a name.
• For example, a DNS server will resolve a name http://www.google.com to a particular IP address to
uniquely identify the computer on which this website is hosted.
• Internet is accessible to every user all over the world. So, Internet is a network of networks.
2024 LECTURER: TAPIWA J MUDHARA 2
Advantage of Internet
• Information sharing
• Communication i.e. social networking
• Sharing of resource
2024 LECTURER: TAPIWA J MUDHARA 3
Disadvantage of Internet
• Threat to personal information
• Virus attack
• Spamming
• Cyber crime
2024 LECTURER: TAPIWA J MUDHARA 4
Terminology
Learning about the Internet can be a bit confusing at first, but it becomes a lot simpler if you can become
familiar with some of the terminology used when talking about the Internet.
1. On-line - You may sometimes hear people talk about “being on-line”. This is just another way of saying
that they are using the Internet.
2. World-Wide-Web (WWW) - Tim Berners-Lee, a physicist in Switzerland, invented the World Wide Web
in 1992 as a way to organize and access information on the Internet.
3. Web browser - A web browser is a program that runs on users' computers and allows them to view
and interact with the web pages on the World Wide Web. The most common web browsers are called
Internet Explorer and Google Chrome.
4. Webpage - Webpage is a single document that may contain text, graphics, and icon. They are
created using HTML.
2024 LECTURER: TAPIWA J MUDHARA 5
…Cont.
5. Web site - It is a group of well-structured and interlinked webpages.
6. Hypertext - is a text document that contains links to other text document. It allows a user to move from
one web page to another by using a mouse to click on special hypertext links.
• For example, a user viewing web pages that describe airplanes might encounter a link to jet engines
from one of those pages. By clicking on that link, the user automatically jumps to a page that describes
jet engines.
7. Web server - A web server is a computer that stores a web site, and is responsible for checking
requests for viewing that web site. Client computers send requests for particular URLs to the web
server, which then finds the appropriate web page, and sends it back to the client computer. A web
server on the Internet must have a permanent Internet connection, so that whenever a client computer
requests a URL, the web server can respond straight away.
2024 LECTURER: TAPIWA J MUDHARA 6
…Cont.
8. Uniform Resource Locator (URL) - To visit a Web site, users type the URL, which is the site's address,
into the web browser. An example of a URL is www.google.com. A complete URL is generally made up
of three components: the protocol, the site name, and the absolute path to the document or resource
as shown in the figure below:
2024 LECTURER: TAPIWA J MUDHARA 7
…Cont.
9. Internet Service Provider (ISP) - A company that provides Internet connections to customers.
10.Protocol - It is a set of rules that govern the communication.
11.Hypertext Transfer Protocol (HTTP/HTTPS) - It is a communications 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. Simply, it is the means by which computers on the WWW
communicate.
• HTTPS is the secure version of HTTP. It is used on web sites where sensitive information such as
bank details is exchanged.
2024 LECTURER: TAPIWA J MUDHARA 8
…Cont.
12.Hypertext Markup Language (HTML) - It is the language used to write web pages on the WWW.
13.Extensible Markup Language (XML) - It is an alternative language for writing web pages. Whereas
HTML pages describe the format of the data’s presentation, pages written in XML describe only how the
data is structured.
• XML provides a standard format for the movement of data in and between applications.
• The data in an XML file usually requires some other application to interpret the data and display it in
a useful format.
14.World Wide Web Consortium (W3C) - It is a group of experts who meet regularly to develop
common protocols for the evolution of the WWW. The W3C agrees on standards for HTML, XML and
other web technologies, and for how web browsers should interpret them.
2024 LECTURER: TAPIWA J MUDHARA 9
Web development tools
A number of tools exist for use by web authors (i.e. people who write web sites).
1. Text Editor
Is a computer program that allows users to create and modify documents, such as plain text files,
configuration files, documentation, and programming language source code. For example Notepad.
• HTML/XML: HTML and XML are the two main languages used for writing web pages. Web authors can
use a simple text editor such as Notepad to enter the HTML/XML commands. The final page can then be
viewed using a web browser.
• NB: DOWNLOAD NOTEPAD++ ( FOR TUTORIAL 1) 👉 https://notepad-plus-
plus.org/downloads/v8.6.9/
2024 LECTURER: TAPIWA J MUDHARA 10
Web development tools
2. Databases
Is responsible for storing, managing, and retrieving data. They allow web applications to persist data such
as user information, content, settings, and more. There are several types of databases, including relational
databases, NoSQL databases, and in-memory databases. This section will focus on relational databases,
particularly MySQL, and the tools WampServer and XAMPP that facilitate their use in development
environments.
• WampServer (Windows, Apache, MySQL, PHP) : is a Windows-based web development environment.
It allows developers to create web applications with Apache2, PHP, and a MySQL database. It also
includes tools like phpMyAdmin to manage MySQL databases easily.
• XAMPP (Cross-Platform, Apache, MySQL, PHP, Perl) : is a more versatile solution that works on
Windows, Linux, and macOS. It bundles Apache, MySQL (MariaDB in recent versions), PHP, and Perl.
2024 LECTURER: TAPIWA J MUDHARA 11
Client-server architecture
The data processing is split into distinct parts. A part is either requester (client) or provider (server). The
client sends during the data processing one or more requests to the servers to perform specified tasks.
The server part provides services for the clients.
2024 LECTURER: TAPIWA J MUDHARA 12
…Cont.
How the Web works?
What happens when a browser requests an HTML document over the Internet?
1. The user types a URL into the Web browser to identify which Web page they would like to view.
2. The browser parses the URL and requests a DNS server using broadcast IP. It then sends the URL to the
DNS to resolve the IP address. In other words, it converts hit.ac.zw to 197.221.234.41. Try pasting the
IP address to your web browser and see.
3. The browser then uses the IP address to send the HTTP packet to the browser’s ISP connection, which
passes it to the next server, routing it from server to server until it reaches the destination Web server.
2024 LECTURER: TAPIWA J MUDHARA 13
…Cont.
Figure 1: A request is made to the server.
4. The Web server locates the request page either on its hard drive or cached in memory.
5. The Web server sends its contents back to the requested browser.
2024 LECTURER: TAPIWA J MUDHARA 14
…Cont.
Figure 2: -The page is located and returned to the client machine.
6. The browser interprets the HTML formatting instructions and displays the content to the user.
2024 LECTURER: TAPIWA J MUDHARA 15
Website Validation
1. Authorship
Who put up the site?
• The name of the individual or organization creating the site should be clearly stated.
• The site should list the credentials of the author, whether it is an individual or an organization.
• The site should provide a way for users to contact the author and to make comments or ask questions.
2024 LECTURER: TAPIWA J MUDHARA 16
Website Validation
2. Purpose
Every site has a reason for being on the web.
• A site’s purpose should be clear and its content should reflect its purpose, be it to inform, entertain,
persuade, educate or sell.
• Bias (if any) should be clearly stated through a mission statement or “about us” section or elsewhere on
the site.
2024 LECTURER: TAPIWA J MUDHARA 17
Website Validation
3. Content & Currency:
Is the information authoritative and up to date?
• The information should be accurate and the site should be updated regularly, especially if the topic is
time-sensitive.
• The site’s content should be easy to read and easy to understand by its intended audience.
• The site should offer enough information to make it worth visiting.
2024 LECTURER: TAPIWA J MUDHARA 18
Website Validation
4. Technical Aspects
• A search function should be provided for sites with large amounts of information.
• You should not have to pay to view the information on the site.
• Spelling and grammar should always be correct.
• Links to more information should be provided.
• Graphics on the site should be relevant and appropriate to the content.
• Advertising should be limited.
2024 LECTURER: TAPIWA J MUDHARA 19
Common Internet Errors
• Error 404: Not Found
• Error 500: Internal Server Error
• Error 403: Forbidden
• Error 502: Bad Gateway
• Error 503: Service Unavailable
• Error 504: Gateway Timeout
• Error 400: Bad Request
• Error 401: Unauthorized
• Error 408: Request Timeout
• Error 429: Too Many Requests
2024 LECTURER: TAPIWA J MUDHARA 20
Thank you
Tapiwa J Mudhara
[email protected]
www.hit.ac.zw