Transcript Powerpoint

The Module Road Map
Assignment 1 Road Map
We will look at…
 Internet / World Wide Web
 Aspects of their operation
 The role of clients and servers
 ASPX Page (Web Form)
 How it is passed between browser and server
 The structure of the page
 How it provides functionality to the browser
Credit Categories
 Assignment 1 Credit Category 2
 Assignment 2 Credit Category 2 & 3
 Assignment 3 Credit Category 1
The Internet and TCP/IP
 Network of networks
 Defence research in the 60s
 TCP/IP (Transmission Control Protocol / Internet
Protocol)
 Allows programs on computers to talk to each other
The IP Address
 Uniquely identifies each machine
 32 bit number made up of four 8 bit numbers
 Visit http://209.85.227.105/
 Assigned in blocks
www.dmu.ac.uk
www.cse.dmu.ac.uk
G677 (my server)
146.227.160.79
146.227.57.2
146.227.53.94
Name Servers
 http://209.85.227.105/ not obviously www.google.com
Ports




TCP/IP allows programs on machines to communicate
IP address identifies machine
port number identifies program
There is no law that states a specific port must be used for a
service however there are certain ports that traditionally
provide services.
 80 HTTP (web pages)
 21 FTP (File transfers)
 119 NNTP (Network News Transfer Protocol)
 443 HTTPS (secure web pages)
The World Wide Web
 Up until about 1989 the Internet existed quite happily
without the World Wide Web
 File Transfer Protocol (FTP)
 Telnet
 Usenet
 World Wide Web - Internet
The Client Server Model
Server v Client Side Code
 Code may be added at either end of the process
 Client side code runs at browser
 Action Script (Flash)
 JavaScript
 VBScript
 Server Side Code
 ASP.NET (C #)
 PHP
 JSP
New Process to Consider
XHTML Forms GET and POST
 Simple web form (linked from the module web site)
XHTML Form Code
Change POST to GET
http://g519-md.ad.cse.dmu.ac.uk/Request/?txtFirstName=Matthew&txtLastName=Dean&Submit1=submit
Active Server Pages (ASPX)
 Events

User or System Generated

User triggered events

Click
Triggered when a user presses a button
Selected Index Changed
Activated when the user selects an item off a drop down list
System generated
Load
Runs when the ASPX page is loaded by the server
Typically used to initialise the web form
Unload
Runs when the ASPX page is unloaded from the server
Typically used to save data
 Handled by event procedures
Anatomy of an ASPX Page
Code may be Embedded in the
Web Form
Active Server Controls
Note the tag <asp
Visual Designer
Post Back = False
 Post back is false on the first HTTP request
 The browser sends the request to the server
 The server begins processing the page
 The server executes any code associated with the page
load event
 The server runs any code in the page unload event
 All asp controls are processed by the server and changed
into suitable XHTML controls
 This produces XHTML built from the ASPX page
 The XHTML is sent to the requesting browser
What the Browser Gets…
 Not the ASPX page but XHTML
Post Back = True
 The browser sends the request to the server
 The server begins processing the ASPX page
 The server executes any code associated with the page load





event
The server executes any code associated with any events
triggered (in this case the click event of the Go button)
The server runs any code in the page unload event
All asp controls are processed by the server and changed
into suitable XHTML controls (They will be updated with
any data from the XHTML version of the form)
This produces XHTML built from the ASPX page
The XHTML is sent back to the requesting browser
Visual Studio Development Server
 Visual Studio starts the development server
VS then launches the browser with the URL
http://localhost:49527/delme1/Default.aspx
Visual Studio makes your computer “talk to itself”