5555: Web Programming - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

5555: Web Programming

Description:

Widely-used, particularly for DHTML - Full-featured language - Cross-platform support ... Requires runtime-environment', but is cross-platform ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 11
Provided by: Jef5225
Category:
Tags: dhtml | programming | web

less

Transcript and Presenter's Notes

Title: 5555: Web Programming


1
5555 Web Programming
  • Semester 2, 2008/9

2
  • Client-side

- program runs in web-browser - no server
control once downloaded - less bandwidth -
insecure
  • Server-side

- program runs on web server - uses more
resources - has no control over client
machine - secure
3
Client-Side
  • Javascript

- Widely-used, particularly for DHTML -
Full-featured language - Cross-platform support
  • Java

- Used in the form of applets on web pages -
Slow, but good with graphics - Requires
runtime-environment, but is cross-platform
  • VBScript

- Microsoft OS only, hence limited applicability
4
Server-Side 1 - CGI
  • Perl (.pl, .cgi)

- Most widely-used server scripting language on
the internet - Large number of add-on libraries -
Works on Windows and Unix - OpenSource
  • PHP (.php, .php3, .php4)
  • - rapidly-growing
  • - HTML-embedded
  • - Works on Windows and Unix
  • OpenSource
  • Object-oriented many useful classes available
    free on web
  • ASP (.asp)
  • - MS-specific (i.e. Windows only, AND Windows
    web-servers only
  • HTML-embedded
  • Can run uner Unix with Chillisoft (expensive)

5
Server-Side 2
  • Python (.py)
  • Cult following. Similar to Perl in use
    smaller user base.
  • Can run under Windows or Unix
  • Coldfusion (.cfm)
  • Application server
  • Good for non-programmers
  • Can link easily to various database back-ends
  • Java (.jsp, .jhtml)
  • growing userbase
  • requires add-on libraries for server

6
Server/Client
  • AJAX
  • uses XML
  • Asynchronous Javascript And XML

7
Client/Server Interaction
CLIENT
SERVER
http//143.52.5.51/index.html
Client issues a request for a page
Server returns requested page
Client clicks a link to another page
Server returns requested page
etc
8
(No Transcript)
9
TEMPERATURE EXAMPLE The HTML code
ltbodygt lth1gtltfont color"Green" face"Verdana"
Size"4"gtltbgtTemperature Converterlt/bgtlt/fontgtlthr
size"1"gtlt/h1gt Insert a number in either input
field, and the number will be converted into
either Celsius or Fahrenheit. ltpgtlt/pgt ltform
name"myform"gt ltinput name"celsius"
onkeyup"convert('C')"gt degrees Celsius ltpgtis
equal tolt/pgt ltinput name"fahrenheit"
onkeyup"convert('F')"gt degrees Fahrenheit
lt/formgt Note that the ltbgtMath.roundlt/bgt method
is used, so that the result will be returned as a
whole number. lt/bodygt lt/htmlgt
10
TEMPERATURE EXAMPLE The Javascript
ltscript type"text/javascript"gt function
convert(degree) if (degree"C")
Fdocument.myform.celsius.value 9 / 5
32 document.myform.fahrenheit.valueMath.round(F)
else C(document.myform.fahrenheit.valu
e -32) 5 / 9 document.myform.celsius.valueMath
.round(C) lt/scriptgt
Write a Comment
User Comments (0)
About PowerShow.com