AJAX.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Introduction to Ajax.
Advertisements

AJAX Technologies KAUNAS UNIVERSITY OF TECHNOLOGY MODULE: INFORMATION TECHNOLOGY GROUP: IF - 4/9 GROUP: VENTILIATORIAI
AJAX Presented by: Dickson Fu Dimas Ariawan Niels Andreassen Ryan Dial Jordan Nielson CMPUT 410 University of Alberta 2006.
Ajax Dr Jim Briggs WEBP Ajax1. 2 Ajax Asynchronous JavaScript And XML Method of creating more interactive web applications Moves more of the application.
WHAT IS AJAX? Zack Sheppard [zts2101] WHIM April 19, 2011.
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.
Chris Pinski.  History  What is Ajax  Who uses Ajax  Underlying Technologies  SE Aspect  Common Problems  Conclusion.
Introduction to AJAX AJAX Keywords: JavaScript and XML
JavaScript & jQuery the missing manual Chapter 11
CS 4720 RESTfulness and AJAX CS 4720 – Web & Mobile Systems.
Ruth Betcher Ruth Christie
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.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
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.
Building Rich Web Applications with Ajax Linda Dailey Paulson IEEE – Computer, October 05 (Vol.38, No.10) Presented by Jingming Zhang.
Fall 2006 Florida Atlantic University Department of Computer Science & Engineering COP 4814 – Web Services Dr. Roy Levow Part 2 – Ajax Fundamentals.
HTML Form Widgets. Review: HTML Forms HTML forms are used to create web pages that accept user input Forms allow the user to communicate information back.
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.
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.
Scripting Languages Client Side and Server Side. Examples of client side/server side Examples of client-side side include: JavaScript Jquery (uses a JavaScript.
AJAX. Overview of Ajax Ajax is not an API or a programming language Ajax aims to provide more responsive web applications In normal request/response HTTP.
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
What is AJAX ? Asynchronous Javascript and XML. Not a stand-alone language or technology. It is a technique that combines a set of known technologies in.
Introduction to AJAX Sue Brandreth. What is Ajax?
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?
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.
Ajax SUBMITTED BY NITIN RAMANI C.S.E 3 rd Y 5 th S R.N CS SUBMITTED TO PRO. PUSHPARAJ PATEL SIR.
National College of Science & Information Technology.
November 21, 2016 Web Technologies in the IUB Libraries’ Web Site AJAX, More than Scrubbing the Tub: Doug Ryner & Tadas Paegle.
Section 10.1 Define scripting
What is AJAX ? Asynchronous Javascript and XML.
JavaScript and Ajax (Ajax Tutorial)
AJAX and REST.
Application with Cross-Platform GUI
Asynchronous Java script And XML Technology
Haritha Dasari Josue Balandrano Coronel -
Whether you decide to use hidden frames or XMLHttp, there are several things you'll need to consider when building an Ajax application. Expanding the role.
AJAX.
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
AJAX Robin Burke ECT 360.
ISC440: Web Programming 2 AJAX
Introduction to AJAX Sue Brandreth.
JavaScript.
JavaScript & jQuery AJAX.
MIS JavaScript and API Workshop (Part 3)
Introduction to AJAX and JSON
WPS - your story so far Seems incredible complicated, already
Introduction to World Wide Web
JavaScript CS 4640 Programming Languages for Web Applications
AJAX CS-422 Dick Steflik.
Intro to Ajax Fred Stluka Jan 25, 2006.
An Introduction to JavaScript
DR. JOHN ABRAHAM PROFESSOR UTPA
Advanced Concepts and AJAX
Introduction to AJAX and JSON
Ajax and JSON Jeremy Shafer Department of MIS Fox School of Business
Ajax and JSON Jeremy Shafer Department of MIS Fox School of Business
Web Application Development Using PHP
Presentation transcript:

AJAX

Traditional Model

Limitations of Classic Web Applications Here the browser itself is responsible for initiating requests to the web server. The server does some processing like Retrieving data or Calculations and returns another HTML page containing the results.

Disadvantages User experience is not very good. User has to wait while the server is doing its process. This is repeated for each transaction between the user and the server.

AJAX Asyncronous Javascript and XML

AJAX Web Application Model

How AJAX is Different AJAX is an approach to web interaction. This approach involves transmitting small amount of information to and from the server. It gives the user the most responsive experience.

Ajax model provides an intermediate layer to handle communication or requests from the browser to the server. This intermediate layer is called the Ajax engine. The Ajax engine is just a JavaScript object or function that is called whenever a request is made to the server.

In traditional model each link makes a call to the server independently. In Ajax each link in the page makes a call to the Ajax Engine which schedules and executes the request.

The response from the server is received by the Ajax engine. The output is parsed by the Ajax engine and updated on the user interface. The data can be plain text, XML, JSON or any other data format.

The request is done asynchronously. That is the client will not wait for the response from the server to continue its process. Since this process involves transferring less information, the user interface updates are faster.

AJAX Principles Key principles of a good Ajax application Minimal traffic: Ajax application should send and receive as little information to and from the server to minimize the traffic between the client and the server.

No surprises: Whatever user interaction you choose, be consistent, so the user knows what to do next. Like drag and drop, double clicking, etc,.

Established conventions: Don’t waste time inventing new user interface models, that the user will be unfamiliar with. Use traditional web application and desktop application models, so that it is easy for the user to learn and work.

No distractions: Avoid unnecessary and distracting page elements such as looping animations, blinking page sections. This leads to distraction from what the user really wants to do.

Accessibility: Consider which users will be accessing your Ajax application the most. Make sure you know before hand who your users will be and plan for old and new browsers or any other software used by your users.

Avoid entire page downloads: All server communication should be done using the Ajax engine. Don’t spoil the user experience by downloading small amounts of data in one place and entire page downloads in another.

User first: Design the Ajax application with its users in mind. See to it that the required functionalities work properly. Don’t give importance to providing cool effects.

Mainly it should be Useful Usable and Efficient.

Technologies Behind AJAX Client Side HTML / XHTML CSS - privides stylistic format to XHTML DOM – Dynamic updating of loaded page XML – Data exchange format

XSLT – Transforms XML to XHTML XMLHTTP – Primary communication broker JavaScript – Scripting language to program Ajax Engine

Server Side: Java .Net PHP Ruby, etc,.

Who is Using AJAX: Google Suggest Gmail Gogle Maps Flikr Facebook - Yahoo News

Ajax Communication Techniques The Hidden Frame Technique Here we create a frameset that is used for client-server communication. One frame in the frameset will be hidden. You can hide a frame by setting its width or height to 0 pixels to remove it from the display.

The Hidden Frame Technique Pattern

Hidden frame technique follows the four step pattern. There is a visible frame and a hidden frame User interacts with the visible frame. When user performs some action on the visible frame requesting data from the server, a JavaScript function is called from the hidden frame.

Step 2: Inside the JavaScript function in the hidden frame we make a request to the server.

Step 3: Server processes the request from the hidden frame. A response is sent from the server to the hidden frame. This response is another web page.

The returned web page contains - data requested - and JavaScript onload event handler to transfer data to the visible frame.

Step 4: The onload event handler in the returned web page calls a function in the visible frame and gives the data to the function. The function in the visible frame can do whatever with the data or display the data.

Hidden Frame Get Request Implementation

Hidden Frame Post Request POST request is sent when data needs to be sent to the server. Some browsers can handle only 512 KB of query string information through GET request. GET can send more if browser supports.

POST can send up to 2 GB of information. Usually we send POST request using a Form wit action attribute. A form submission’s output usually will be a new URL /page which is not desired.

So you say that the output of the form submission should be the hidden frame. This is done using the target attribute of the form. Hidden Frame Post Request Implementation

Hidden Iframe Technique Iframes can be used as hidden frames and used to send requests to the server. Iframe is the same as frame. But it can be placed in a non-frameset HTML page.

So Iframe can be placed in any part of the HTML page. Any number of Iframes can be created in an HTML page. An Iframe can also be created dynamically using javascript .

Two ways of creating IFrames Embed the iframe inside the HTML page using <iframe> tag. Dynamically create the iframe using javascript.

I Method : Embedding Iframe In the first method we will use the iframe by embedding it using <iframe> tag. Here we use GET method. Example

II Method : Dynamic Iframe In the second method we dynamically create the iframe using a javascript. Here we use GET method. Example

Advantages and Disadvantages of Hidden Frames This technique has been in use for many years. It is still used in many Ajax applications.

Advantages: You can maintain browser history. So users can still use the back and forward buttons of the browser. Since main page does not change, the back and forward buttons browse through the history.

Disadvantages: We have very little info about what happens behind the scenes. You just hope that the proper page is returned when you press the forward and back button. If the hidden page fails to load, the user does not come to know of the failure.