Title: Introduction to Internet Programming
1Introduction to Internet Programming
2Course Outline
- Part 1 Overview
- Part 2 HTML, ASP and Server-side scripting
- Part 3 JavaScript and Client-side scripting
- Part 4 Java
3Chapter 1
4Course outline
- Internet
- Web
- HTML
- ASP
- Javascript
- Java
5Intro to Internet
- For us, the Internet consists of a large number
of connected computers. Each computer has a
unique IP address and communicates using the TCP
(or UDP) protocols
6IP Address and DNS
- A four octect number, e.g. 202.175.9.125
- Unique. No two computers on the Internet has the
same IP address - (some exception, private IP address)
- difficult for human to remember
- DNS (domain name system) translate a human
readable dot name to an IP address.
7IP address and DNS at work
- ping csp.ipm.edu.moping 202.175.9.125
- tracert csp.ipm.edu.motracert 202.175.9.125
- (spelled as traceroute in Unix)
8Communication using TCP
- Need to know the IP address and port number of a
server/service. - E.g. the web server csp.ipm.edu.mo has IP address
202.175.9.125 and port 80 (standard HTTP port)
9Using Internet Technology
- Internet programming, Intranet, Extranet,
- Why?
- The infrastructure available and working
- TCP/IP becomes the de facto internetworking
standard - Free server and client software web server,
email server, ftp server, browser
10Web Programming
- Developing application using the web technology
- HTML, HTTP, ASP, Javascript, Java etc
11Advantages of the Web
- Platform-independent
- can use the application in any browser in any OS
in any hardware - Simple to develop
- Simple to use simple interface
- Centralized distribution of software update
12The Web, under the Hood
Web server
Suppose we want to retrieve the
URL http//csp.ipm.edu.mo/hello.html. The browser
first extracts the domain name from the URL.
Then it connects to the server and submit a HTTP
request for the page hello.html.
13The Web, under the Hood
Web server
When the web server receives the request, it
retrieves the page from the file system if it is
a static page. Otherwise, it generates the HTML
file dynamically, e.g. by running server scripts
like ASP or CGI.
14The Web, under the Hood
Web server
The HTML page is then sent back to the browser
using the HTTP protocol.
15The Web, under the Hood
Web server
When the browser receives the whole HTML file, it
can show the content to the user.
16The Web, under the Hood
Web server
Notice that.. 1. All information of the request
are sent at the same time. 2. The browser doesnt
care whether the page is dynamic. 3. The response
must be in HTML format. (w/ exception). 4. After
the browser receives the HTML file, the
connection with the server is cut. Basically,
the content of the page cannot change. (w/
exception)
17Building blocks of the Web
- HTML, URL, HTTP
- Server side scripting ASP, PHP, JSP, CGI
- Client side scripting Javascript, VBScript
- Client side object embedding Java applet, Flash,
RealAudio
18URL
- Universal Resource Locator
- http//csp.ipm.edu.mo/courses/mccs352/index.html
- protocol, hostname, path
- how a browser breaks up a URL
- not including arguments..
19HTTP
- HyperText Transfer Protocol
- Work on top of TCP
- Text-based
- Stateless connect, one request, one response,
disconnect
20HyperText Markup LanguageHTML
- The standard format of web pages
- Platform independent
- can read and write on any platform (compared with
.pdf, .doc, .ps) - Language independent
- use Unicode, can shown multiple languages on one
page - Semantic markup
- voice browser