Web Programming
Web Programming
Course goals:
Understand the technology and protocols underlying the
World Wide Web
Become familiar with common tools and techniques for
developing Web-based applications, both client-side and
server-side
Develop a working knowledge of HTML, JavaScript,
Java, and PHP as languages for developing Web
applications
Reasonable questions
What is the World Wide Web?
2
Web Internet
Internet: a physical network connecting millions of computers using the
same protocols for sharing/transmitting information (TCP/IP)
in reality, the Internet is a network of smaller networks
3
WEB PAGE
A text document formatted in a markup language e.g. HTML
Supports links to other documents, as well as graphics, audio,
and video files.
This means you can jump from one document to another
simply by clicking
4
WEB SITE
A set of related Web pages, normally linked to each
other( through hyperlinks), hosted and published
together
5
NETWORK & INTERNET
NETWORK
A group of two or more computer systems linked together.
There are many types of computer networks, including:
1. local-area networks (LANs) : The computers are
geographically close together (that is, in the same building).
2. wide-area networks (WANs) : The computers are further
apart and are connected by telephone lines or radio waves.
3. Metropolitan-area networks MANs): A data network
designed for a town or city.
6
Internet
A Global network of networks
7
SERVER
Server
A Network resource manager
A computer on a network that manages network resources.
For example,
1. File server is a computer and storage device dedicated to
storing files. Any user on the network can store files on
the server.
2. print server is a computer that manages one or more
printers,
8
Server conti…
3. A network server is a computer that manages network
traffic.
4. A database server is a computer system that processes
database queries. Servers are often dedicated, meaning
that they perform no other tasks besides their server
tasks. On multiprocessing operating systems, however,
a single computer can execute several programs at
once. A server in this case could refer to the program
that is managing resources rather than the entire
computer.
9
The purpose for networking computers is to share
resources (e.g. printers & data)
10
How the internet works
Communication is made possible using the TCP/IP protocol.
Protocols refer to a set of communication rules and
guidelines adhered to by all networking devices.
11
History of the Internet
the idea of a long-distance computer network traces back to early 60's
Licklider at M.I.T.
Baran at Rand
National Physics Laboratory in U.K.
2000 93,047,785
1998 36,739,000
estimated >600 million Internet users in
1996 12,881,000
2002 (www.nua.ie)
1994 3,212,000
1992 992,000
1990 313,000
1988 56,000
1986 5,089
1984 1,024
1982 235
14
History of the Web
the idea of hypertext (cross-linked and inter-linked documents)
traces back to Vannevar Bush in the 1940's
online hypertext systems began to be developed in 1960's
e.g., Andy van Dam's FRESS, Doug Englebert's NLS
in 1987, Apple introduced HyperCard
16
Web growth
Computers on Web Servers on
Stats from Year the Internet the Internet
Netcraft Web Server Survey.
2002 162,128,493 33,082,657
JavaScript
a scripting language for Web pages, developed by Netscape in 1995
uses a C++/Java-like syntax, so familiar to programmers, but simpler
good for adding dynamic features to Web page, controlling forms
and GUI
see www.creighton.edu/~davereed/Memory
Java applets
can define small, special-purpose programs in Java called applets
provides full expressive power of Java (but more overhead)
good for more complex tasks or data heavy tasks, such as graphics
see www.creighton.edu/~davereed/csc107.F03/Labs/MontePI.html
19
Server-side programming
can store and execute program on Web server, link from Web page
more complex, requires server privileges, but secure
CGI programming
programs can be written to conform to the Common Gateway Interface
when a Web page submits, data from the page is sent as input to the CGI program
CGI program executes on server, sends its results back to browser as a Web page
20
Exercise
pick some of your favorite Web sites and try to identify
static components?
dynamic components?
client-side? JavaScript? Java applet?
server-side? CGI? ASP?
21