6/3/2015eBiquity1 Tutorial on AJAX Anubhav Kale (akale1 AT cs DOT umbc DOT edu)

Slides:



Advertisements
Similar presentations
Dodick Zulaimi Sudirman Lecture 12 Introduction to AJAX Pengantar Teknologi Internet Introduction to Internet Technology.
Advertisements

University of Virginia 1 Modern Web Application Development Overview of some newer web applications methods Web 2.0 Ajax fundamentals Ruby on Rails.
9. AJAX & RIA. 2 Motto: O! call back yesterday, bid time return. — William Shakespeare.
AJAX Presented by: Dickson Fu Dimas Ariawan Niels Andreassen Ryan Dial Jordan Nielson CMPUT 410 University of Alberta 2006.
Cloud Computing Lecture #7 Introduction to Ajax Jimmy Lin The iSchool University of Maryland Wednesday, October 15, 2008 This work is licensed under a.
Does Ajax suck? CS575 Spring 2007 Chanwit Suebsureekul.
1 JavaScript & AJAX CS , Spring JavaScript.
Using AJAX Galip Aydin, Ahmet Sayar, and Marlon Pierce Community Grids Lab Indiana University.
Chapter 6 DOJO TOOLKITS. Objectives Discuss XML DOM Discuss JSON Discuss Ajax Response in XML, HTML, JSON, and Other Data Type.
The Document Object Model (DOM) & Asynchronous Javascript And XML (AJAX) : an introduction UFCEKG-20-2 : Data, Schemas and Applications.
Introduction to AJAX AJAX Keywords: JavaScript and XML
CGI and AJAX CS-260 Dick Steflik.
AJAX Chat Analysis and Design Rui Zhao CS SPG UCCS.
JavaScript & jQuery the missing manual Chapter 11
1 Ajax. 2 What’s Ajax? AJAX is a combination of a few technologies that has come together in the past few years AJAX used to be an acronym for Asynchronous.
Ruth Betcher Ruth Christie
XForms: A case study Rajiv Shivane & Pavitar Singh.
11/13/2007 A synchronous J avaScript A nd X ML Gloria Law Joshua Mahaz.
Lecture 12 – AJAX SFDV3011 – Advanced Web Development Reference: 1.
AJAX By Steven Hernandez Research Analyst NIATEC.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
Yahoo! User Interface (YUI) Library Natly Mekdara.
 2008 Pearson Education, Inc. All rights reserved Ajax-Enabled Rich Internet Applications.
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.
Copyright 2007 Adobe Systems Incorporated. 1 ColdFusion 8 : Advanced AJAX Development Rakshith N Computer Scientist Jan 02, 2008.
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.
Understanding AJAX Hype, Hope, Hurt and Help for the Web MJTS May 4th, 2006 _________________________ Terence Conklin, Conklin Systems
Random Logic l Forum.NET l AJAX Behind the buzz word Forum.NET ● January 23, 2006.
Ventsislav Popov Crossroad Ltd.. 1. What is AJAX?  AJAX Concept  ASP.NET AJAX Framework 2. ASP.NET AJAX Server Controls  ScriptManager, UpdatePanel.
Telerik Software Academy ASP.NET Web Forms Telerik Software Academy ASP.NET Web Forms.
Lecture 9: AJAX, Javascript review..  AJAX  Synchronous vs. asynchronous browsing.  Refreshing only “part of a page” from a URL.  Frameworks: Prototype,
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.
Web Technology Introduction AJAXAJAX. AJAX Outline  What is AJAX?  Benefits  Real world examples  How it works  Code review  Samples.
INNOV-7: Building a Richer UI for the Browser Chris Skeldon Senior Solution Consultant.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
 AJAX – Asynchronous JavaScript and XML  Ajax is used to develop fast dynamic web applications  Allows web pages to be updated asynchronously by transferring.
AJAX Asynchronous JavaScript and XML 1. AJAX Outline What is AJAX? Benefits Real world examples How it works 2.
Summer 2007 Florida Atlantic University Department of Computer Science & Engineering COP 4814 – Web Services Dr. Roy Levow Part 1 – Introducing Ajax.
SE-2840 Dr. Mark L. Hornick 1 Introduction to Ajax Asynchronous Javascript And XML.
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.
JavaScript & Introduction to AJAX
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.
 AJAX technology  Rich User Experience  Characteristics  Real live examples  JavaScript and AJAX  Web application workflow model – synchronous vs.
AJAX CS456 Fall Examples Where is AJAX used? Why do we care?
PHP and AJAX. Servers and Clients For many years we tried to move as much as possible to the server. Weak clients, poor bandwidth, browser compatibility..
Overview Web Technologies Computing Science Thompson Rivers University.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
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.
NCCUCS 軟體工程概論 Lecture 5: Ajax, Mashups April 29, 2014.
AJAX. Objectives Understand and apply AJAX Using AJAX in DOJO library.
Open Solutions for a Changing World™ Eddy Kleinjan Copyright 2005, Data Access WordwideNew Techniques for Building Web Applications June 6-9, 2005 Key.
INNOV-16: Rich User Interface for the Web???? AJAX to the Rescue Ken Wilner VP of Technology Progress Software.
JavaScript and Ajax (Ajax Tutorial)
CSE 154 Lecture 11: AJAx.
Not a Language but a series of techniques
CS 371 Web Application Programming
AJAX.
CSE 154 Lecture 11: AJAx.
CSE 154 Lecture 22: AJAX.
JavaScript & jQuery AJAX.
AJAX CS-422 Dick Steflik.
Presentation transcript:

6/3/2015eBiquity1 Tutorial on AJAX Anubhav Kale (akale1 AT cs DOT umbc DOT edu)

6/3/2015eBiquity2 Overview  Introduction  Motivation  Remote Scripting  Example  Issues  Applications

6/3/2015eBiquity3 Introduction  Stands for “Asynchronous JavaScript and XML “  Development technique for creating interactive web applications  Not a new Technology but more of a Pattern

6/3/2015eBiquity4 Motivation for AJAX  WebPages always RELOAD and never get UPDATED  Users wait for the entire page to load even if a single piece of data is needed  Single request/response restrictions

6/3/2015eBiquity5 Components HTML (or XHTML) and CSS  Presenting information Document Object Model  Dynamic display and interaction with the information XMLHttpRequest object  Retrieving data ASYNCHRONOUSLY from the web server. Javascript  Binding everything together

6/3/2015eBiquity6 Uses of AJAX Paradigm  Real-Time Form Data Validation Form data that require server-side validation can be validated in a form “before” the user submits it.  Auto completion A specific portion of form data may be auto-completed as the user types.  Master Details Operations Based on a client event, an HTML page can fetch more detailed information on data without refreshing the page.  Sophisticated UI Controls Controls such as tree controls, menus, and progress bars may be provided without page refreshes.

6/3/2015eBiquity7 Web Application and AJAX

6/3/2015eBiquity8 Request Processing

6/3/2015eBiquity9 Asynchronous processing - XMLHttpRequest  Allows to kick off an HTTP request in background  Callbacks kick back into Javascript Code  Supported in all standard browsers  Similar to “image” object Dynamically change the URL of the image source without using a page refresh

6/3/2015eBiquity10 Example using XMLHttpRequest – Step 1  Create Object Worry about Browser Specific Creation !  Example var requester = new XMLHttpRequest(); var requester = new ActiveXObject("Microsoft.XMLHTTP");

6/3/2015eBiquity11 Using XMLHttpRequest – Step 2  Transferring data to Server Open() to initialize connection to Server Send() to send the actual Data  Example requester.open("POST", "/query.cgi")

6/3/2015eBiquity12 What happens after sending data ?  XMLHttpRequest contacts the server and retrieves the data Can take indeterminate amount of time  Event Listener to determine when the object has finished retrieving data Specifically listen for changes in “readyState” variable

6/3/2015eBiquity13 Using XMLHttpRequest – Step 3  Set up a function to handle the event when the readyState is changed to 4 0 – Uninitialised 1 – Loading 2 – Loaded 3 – Interactive 4 – Completed  Example requester.onreadystatechange = stateHandler;

6/3/2015eBiquity14 Using XMLHttpRequest – Step 3 Contd  Check whether the XMLHttpRequest object successfully retrieved the data, or was given an error code  Example if (requester.readyState == 4) { if (requester.status == 200) { success(); } }

6/3/2015eBiquity15 Using XMLHttpRequest – Step 4  Parse and display data responseXML  DOM-structured object responseText  One complete string  Example var nameNode = requester.responseXML.getElementsByTagName("na me")[0]; var nameTextNode = nameNode.childNodes[0]; var name = nameTextNode.nodeValue;

6/3/2015eBiquity16 Interaction between Components

6/3/2015eBiquity17 Problems  Breaking the “back” button Browsers record static page visits Invisible IFrames can invoke changes that populate the history  Changing parts of the page unexpectedly Should only ever occur in narrowly defined places  Bookmarking a particular “State” becomes difficult Javascript generates the page NOT server

6/3/2015eBiquity18 Problems Contd  Increase in the code size on browser Response time affected  Difficult to debug Processing logic both in client and server  Viewable Source Open to hackers or plagiarism  Server Load Asynchronous request is a “heavy” operation

6/3/2015eBiquity19 Role of AJAX in Web 2.0  Core features of Web 2.0 Web as a Platform Collective Intelligence Above the level of Single Device Services, not packaged software Rich User experiences  AJAX Assists in User Interfaces Less machine readable / linkable webpages

6/3/2015eBiquity20 AJAX as of today  Frameworks Client-side  DOGO  BackBase  AJForm Server-side  JSON (Javascript Object Notation)  Struts – Layout  ComfortASP.NET Many more at   Browsers IE, Mozilla, Galeon, Firefox

6/3/2015eBiquity21 Who is using AJAX ?

6/3/2015eBiquity22 Reading Material  Overview  Original Article from Adaptive path  Examples  AJAX based Applications  Issues/Problems

6/3/2015eBiquity23 Thank You  Questions ?