AJAX Basics
Server Communication

    Presentation by Mike Wilcox
         January 6th, 2009
What is AJAX?
• Term coined by Jesse James Garrett of Adaptive Path
   in February 2005

• Originally stood for “Asynchron...
Browsers
Internet Explorer
• Let's hear it for IE!
• Actually, IE 4.0 was a tremendous achievement
  done by a Microsoft “Dream Tea...
FireFox
  • First real competition for IE since Netscape
       (about 20% of the market)

  • Built by the Mozilla Corpor...
WebKit
• Used by Safari, Google Chrome, AIR, iPhone,
   Android, Nokia (much more)

• Ported from KHTML by the WebKit Team...
Why Ajax - i.e., not Flash
• Standardized UI (the reason for Flex)
• Open Source
• View Source
• Human-readable Text-based...
What is “Open Web”??
  • Cross-Platform Standards
  • No Vendor Lock-in
  • Anyone Can Innovate
  • Powerful, Universal Cl...
Same Origin Policy




The same origin policy is an important security measure for client-side scripting (mostly JavaScrip...
Server
Communication
  Methods
XmlHttpRequest
XmlHttpRequest
• Pros:
 • Standard
 • Native Browser Method
 • Handles All REST calls
• Cons:
 • No cross domain
iFrame
iFrame
• Pros:
 • Used primarily for binary transports, like File
     Uploads

• Cons:
 • Hard as Hell to use
 • With ext...
Remote Scripting
Remote Scripting
• Pros:
 • Super Easy
 • Cross Domain!
 • Already JavaScript - hey, that's what we're using!
• Cons:
 • O...
ClubAJAX Basics - Server Communication
Upcoming SlideShare
Loading in...5
×

ClubAJAX Basics - Server Communication

1,111

Published on

Basics of AJAX and server communication techniques

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,111
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

















  • ClubAJAX Basics - Server Communication

    1. 1. AJAX Basics Server Communication Presentation by Mike Wilcox January 6th, 2009
    2. 2. What is AJAX? • Term coined by Jesse James Garrett of Adaptive Path in February 2005 • Originally stood for “Asynchronous JavaScript and XML” • Now understood to encompass a range of techniques • Usually features HTTP communication without client refresh • Consider: Changing the DOM without changing pages http://www.adaptivepath.com/ideas/essays/archives/000385.php
    3. 3. Browsers
    4. 4. Internet Explorer • Let's hear it for IE! • Actually, IE 4.0 was a tremendous achievement done by a Microsoft “Dream Team” • Introduced AJAX: DOM manipulation, XHR • After winning the browser war with Netscape, the Dream Team disbanded • Killer App: • It's forced upon Windows users
    5. 5. FireFox • First real competition for IE since Netscape (about 20% of the market) • Built by the Mozilla Corporation, with Netscape code and developers • Killer App: • Being Open Source made it popular early on with users • FireBug has made FireFox the primary platform for which to develop http://en.wikipedia.org/wiki/Browser_market_share
    6. 6. WebKit • Used by Safari, Google Chrome, AIR, iPhone, Android, Nokia (much more) • Ported from KHTML by the WebKit Team with help from Apple • Mike originally laughed at the silly little wannabe • Killer App: • Insane performance
    7. 7. Why Ajax - i.e., not Flash • Standardized UI (the reason for Flex) • Open Source • View Source • Human-readable Text-based Transports are simpler • No compiling • Part of the Open Web
    8. 8. What is “Open Web”?? • Cross-Platform Standards • No Vendor Lock-in • Anyone Can Innovate • Powerful, Universal Clients • Open Source Implementations • Mashable, Searchable, and Integrated http://codinginparadise.org/weblog/index.html
    9. 9. Same Origin Policy The same origin policy is an important security measure for client-side scripting (mostly JavaScript). It prevents a document or script loaded from one "origin" from getting or setting properties of a document from a different "origin". http://en.wikipedia.org/wiki/Same_origin_policy
    10. 10. Server Communication Methods
    11. 11. XmlHttpRequest
    12. 12. XmlHttpRequest • Pros: • Standard • Native Browser Method • Handles All REST calls • Cons: • No cross domain
    13. 13. iFrame
    14. 14. iFrame • Pros: • Used primarily for binary transports, like File Uploads • Cons: • Hard as Hell to use • With extreme trickery will do cross domain, but only with server cooperation
    15. 15. Remote Scripting
    16. 16. Remote Scripting • Pros: • Super Easy • Cross Domain! • Already JavaScript - hey, that's what we're using! • Cons: • Only does JavaScript (and JSON) • An XML OR HTML formatted error is hard to catch • Only POST and GET • Need very minor server cooperation
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×