 AJAX technology  Rich User Experience  Characteristics  Real live examples  JavaScript and AJAX  Web application workflow model – synchronous vs.

Slides:



Advertisements
Similar presentations
AJAX Compiled from “AJAX Programming” [Sang Shin]
Advertisements

Introduction to Ajax Introduction to Ajax Sang Shin Java Technology Architect Sun Microsystems, Inc.
9. AJAX & RIA. 2 Motto: O! call back yesterday, bid time return. — William Shakespeare.
AJAX : Technology Evaluation Bryan Jones Philip Lim Fred Lo Warren Wang.
6/3/2015eBiquity1 Tutorial on AJAX Anubhav Kale (akale1 AT cs DOT umbc DOT edu)
AJAX Presented by: Dickson Fu Dimas Ariawan Niels Andreassen Ryan Dial Jordan Nielson CMPUT 410 University of Alberta 2006.
WHAT IS AJAX? Zack Sheppard [zts2101] WHIM April 19, 2011.
1 JavaScript & AJAX CS , Spring JavaScript.
A closer look Dynamic Webpages Jessica Meyerson March 1, 2011.
Interactive Web Application with AJAX
Ajax (Asynchronous JavaScript and XML). AJAX  Enable asynchronous communication between a web client and a server.  A client is not blocked when an.
Ajax Basics The XMLHttpRequest Object. Ajax is…. Ajax is not…. Ajax is not a programming language. Ajax is not a programming language. Ajax is a methodology.
1 Fall 2006 Florida Atlantic University Department of Computer Science & Engineering COT 6930 Advanced Internet Programming Dr. Roy Levow Day 1.
11/13/2007 A synchronous J avaScript A nd X ML Gloria Law Joshua Mahaz.
Lecture 12 – AJAX SFDV3011 – Advanced Web Development Reference: 1.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
AJAX Without the “J” George Lawniczak. What is Ajax?
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
AJAX and Java ISYS 350. AJAX Asynchronous JavaScript and XML: – Related technologies: JavaScript, Document Object Model, XML, server-side script such.
Intro to Ajax Fred Stluka Jan 25, /25/2006Intro to AjaxFred Stluka2 What is Ajax? "Asynchronous JavaScript and XML" New name for an old technique:
06/10/2015AJAX 1. 2 Introduction All material from AJAX – what is it? Traditional web pages and operation Examples of AJAX use Creating.
Instructor, Dr. Khalili Bahram Jeevan Kumar Gogineni.
Ajax. What is Ajax? Ajax = Asynchronous JavaScript and XML A group of interrelated Web development techniques used for creating interactive Web applications.
Random Logic l Forum.NET l AJAX Behind the buzz word Forum.NET ● January 23, 2006.
Ajax In Action The Journey into Web2.0 Presented by Eric Pascarello.
Building Rich Web Applications with Ajax Linda Dailey Paulson IEEE – Computer, October 05 (Vol.38, No.10) Presented by Jingming Zhang.
Lecture 9: AJAX, Javascript review..  AJAX  Synchronous vs. asynchronous browsing.  Refreshing only “part of a page” from a URL.  Frameworks: Prototype,
AJAX محمد احمدی نیا 2 Of 27 What is AJAX?  AJAX = Asynchronous JavaScript and XML.  AJAX is not a new programming language, but.
AJAX Compiled from “AJAX Programming” [Sang Shin] (Asynchronous JavaScript and XML)
Fall 2006 Florida Atlantic University Department of Computer Science & Engineering COP 4814 – Web Services Dr. Roy Levow Part 2 – Ajax Fundamentals.
Ajax. –Asynchronous JavaScript and XML –Umbrella term for technologies that often: Use client-side scripting for layout and formatting Use less than full.
Asynchronous Javascript And XML AJAX : an introduction UFCEUS-20-2 : Web Programming.
Ajax ( Asynchronous JavaScript + XML ) Information Science and Knowledge Systems: Semantic Web Spring 2006 / Dr. Don Turnbull Presented by David Kim.
CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Address: Course Page:
Ajax for Dynamic Web Development Gregory McChesney.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Event Handling & AJAX IT210 Web Systems. Question How do we enable users to dynamically interact with a website? Answer: Use mouse and keyboard to trigger.
AJAX and REST. Slide 2 What is AJAX? It’s an acronym for Asynchronous JavaScript and XML Although requests need not be asynchronous It’s not really a.
AJAX AJAX Asynchronous JavaScript and XML --- MADHAVI
Introduction to AJAX Sue Brandreth. What is Ajax?
AJAX – Asynchronous JavaScript And XML By Kranthi Kiran Nuthi CIS 764 Kansas State University.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
1 AJAX. AJAX – Whatzit? Asynchronous (content loading)‏ Javascript (logic & control)‏ And XML (request handling)‏
Ajax! Ajax Programming Ajax! Ajax Programming. Ajax! Ajax Programming Take a look at a typical desktop application (Spreadsheet app, etc.) The program.
A New Way To Web Applications Development Tin Htut Htut Naing Oo Myanmar Information Technology.
CITA 330 Section 10 Web Remoting Techniques. Web Remoting Web Remoting is a term used to categorize the technique of using JavaScript to directly make.
Open Solutions for a Changing World™ Eddy Kleinjan Copyright 2005, Data Access WordwideNew Techniques for Building Web Applications June 6-9, 2005 Key.
Ajax & Client-side Dynamic Web Gunwoo Park (Undergraduate)
Introduction to AJAX Pat Morin COMP Outline What is AJAX? – History – Uses – Pros and Cons An XML HTTP Transaction – Creating an XMLHTTPRequest.
JavaScript and Ajax (Ajax Tutorial)
CSE 154 Lecture 11: AJAx.
Not a Language but a series of techniques
AJAX and REST.
XMLHttp Object.
AJAX.
Asynchronous Java script And XML Technology
AJAX.
CSE 154 Lecture 11: AJAx.
CSE 154 Lecture 22: AJAX.
AJAX Robin Burke ECT 360.
JavaScript & AJAX.
ISC440: Web Programming 2 AJAX
Introduction to AJAX Sue Brandreth.
JavaScript & jQuery AJAX.
Chengyu Sun California State University, Los Angeles
AJAX CS-422 Dick Steflik.
Intro to Ajax Fred Stluka Jan 25, 2006.
Chengyu Sun California State University, Los Angeles
Chengyu Sun California State University, Los Angeles
Presentation transcript:

 AJAX technology  Rich User Experience  Characteristics  Real live examples  JavaScript and AJAX  Web application workflow model – synchronous vs asynchronous  XMLHttpRequest object  Response data processing

 Compare desktop application against web page  The desktop app responses interactively and quickly  Gives feedback instantly (doesn’t reload every time)  More natural  The web site reloads every time to provide the user with response

 Workflow is "Click, wait, load"  All events that need feedback need the page to reload from server  Synchronous request/response model  Page-driven  Logic is determined by server  Very hard to become flexible

 Interrupts user activity while loading  Looses context of operation during loading (e.g..: scrolled position)  No instant feedback  Constrained by HTML

 Rich Internet Applications can be developed as:  Applet  Flash  Java WebStart  DHTML  DHTML with hidden IFrame  AJAX

 DHTML with asynchronous communication capability via XMLHttpRequest  Most viable RIA technology  All browsers support it, although there are some incompatibilities  no plug-ins or additional code required  Many components developed, using it

 Applications that take advantage of AJAX:  Google maps  Google Suggests  NetFlix  Gmail  Yahoo Maps  Many more emerging

 The user can drag the map with the mouse, instead of clicking (compare with )  The action that triggers loading of images is moving the map around  The map data is downloaded asynchronously via AJAX  Other parts of the page remain the same  No loss of operation context

Classic web application (synchronous) AJAX web application (asynchronous) User operation is interrupted while fetching data User operation is interrupted while fetching data User operation is NOT interrupted while fetching data User operation is NOT interrupted while fetching data

 JavaScript object  Supported by Mozilla, Opera, Safari,  Supported by IE as ActiveX control  Communicates with server via GET/POST requests  Performs in the background asynchronous communication with the server  Does not interrupt user workflow

 Server remains the same  Receives standard GET/POST request  Has few constrains:  Requests are more frequent  Response content type can be:  text/xml  text/plain  text/json  text/javascript

 open ("HTTP Method", "URL", "synchronous or asynchronous);  Assigns HTTP method, request URL and mode  send (content);  Sends the request  abort();  Terminates request  getAllResponseHeaders ();  Returns all HTTP headers of the response (name + value) as string

 getResponseHeader ("header");  Returns value of the specified header  setRequestHeader ("name", "value");  Sets request header before sending the request

 onreadystatechange  JavaScript event handler function, that fires at each state change  readyState  Current status of the request  0 – uninitialized  1 – loading  2 – loaded  3 – interactive (some data was received  4 – complete  Status  The HTTP status returned from server

 responseText  String, containing data, returned from server  responseXML  XML document tree, containing the data from the server  statusText  Status text, returned from server

 Server side - AJAX applications use the same server-side schemes  Subject to same security issues as regular web application  Cross-site scripting  Injection flaw

 Client side  The JavaScript code is visible to the user  Can be used for inferring weaknesses of server security, unless obfuscation or compression is used  The code is downloaded from server and executed at client side  Can compromise client by mal-intended code  JavaScript code is constrained by the sandbox model

 When user is using Ajax application the actions taken do not update the browser history  When pressing back or refresh buttons the state is lost  Page fragment identifier is the part of the URL after the # sign  We can set the page URL changing only the page fragment identifier  Doesn’t reload the page  Affects history

 Although the page-fragment solution does work for bookmarks it is still no good for back/forward buttons  We can use hidden iframes  When there is frame in the page the back/forward buttons control them  The frame content can control the overall page  Mixing the iframe and the page fragment approaches may lead to problems!