Introduction To Web Programming - HTML
Introduction To Web Programming - HTML
Definition:
The Internet is a vast network of computers, and server’s, which communicate with each other. The internet
connect’s with the whole wide world together. An Internet application is a client-server application that uses
standard Internet protocols for connecting the client to the server.
Internet-Based Services
Some of the basic services available to Internet users are −
Email − A fast, easy, and inexpensive way to communicate with other Internet users around the world.
Telnet − Allows a user to log into a remote computer as though it were a local system.
FTP − Allows a user to transfer virtually every kind of file that can be stored on a computer from one
Internet-connected computer to another.
UseNet news − A distributed bulletin board that offers a combination news and discussion service on
thousands of topics.
World Wide Web (WWW) − A hypertext interface to Internet information resources.
Web programming refers to the writing, markup and coding involved in Web development, which includes
Web content, Web client and server scripting and network security. The most common languages used for
Web programming are XML, HTML, JavaScript, Perl 5 and PHP. Web programming is different from just
programming, which requires interdisciplinary knowledge on the application area, client and server scripting,
and database technology.
A web-based application is any program that is accessed over a network connection using HTTP, rather than
existing within a device's memory. Web-based applications often run inside a web browser.
WWW - Overview
WWW stands for World Wide Web. A technical definition of the World Wide Web is: all the resources
and users on the Internet that are using the Hypertext Transfer Protocol (HTTP).
The World Wide Web is the universe of network-accessible information, an embodiment of human knowledge.
The World Wide Web is a way of exchanging information between computers on the Internet, tying them
together into a vast collection of interactive multimedia resources.
The Internet is actually more of a historical accident than an invention. The original concept was developed
during the Cold War, as a way of defending America's communication channels against nuclear attack. The
RAND Corporation, a U.S. think-tank, was given the task of devising a communications system that could
still function, even if a substantial portion of it were to be destroyed.
Such a structure obviously had to be de-centralized, since a large central control site would be too obvious a
target. For this reason, it was decided to use a network of interlinked computers, each of which had equal
authority to send, pass and receive messages. The messages themselves would be split up into "packets" (small
units of data) each of which would be "addressed" to the recipient computer. But the exact route that each
packet took through the network would be unimportant. If part of the network were destroyed, the packets
would simply take another route to their destination, using the remaining network links.
An early network of four computers, operating on these principles, was established in 1969, and was called
ARPANET. By 1972, this had grown to 37 computers, as scientists and researchers began to appreciate the
advantages of rapid communication. Through the '70s, additional networks were developed, linked to one
another by computers called "gateways". Newsgroups and mailing lists were set up to facilitate
communications between users. The introduction of the Joint Academic Network (JANET) in the UK in 1984,
and the National Science Foundation Network (NSFNET) in 1986 laid the foundations of what we now know
as the Internet - a loose coalition of networks, all linked together by means of gateways, supporting millions
of users world-wide.
The World Wide Web is a more recent development. The concept was devised in 1989 by Tim Berners-
Lee, a communications specialist at the European Particle Physics Laboratory, 'CERN' in Geneva. He
wanted to design an information system by which researchers could share their results as rapidly as possible,
over the Internet. In order to navigate through this information, he chose to use a system of "hypertext", which
allows documents to be linked, using key words, to other similar documents elsewhere on the Internet. The
language in which Berners-Lee's Web documents were authored, and in which the hypertext links were
defined, became known as Hypertext Markup Language (HTML).
At first, the Web was used only as an experimental tool for exchanging text-based information. However, the
development of more advanced, graphical Web-viewing programs (also called "browsers") such as Mosaic
and Netscape, in 1993-94 enabled people to publish and view Web documents which contained pictures. More
recently, these capabilities have been extended to include sound and video content. These recent developments
have led to a dramatic increase in the popularity of the Web, which is today the most high-profile application
of Internet technology.
The World Wide Web is just one of the many services that the Internet provides. Some other services
provided by the Internet are email, FTP, gopher, telnet and UseNet.
Almost every protocol type available on the Internet is accessible on the web including the following
components: Email, FTP, Telnet, User news, HTTP
Features of WWW
What is HTTP?
HTTP stands for Hypertext Transfer Protocol. This is the protocol being used to transfer hypertext documents
that makes the World Wide Web possible.
A standard web address such as [Link] is called a URL and here the prefix http indicates its protocol
URL stands for Uniform Resource Locator, and is used to specify addresses on the World Wide Web. A URL
is the fundamental network identification for any resource connected to the web (e.g., hypertext pages, images,
and sound files).
A URL will have the following format −
A website is a collection of publicly accessible, interlinked Web pages that share a single domain name.
Websites can be created and maintained by an individual, group, business or organization to serve a variety of
purposes. Together, all publicly accessible websites constitute the World Wide Web.
Web Browsers are software installed on your PC. To access the Web you need a web browsers, such as
Netscape Navigator, Microsoft Internet Explorer or Mozilla Firefox.
Currently you must be using any sort of Web browser while you are navigating through my site
[Link]. On the Web, when you navigate through pages of information this is commonly known as
browsing or surfing.
We will see different type of Web browsers in a separate chapter.
SMTP stands for Simple Mail Transfer Protocol Server. This server takes care of delivering emails from one
server to another server. When you send an email to an email address, it is delivered to its recipient by a SMTP
Server.
DNS stands for Domain Name System. When someone types in your domain name, [Link], your
browser will ask the Domain Name System to find the IP that hosts your site. When you register your domain
name, your IP address should be put in a DNS along with your domain name. Without doing it your domain
name will not be functioning properly.
W3C stands for World Wide Web Consortium which is an international consortium of companies involved
with the Internet and the Web.
The W3C was founded in 1994 by Tim Berners-Lee, the original architect of the World Wide Web. The
organization's purpose is to develop open standards so that the Web evolves in a single direction rather than
being splintered among competing factions. The W3C is the chief standards body for HTTP and HTML.
ISP stands for Internet Service Provider. They are the companies who provide you service in terms of internet
connection to connect to the internet.
HTML stands for Hyper Text Markup Language. This is the language in which we write web pages for any
Website. Even the page you are reading right now is written in HTML.
This is a subset of Standard Generalized Mark-Up Language (SGML) for electronic publishing, the specific
standard used for the World Wide Web.
A hyperlink or simply a link is a selectable element in an electronic document that serves as an access point
to other electronic resources. Typically, you click the hyperlink to access the linked resource. Familiar
hyperlinks include buttons, icons, image maps, and clickable text links.
WWW Operation
WWW works on client- server approach. Following steps explains how the web works:
1. User enters the URL (say, [Link] of the web page in the address bar of web
browser.
2. Then browser requests the Domain Name Server for the IP address corresponding to
[Link].
3. After receiving IP address, browser sends the request for web page to the web server using HTTP
protocol which specifies the way the browser and web server communicates.
4. Then web server receives request using HTTP protocol and checks its search for the requested web
page. If found it returns it back to the web browser and close the HTTP connection.
5. Now the web browser receives the web page, It interprets it and display the contents of web page in
web browser’s window.
Future
There had been a rapid development in field of web. It has its impact in almost every area such as education,
research, technology, commerce, marketing etc. So the future of web is almost unpredictable.
Apart from huge development in field of WWW, there are also some technical issues that W3 consortium has
to cope-up with.
User Interface
Work on higher quality presentation of 3-D information is under development. The W3 Consortium is also
looking forward to enhance the web to full fill requirements of global communities which would include all
regional languages and writing systems.
Technology
Work on privacy and security is under way. This would include hiding information, accounting, access control,
and integrity and risk management.
5. Improve Productivity
A website increases your company’s productivity because less time is spent explaining product or service
details to customers because all this information is available 24 hours a day on your website.
Server-side Programming :
It is the program that runs on server dealing with the generation of content of web page.
1) Querying the database
2) Operations over databases
3) Access/Write a file on server.
4) Interact with other servers.
5) Structure web applications.
6) Process user input. For example if user input is a text in search box, run a search algorithm on data stored
on server and send the results.
Examples :
The Programming languages for server-side programming are :
Client-side Programming :
It is the program that runs on the client machine (browser) and deals with the user interface/display and any
other processing that can happen on client machine like reading/writing cookies.
Basic Background
Web development is all about communication and data exchange. This communication takes place via two
parties over the HTTP protocol.
These parties are:
Server
The Server is responsible for serving the web pages depending on the client/end user requirement. It can be
either static or dynamic.
Client
A client is a party that requests pages from the server and displays them to the end user. In general a client
program is a web browser.
Example | Working
We can explain this entire mechanism using the following:
The user opens his web browser (client)
The user starts browsing
The client forwards this request to the server, for accessing their web page.
The server then acknowledges the request and replies back to the client program.
The client then receives the page source and renders it.
(Into a viewable/under a stable website)
Now the user types into search bar
The client then submits data to the server
The server processes the data and replies back with a related search result
The client again renders it back for the user's view
The user gets access to the requested link.
Server-side Programming
Server-side programming can be explained as: It is the general name for the kind of program that runs directly
on the server. Or we can say that server-side programming must deal with dynamic content. It runs on the
server. Most web pages are not static since they deal with searching databases.
Server-side Uses
It processes the user input
Displays the requested pages
Structure web applications
Interaction with servers/storages
Interaction with databases
Querying the database
Encoding of data into HTML
Operations over databases like delete, update.
Server-side Example
Client-side Uses
Makes interactive web pages
Make stuffs work dynamically
Interact with temporary storage
Works as an interface between user and server
Sends requests to the server
Retrieval of data from Server
Interact with local storage
Provides remote access for client server program
(Some other languages also can be used on the basis of the modeling/designing /graphics/animations and for
extra functionalities.)
No single language is the best choice for any given project. Although preference might be given to certain
factors like performance, security in enterprise applications, fewer lines of code among other factors.
The right selection of a programming language yields solutions that are concise, easy to debug, easy to extend,
easy to document, and easy to fix.
The same goes for web pages. They should all look and work the same across all browsers. However, using
CSS3 tags and HTML 5 without checking browser compatibility will cause the site to look and behave
differently across different browsers.
Can one use a capability of the language without the inclusion of a new library?
If not, is the capability available in the language library?
If the capability is neither native nor available as a library, what is the effort to build the features from scratch?
Programming languages and good software are similar in that they both need a community following to help
them grow. Languages with active forums are likely to be more popular than even greater languages without
similar forums. Some of the offerings of community support include wikis, forums, tutorials and most
importantly additional libraries, all of which help the language to grow.
Purpose
What is the objective of the programming language? It specifies the objective for which a program is being
developed. In the event that one needs to develop commercial applications, then a business oriented
programming language like COBOL is the best candidate. For development of scientific applications, it is best
to use a scientific oriented language like FORTRAN.
Similarly, if one is interested in developing programs related to Artificial Intelligence, then he or she should
be comfortable using the LISP or ProLog languages. Object oriented languages are best suited for development
of web-based applications. As for the development of system programs, a middle level language like C should
be chosen.
Programmer Experience
Where more than one programming language is available for the development of the same program, a
programmer should choose the language he is more conversant with. Generally, one should go for the language
for which he is more experienced.
Programmers develop programs using the language they are most comfortable in. Generally, there is a
preference for object oriented languages over the procedural oriented languages. The reason for this is that,
code developed in object oriented languages can be reused and maintained with great ease.
Efficiency
Efficiency is an important factor which need be considered before choosing a programming language for
software development. One should consider the language in which the programs can be developed and
executed rapidly. Additionally, the language which requires less amount of memory for the storage of
programs should be selected.
Availability of an IDE
A powerful Integrated Development Environment goes a long way in increasing the productivity of a
programmer. The language with an IDE of well supported development, debugging and compilation tools
should be selected.
These factors involve finding the errors in a program and their causes. Programmers should choose
programming languages which contain efficient error handling features. Error checking and diagnosis is very
important and crucial in the development of quality and error-free programs. The task of code development
and testing is easier when undertaken with a programming language with efficient and robust error detection
and correction mechanisms.
A good example is Java. This language provides an efficient error handling mechanism of try/catch block.
This feature in Java programs can be used to handle the unexpected errors that may occur during the execution
of a program.
The common gateway interface (CGI) is a standard way for a Web server to pass a Web user's request to an
application program and to receive data back to forward to the user. When the user requests a Web page (for
example, by clicking on a highlighted word or entering a Web site address), the server sends back the requested
page. However, when a user fills out a form on a Web page and sends it in, it usually needs to be processed
by an application program. The Web server typically passes the form information to a small application
program that processes the data and may send back a confirmation message. This method or convention for
passing data back and forth between the server and the application is called the common gateway interface
(CGI). It is part of the Web's Hypertext Transfer Protocol (HTTP).
If you are creating a Web site and want a CGI application to get control, you specify the name of the application
in the uniform resource locator (URL) that you code in an HTML file. This URL can be specified as part of
the FORMS tags if you are creating a form. For example, you might code:
The common gateway interface provides a consistent way for data to be passed from the user's request to the
application program and back to the user. This means that the person who writes the application program can
makes sure it gets used no matter which operating system the server uses (PC, Macintosh, UNIX, OS/390, or
others). It's simply a basic way for information to be passed from the Web server about your request to the
application program and back again.
Because the interface is consistent, a programmer can write a CGI application in a number of different
languages. The most popular languages for CGI applications are: C, C++, Java, and PERL.
An alternative to a CGI application is Microsoft's Active Server Page (ASP), in which a script embedded in a
Web page is executed at the server before the page is sent.
An application programming interface (API) is an interface or communication protocol between different parts
of a computer program intended to simplify the implementation and maintenance of software.
An API may be for a web-based system, operating system, database system, computer hardware, or software
library.
An API specification can take many forms, but often includes specifications for routines, data structures, object
classes, variables, or remote calls. POSIX, Windows API and ASPI are examples of different forms of APIs.
Documentation for the API usually is provided to facilitate usage and implementation.
More recently, the term has been often used to refer to a specific kind of interface between a client and a
server, which has been described as a “contract” between both - such that if the client makes a request in a
specific format, it will always get a response in a specific format or initiate a defined action.[1] This is a
specialized form of API, sometimes defined as a Web API.