PowerPoint Presentation
Upcoming SlideShare
Loading in...5
×
 

PowerPoint Presentation

on

  • 2,284 views

 

Statistics

Views

Total Views
2,284
Views on SlideShare
2,283
Embed Views
1

Actions

Likes
0
Downloads
9
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

PowerPoint Presentation PowerPoint Presentation Presentation Transcript

  • AJAX Live 
  • We appreciate
  • Overview Recalling the web technological terms. The need for AJAX Introducing AJAX Constituent stages in AJAX AJAX Engine setup Building AJAX application Commercial AJAX Frameworks and Toolkits AJAX Gotcha
  • Recalling the web technological terms HTML The World Wide Web is constructed from many millions of individual pages, and those pages are written in a language called HTML. The purpose of this language is to display the content in the browser. Cascading Style Sheets Normal files with HTML understandable style syntax that results colorful display of the content in the browser. JavaScript Scripting code that is embedded in the HTML to make the normal HTML pages more dynamic. Server script Script at the server side that provides results to the clients requests. EX: PHP,ASP,JSP,ASP.NET
  • Framework A Framework in software development is defined as the support structure in which other projects can be developed and organized. Library A library is defined as a collection of related functions and subroutines used to develop software. They are not independent programs. Toolkits A toolkit is generally used in reference to graphical user interface (GUI) toolkits. Basically, a library that is mainly focused on creating a GUI.. Object An object can be thought of a single package contains set of properties,which contains and classify the data,set of methods with which objects can perform actions on the data.
  • The need for AJAX
  • Introducing AJAX Ajax allows you to add to your web application interfaces some of this functionality more commonly seen in desktop applications and often referred to as a rich user experience. To achieve this, Ajax builds an extra layer of processing between the web page and the server. This layer is commonly referred as AJAX Engine (or) AJAX Framework The updating of page elements to reflect the revised information received from the server is also looked after by Ajax, happening dynamically while the page continues to be used.
  • Constituent stages in AJAX XMLHTTPRequest Object Heart of the AJAX Engine and it is responsible to carry the HTTP request to the server asynchronously. Note The XMLHTTPRequest object can generally only make calls to URLs within the same domain as the calling page and cannot directly call a remote server. Talking with the Server XMLHTTPRequest talks with the server with its appropriate methods and properties asynchronously at the backside. Server Response As per the Server script is concerned the request from the XMLHTTPRequest is just another HTTP request. Dealing with the Server Response Once after the AJAX Engine gets notified about the sucessful execution. It modifies the data according to the functionality and keeps in place.
  • AJAX Engine setup XMLHTTPRequest Object Properties and Methods Properties Description Determines which event handler will be called when onreadystatechange the object's readyState property changes Integer reporting the status of the request: 0 = uninitialized readystate 1 = loading 2 = loaded 3 = interactive 4 = completed responseText Data returned by the server in text string form responseXML Data returned by the server expressed as the document object status HTTP status code returned by server statusText HTTP reason phrase returned by server
  • Methods Description abort() Stops the current request GetAllResponseHeaders Returns all headers as a string () getresponseHeader(x) Returns the value of header x as a string specifies the HTTP method (for example, GET or POST), open('method','URL','a') the target URL, and whether the request should be handled asynchronously (If yes, a='True'the default; if no, a='false'.) send(content) HTTP status code returned by server setRequestHeader('x','y') HTTP reason phrase returned by server
  • send() Method Once the XMLHTTPRequest object is prepared with the open() method, it is possible to send the request with the send() method. If the request uses GET method ,then we can use send with a single argument null objectInstance.send(null); If the request uses POST method ,we must feed the content type and the values. objectInstance.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); objectInstance.send(var1=value1&var2=value2);
  • Creating the XMLHTTPRequest Object with Cross Browser solution We can provide the solution for the Cross-Browsers using two ways 1. Using Object Detection function getXMLHTTPRequest() { var request = false; try { request = new XMLHttpRequest(); /* e.g. Firefox */ } catch(err1) { try { vrequest = new ActiveXObject("Msxml2.XMLHTTP"); /* some versions IE */ } catch(err2) { try { request = new ActiveXObject("Microsoft.XMLHTTP"); /* some versions IE */ } catch(err3) { request = false; } } } return request; }
  • 2. Using Browser Detection function getXMLHTTPRequest() { var request = false; if(window.XMLHTTPRequest) { request = new XMLHTTPRequest(); } else { if(window.ActiveXObject) { try { request = new ActiveXObject("Msml2.XMLHTTP"); } catch(err1) { try { request = new ActiveXObject("Microsoft.XMLHTTP"); } catch(err2) { request = false; } } } } return request; }
  • Building AJAX application To-Do List 1. An HTML document forming the basis for the application 2. Javascript routines to create an instance of the XMLHTTPRequest object, construct and send asynchronous server calls 3. A server-side routine to configure and return the required information 4. A callback function to deal with the returned data and use it in the application
  • AJAX Frameworks and Toolkits AJAX Java Frameworks Echo2 Tacos SWATO -Shift Web Application To WebORB AJAX .NET Frameworks AJAX Engine ATLAS Bitkraft MagicAjax AJAX PHP Frameworks AjaxAC AJAX AGENT Cajax Flexible Ajax
  • AJAX Frameworks and Toolkits AJAX Toolkits AJAXLib CPAINT Dojo Prototype Sajax AJAX Flash Frameworks Flex Framework:FABridge
  • AJAX Gotchas Back Button. Entertaining the Users. Don't use AJAX unnecessarily. Less Security. Vigorous testing on different platforms. Ajax Won't Cure a Bad Design. Permission Denied Errors
  • Summary / Take home The combined effect of the issues just described, is to offer a much inferior user experience like desktop applications. Adopt Ajax for usability, not just to strut your stuff. Be careful about conserving resources in the server system, the browser system, and the connection between them. Avoid much animations so that the user can focus on the important things. The functions made available by libraries, greatly simplify some of the trickier programming tasks while developing Ajax applications.
  • Resources Maxkiesler http://www.maxkiesler.com Manageability http://www.manageability.org/ DHTMLgoodies http://www.dhtmlgoodies.com Free programming resources http://www.freeprogrammingresources.com Econsultant http://www.econsultant.com Ajaxian http://ajaxian.com
  • Books
  • Special Thanks CommVault Systems (India) Pvt. Ltd. http://www.commvault.com/ CommVault is a Storage Management, Backup and Disaster Recovery company incorporated in USA with its Global Development Centre in Hyderabad, AP.
  • About us Charter Promote, Develop and Showcase Open Source software. Legal Registered “not for profit” Society under A.P. Societies Reg Act, 2001. Management Governed by Society By-Laws. Led by 7-member board of directors.
  • Contact us website www.twincling.org mailing list groups.yahoo.com/group/twincling forum (software --> twincling) http://www.nabble.com/twincling-15741.html IRC #twincling helpline +91-99496 50605 +91-99499 91585 more info Mr. Kumar S. N. - Public Relations & Strategic Alliances