0% found this document useful (0 votes)
2 views13 pages

Introduction To Web Programming - HTML

Web programming notes

Uploaded by

kevoian7
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views13 pages

Introduction To Web Programming - HTML

Web programming notes

Uploaded by

kevoian7
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

INTRODUCTION TO IBP

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.

Difference between Web and Internet:


Internet Web
Internet is the library and web is the collection of
Web is a subset of the internet. The web is a large
books. The internet also consists of databases,
portion of the internet but it isn’t all of it.
email, forums, etc.
The Web is ideally a way of accessing information over
the medium of the Internet. Web is a collection of
The internet is a network, a way of transporting internet servers that can host HTML formatted
content and web lets us use that content. documents. A collection of pages, of information
connected to each other around the globe. Each page can
be a combination of text and multimedia.

Tim Walter Page 1 of 13 Last Revised Edition Jan 2020


History of Internet and the Web
It is useful to know about the historical development of the Internet and the Web, since this can help you to
understand how they work, and why they exist in their current forms. It also helps to highlight the difference
between the Internet and the World Wide Web. People often mistakenly refer to the Web as "the Internet",
and fail to realize that the Web is only one recently-invented way of using the Internet.

How was the Internet invented?

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.

Where does the Web fit into the story?

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.

Tim Walter Page 2 of 13 Last Revised Edition Jan 2020


What's the relationship between the WWW and the Internet?

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

It has its own protocol i.e. HTTP


It creates a convenient and user friendly environment
It is the fastest components of Internet since it gathers together all the protocols into a single system.
It relies on the hypertext as means of Information retrieval.
It has the ability to work with multimedia and advanced programming languages i.e. text, graphics,
video and audio.
It is a delivery medium, content provider and subject matter.
It connects users to almost any part of the Internet.
It is used to explore intellectual, verbal knowledge and effective learning.
It contains complex virtual web of connections and consist of files.
It provides real-time collaboration, interactive pages and automatic push of information to
client computers.
The following diagram briefly defines evolution of World Wide Web:

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 −

Tim Walter Page 3 of 13 Last Revised Edition Jan 2020


protocol://hostname/other_information
The protocol specifies how information is transferred from a link. The protocol used for web resources is
HyperText Transfer Protocol (HTTP). Other protocols compatible with most web browsers include FTP,
telnet, newsgroups, and Gopher.
The protocol is followed by a colon, two slashes, and then the domain name. The domain name is the computer
on which the resource is located.
Links to particular files or subdirectories may be further specified after the domain name. The directory names
are separated by single forward slashes.

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.

What is Web Server?


Every Website sits on a computer known as a Web server. This server is always connected to the internet.
Every Web server that is connected to the Internet is given a unique address made up of a series of four
numbers between 0 and 256 separated by periods. For example, [Link] or [Link].
When you register a Web address, also known as a domain name, such as [Link] you have to
specify the IP address of the Web server that will host the site.
We will see different type of Web servers in a separate chapter.

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.

Tim Walter Page 4 of 13 Last Revised Edition Jan 2020


You will buy space on a Web Server from any Internet Service Provider. This space will be used to host your
Website.

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.

Tim Walter Page 5 of 13 Last Revised Edition Jan 2020


Architecture
There has been huge growth in field of web which may lead to overload the internet and degrade its
performance. Hence better protocol are required to be developed.

Role of Websites in Organizations


A well-maintained website can help you gain a competitive advantage in your industry and improve your
business image. Developing your web site offers many benefits including helping you get more leads and
prospects, increase sales, enhance your professional brand, and improve your customer service. Below are 18
benefits of a website for small businesses you may not have thought of:

1. Improve Your Advertising Effectiveness


Placing your website address on all your promotional material will help you gain additional exposure and
encourage the visitors to first check your site for the information they are seeking.

2. Save Money on Printing and Distribution Costs


A website can act as your online brochure or catalog that can be changed or updated at any time. If you employ
a content management system (CMS) you can make changes quickly and at no charge.

3. Easy Access to New Customers


You can have your existing customers refer you to their friends and relatives using only your web address or
URL.

4. Easy to Use and Update


If maintained properly your website will always be up to date and current. Easily make updates, edits and
deletions from any computer on the Internet. No more having to pay a programmer every time you want to
chance a date or add a product.

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.

6. Educate Your Customers


Your website can offer free advice about your products and services. This information can be delivered in a
well thought out and consistent way any time of the day or night.

7. Expand Your Market


The Internet allows businesses to break through the geographical barriers and become accessible from
anywhere in the world by a potential customer that has an Internet connection. Selling products online is
cheaper and easier for you and your customers.

8. Extend Your Local Reach


Extend the local reach of your brick-and-mortar store to consumers around the world. You are open for
business 24/7 365 days/year with all the information the visitors needs to make an informed decision.

9. Promote & Sell Products & Services


Provide photos and detailed descriptions of your products or services. Explain why your products or services
are superior to your competitors. Show visitors how your products or services can help them in their personal
or professional lives.

10. Promote Your Brick and Mortar Footprint

Tim Walter Page 6 of 13 Last Revised Edition Jan 2020


When customers and potential customers are out and about, they will still be able to find you via their phone.
Your phone number, address and full selection can be made available from your website or mobile-friendly
site.

11. When You Change Locations


If you move your business to a new location your customers can still find you because your main marketing
tool, your website, is easily changed and updated. Your website is flexible and if your search engine
optimization is done properly your business will appear to online visitors who search for you.

12. Great Tool for Finding New Employees


You can post job opportunities for available positions and applicants can investigate your company and apply
online.

13. Your Own Internet Identity


Your own domain name ([Link]) establishes a strong online brand identity.

14. Set-up Email Addresses


You can set-up a personalized email addresses for the company, yourself and your employees. If you set-up a
system to accept emails on your site you can then email updates, notices, sales and holiday store hours to your
customers.

15. Two-Way Communication


Customers can quickly and easily contact you, give feedback on your products or ask about product
availability.

16. Cheap Market Research


You can feature visitor polls and online surveys to take the pulse of your customers.

17. Build Your Reputation


Become or remain the expert by demonstrating knowledge and expertise in your area of work. Write blog
posts and articles on the site that educate visitors and help them understand your business and offerings.

18. Improve Customer Service


Information requests can be processed immediately via online forms and autoresponders automatically day or
night.

Server side and Client side Programming

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 :

Tim Walter Page 7 of 13 Last Revised Edition Jan 2020


1) PHP
2) C++
3) Java and JSP
4) Python
5) Ruby on Rails

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.

1) Interact with temporary storage


2) Make interactive web pages
3) Interact with local storage
4) Sending request for data to server
5) Send request to server
6) work as an interface between server and user

The Programming languages for client-side programming are:


1) Javascript
2) VBScript
3) HTML
4) CSS
5) AJAX

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:

Client and Server

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.

Tim Walter Page 8 of 13 Last Revised Edition Jan 2020


(An access link to that web page)

 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 Languages Example


There are several languages that can be used for server-side programming:
 PHP
 [Link] (C# OR Visual Basic)
 C++
 Java and JSP
 Python
 Ruby on Rails and so on.

Server-side Example

1. // This is a sample C# code.


2. using System;
3. // namespace
4. class ServerSide
5. {
6. public static void Main()
7. {
8. [Link](“Hello C# Corner”);
9. // printing a line
10. }
11. }

Tim Walter Page 9 of 13 Last Revised Edition Jan 2020


Client-side Programming
Similarly to server-side programming, client-side programming is also the name of the entire program that
runs on the client. Or we can say that client-side programming mostly deals with the user interface with which
the user interacts in the web. It is mostly a browser, in the user's machine, that runs the code and is mainly
done in any scripting language like JavaScript (or we can use Flash instead of JavaScript or VNScript).

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

Client-side Languages Example


There are many client-side scripting languages too.
 JavaScript
 VBScript
 HTML (Structure)
 CSS (Designing)
 AJAX
 jQuery etc.

(Some other languages also can be used on the basis of the modeling/designing /graphics/animations and for
extra functionalities.)

Factors to Consider When Choosing a Web Programming Language


There are several factors to consider when choosing a web programming language. Say, for example, in
developing a dynamic web page, one might consider Java Server Pages (JSP) as the best option, while another
might consider using PHP or a similar scripting language.

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 Targeted Platform


It is very important to consider the platform on which the program will run. Say you have two languages, Java
and C. If a program is written in C and needs to be run on Windows and Linux platforms, it would require
platform compilers and two different executables. On the other hand, with Java development, the program can
run on any machine provided a Java Virtual Machine (JVM) is installed.

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.

Tim Walter Page 10 of 13 Last Revised Edition Jan 2020


The Elasticity of a Language
This is the ease with which new features can be added to an existing program. It can involve the addition of a
new set of functions or the use of an existing library to add a new feature. Some of the questions to be
considered are:

 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?

The Time to Production


This is the time taken to make the program go live, when the code is production-ready and works as intended.
It is highly dependent on the size of code. In theory, the easier it is to learn a language, the smaller the code
and thus less time taken to go live.
Take for example, in development of a content management website, it is possible to take days using PHP development
scripts while the use of servlets code can take months. This is going by the assumption that you are learning both
languages from scratch.
Performance
Only so much of performance can be squeezed out of a program and a platform, with the programming
language used in the program development affecting performance. Numerous studies have been conducted
comparing how fast programming languages are in the same environment. This has led to the development of
various benchmarks which can be used as a reference.
Language performance should matter when the target environment doesn’t offer much scope for scaling. Good
examples of such an environment are handheld devices.

Support and Community

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.

Tim Walter Page 11 of 13 Last Revised Edition Jan 2020


Ease of Development and Maintenance

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.

Error Checking and Diagnosis

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.

Common gateway interface (CGI)

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:

<FORM METHOD=POST ACTION=[Link]

Tim Walter Page 12 of 13 Last Revised Edition Jan 2020


and the server at "[Link]" would pass control to the CGI application called "[Link]" to record the
entered data and return a confirmation message. (The ".pl" indicates a program written in PERL but other
languages could have been used.)

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.

Tim Walter Page 13 of 13 Last Revised Edition Jan 2020

You might also like