slide1
Download
Skip this Video
Download Presentation
Summer 2007

Loading in 2 Seconds...

play fullscreen
1 / 11

Summer 2007 - PowerPoint PPT Presentation


  • 393 Views
  • Uploaded on

Florida Atlantic University Department of Computer Science & Engineering. COP 4814 – Web Services Dr. Roy Levow Part 1 – Introducing Ajax. Summer 2007. Ajax is Born. February 2006 Jesse James Garrett of Adaptive Path Conceives alternative to Macromedia Flash using

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Summer 2007' - lotus


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1
Florida Atlantic UniversityDepartment of Computer Science & Engineering

COP 4814 – Web Services

Dr. Roy Levow

Part 1 – Introducing Ajax

Summer 2007

ajax is born
Ajax is Born
  • February 2006
    • Jesse James Garrett of Adaptive PathConceives alternative to Macromedia Flash using
      • Asynchronous HTTP Request
      • JavaScript
      • XML
    • Publishes ideas online

Ajax: A New Approach to Web Applications

    • See also article form June 2006 Wired
    • Intro to Ajax film clip

Web Services – Summer 2007

frames
Frames
  • Introduced in HTML 4.0
    • Allow page to be loaded into portion of browser window
    • Use discouraged in XHTML because of poor interaction with back button
  • Hidden frame technique
    • Use 1-pixel frame to contain form (thus hidden)
      • Fill in form from JavaScript and submit
      • Receive response asynchronously to update page
  • Iframes
    • Independent of frameset
    • Go anywhere on page and can be hidden

Web Services – Summer 2007

the real ajax
The Real Ajax
  • On Browser
    • Ajax Engine (JavaScript code)
      • Generates display using HTML and CSS
      • Receive JS calls from user intefface
      • Sends HTTPRequest to Server
      • Receives Data from Server
    • Server
      • Recieves HTTPRequest from Browser
      • Interacts with local database
      • Sends Data to Browser

Web Services – Summer 2007

slide5
HTTP
  • Hypertext Transfer Protocol
    • Accepts requests from browser
    • Transfers responses to browser
    • Fetch web pages
      • but has many other uses
  • HTTPRequest format

[]

Web Services – Summer 2007

http request
HTTP Request
  • Many request types
    • GET and POST are of interest in Ajax
    • Example GET

GET / HTTP/1.1

Host: www.wrox.com

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;

rv:1.7.6) Gecko/20050225 Firefox/1.0.1

Connection: Keep-Alive

    • Get request for root node with HTTP version
    • Originating client and information on client
    • Request to maintain connection for more transfers

Web Services – Summer 2007

http request7
HTTP Request
  • Item following GET is path to page to load

GET /index.html HTTP/1.1

  • Parameters can be appended to the url with

URL?name1=value1&name2=value2&…

Web Services – Summer 2007

slide8
POST
  • POST Example

POST / HTTP/1.1

Host: www.wrox.com

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;

rv:1.7.6) Gecko/20050225 Firefox/1.0.1

Content-Type: application/x-www-form-urlencoded

Content-Length: 40

Connection: Keep-Alive

name=Professional%20Ajax&publisher=Wiley

  • Adds Content-Type, Content-Length, and data

Web Services – Summer 2007

get vs post
GET

Data coded and sent as part of URL

Data visible (and modifiable) by user

Use for smaller amount of data

Slightly less transmission overhead

POST

Data sent separately from URL

Invisible to user

Can easily handle large amount of data

GET vs POST

Web Services – Summer 2007

http responses
HTTP Responses
  • Response format

[]

  • Example

HTTP/1.1 200 OK

Date: Sat, 31 Dec 2005 23:59:59 GMT

Content-Type: text/html; charset=ISO8859-1

Content-Length: 122

Web Services – Summer 2007

response codes
Response Codes
  • 200 (OK) – the one we want
  • 304 (NOT MODIFIED) – used to check cached page
  • 401 (UNAUTHORIZED)
  • 403 (FORBIDDEN)
  • 404 (NOT FOUND)

Web Services – Summer 2007

ad