Academic Tutorials



English | French | Portugese | German | Italian
Home Advertise Payments Recommended Websites Interview Questions FAQs
News Source Codes E-Books Downloads Jobs Web Hosting
Chats


HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
CSS 1.0
CSS 2.0
HLML
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
CVS
Python
Apple Script
PL/SQL Tutorial
SQL Server
PHP
.NET (dotnet)
Microsoft.Net
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
VC++
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Photoshop Tutorial
Gimp Tutorial
Matlab
Gnuplot Programming
GIF Animation Tutorial
Scientific Visualization Tutorial
Graphics
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Weblogic Tutorial
SEO
Web Site Hosting
Domain Name
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Eclipse
J2ME
JBOSS
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Cobol
Assembly Language
Mainframe
Forth Programming
Lisp Programming
Pascal
Delphi
Fortran
OOPs
Data Warehousing
CGI Programming
Emacs Tutorial
Gnome
ILU
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills
Database Tutorials
Oracle
MySQL
Operating System
BSD
Symbian
Unix
Internet
IP-Masquerading
IPC
MIDI
Software Testing
Testing
Firewalls
SAP Module
ERP
ABAP
Business Warehousing
SAP Basis
Material Management
Sales & Distribution
Human Resource
Netweaver
Customer Relationship Management
Production and Planning
Networking Programming
Corba Tutorial
Networking Tutorial
Microsoft Office
Microsoft Word
Microsoft Outlook
Microsoft PowerPoint
Microsoft Publisher
Microsoft Excel
Microsoft Front Page
Microsoft InfoPath
Microsoft Access
Accounting
Financial Accounting
Managerial Accounting
Network Sites


Introduction to AJAX

Previous Next



What is AJAX?
AJAX stands for Asynchronous Java and XML

Ajax is a set of technologies, supported by a web browser, including following elements:
 

  • Html and CSS for presenting.
  • JavaScript (ECMAScript) for local processing, and DOM (Document Object Model) to access data inside the page or to access element of XML file read on the server (with the getElementByTagName method for example)...
  • The XMLHttpRequest class reads or sends data on the server asynchronously.




Why We Use AJAX?

  • AJAX is the acronym for Asynchronous Java and XML


  • Unlike older approache, which require reloading of the entire page with every postback, Ajax uses the JavaScript DOM, the XMLHttpRequest object, XML, and CSS to download and displays just the content that needs to change.


  • Ajax rich clients in the realworld


  • The key elements of Ajax


  • Loading data asynchronously using XML technologies


  • Third-party libraries and frameworks


  • Working with the server side


  • Security and performance with Ajax



How does AJAX works?

Ajax uses a programming model with displays and events. These events are user actions, they call functions associated to element of the web page.
Interactive is achieved with forms and buttons. DOM allows to link elements of the page with actions and also to extract data from XML files provided by the server.
To get data on the server, XMLHttpRequest provides two methods is as follows:
- open: create a connection.
- send: send a request to the server.
Data furnished by the server will be found in the attributes of the XMLHttpRequest object:
- responseXml   for a Xml file or
- responseText   for a simple text.

Take note that a new XMLHttpRequest object has to be created for each new files to load.

We have to wait for the data to be available to process it, and in this purpose, the state of availabile of data is given by the readyState attribute of XMLHttpRequest.

States of readyState follow :
0: not initialized.
1: connection etablished.
2: request received.
3: answer in process.
4: finished.



Difference between AJAX and DHTML

Dhtml has same purpose as Ajax, a set of standards:
- Html,
- Css,
- JavaScript.

  • Dhtml allows to change the display of the page from text typed by the user or from user commands.


  • Ajax allows also to send request asynchronously and load data from the server.


  • The Purpose of Using AJAX

    The purpose of Ajax is that of giving illusion that websites are responsive. It achieves this by processing requests which involves the sending and receiving of small packets of data without refreshing the web browser. Ajax is founded on:

    • XHTML - A rigid subset of html which is used to mark-up or to style the information.
    • DOM - The Document Object Model which can be accessed by the client browser.
    • XMLHttpRequest - The object which is used to exchange the information asynchronously.
    • XML - The format which is used to transfer the data from the server to the client.

    AJAX(Programming)

    The Ajax technique use a combination of:

    • XHTML (or HTML) and CSS, for marking up and styling information.
    • The DOM accessed with a client-side scripting language, especially ECMAScript implementation such as JavaScript and JScript, to dynamically displays and interact with the information presented.
    • The XMLHttpRequest is a object which is used to exchange data asynchronously with the web server. In some Ajax framework and in certain situations, an IFrameobject is used instead of the XMLHttpRequest object to exchange data with the web server, and in other implementations, dynamically added <script> tag may be used.
    • XML is sometimes used as the format for transferring data between the client and server , although any format will work, including preformatted HTML, plain text, EBML These files may be created dynamically by some form of the server-side scripting.

    Advantages Of AJAX

    » Bandwidth utilization

    By generating the HTML locally within the browser, and only bringing down JavaScript calls and the actual data from the Ajax web pages can appear to load quickly since the payload coming down is much smaller in size. An example of this technique is a large results set where multiple pages of data exist. With Ajax, the HTML of the page, e.g., a table control and related TD and TR tag can be produced locally in the browser and not brought down with the first page of data. If the user click other pages, only the data is brought, and populated into the HTML generated in the browser.

    » Interactivity

    Ajax application is mainly executed on the user's machine, by manipulating the current page within their browser using document object model methods. Ajax can be used for a multitude of tasks such as updating or deleting records; expanding web forms; returning simple search queries; or editing category trees�all without the requirement to fetch a full page of HTML each time a change is made. Generally only small requests need to be sent to the server, and relatively short responses are sent back. This permits the development of more interactive application featuring more responsive user interfaces due to the use of DHTML techniques

    Disadvantages Of AJAX

    » Usability: back button and bookmarks

    Web applications that utilize Ajax may break the expected behavior of the browser back button. The difference between returning to a previous state of the current, dynamically modified page versus going back to a previous static page might be subtle one, but users generally expect that clicking the back button in web applications will move their browser to the last page it loaded, and in Ajax applications this might not be the case.

    Another issue is that dynamic web pages update make it difficult for a user to bookmark a particular state of the application. Solutions to this problem exist, many of which use the URL fragment identifier (the portion of a URL after the '#' ) to keep track of, and allow users to return to, the application in a given state. This is possible because many browsers allow JavaScript to update the fragment identifier of the URL dynamically, so that Ajax applications can maintain it as the user changes the application's state. This solution also improves back-button support. It is, however, not a complete solution.

    » Response-time concerns

    T he interval between user request and server response or the network latency needs to be considered carefully during Ajax development. Without clear feedback to the user , smart preloading of data and proper handling of the XMLHttpRequest object, user might experience delay in the interface of the web application, something which users might not expect or understand. Additionally, when an entire page is rendered there is a brief moments of re-adjustment for the eye when the content changes. The lack of this re-adjustment with smaller portions of the screen changing makes the latency more apparent. The use of visual feedback (such as throbbers) to alert the user of background activity and/or preloading of content and data are often suggested solutions to these latency issues. In general the potential impact of latency has not been "solved" by any of the open source Ajax toolkits and framework available today, such as the effect of latency variance over time.

    » What You Should Already Know?

    Before you continue you should have some basic understanding of the following language:

    • HTML / XHTML
    • CSS
    • XML
    • JavaScript

    If you want to study this subject first, find the tutorials on our Home page.


    Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
    • blinkbits
    • BlinkList
    • blogmarks
    • co.mments
    • connotea
    • del.icio.us
    • De.lirio.us
    • digg
    • Fark
    • feedmelinks
    • Furl
    • LinkaGoGo
    • Ma.gnolia
    • NewsVine
    • Netvouz
    • RawSugar
    • Reddit
    • scuttle
    • Shadows
    • Simpy
    • Smarking
    • Spurl
    • TailRank
    • Wists
    • YahooMyWeb

    Previous Next

    Keywords: ajax tutorial, ajax grips, ajax amsterdam, ajax ma inc, mapping ajax framework, town of ajax, yahoo map request ajax, php ajax, ajax netwerk, ajax tools

    HTML Quizzes
    HTML Quiz
    XHTML Quiz
    CSS Quiz
    TCP/IP Quiz
    CSS 1.0 Quiz
    CSS 2.0 Quiz
    HLML Quiz
    XML Quizzes
    XML Quiz
    XSL Quiz
    XSLT Quiz
    DTD Quiz
    Schema Quiz
    XForms Quiz
    XSL-FO Quiz
    XML DOM Quiz
    XLink Quiz
    XQuery Quiz
    XPath Quiz
    XPointer Quiz
    RDF Quiz
    SOAP Quiz
    WSDL Quiz
    RSS Quiz
    WAP Quiz
    Web Services Quiz
    Browser Scripting Quizzes
    JavaScript Quiz
    VBScript Quiz
    DHTML Quiz
    HTML DOM Quiz
    WMLScript Quiz
    E4X Quiz
    Server Scripting Quizzes
    ASP Quiz
    PERL Quiz
    SQL Quiz
    ADO Quiz
    CVS Quiz
    Python Quiz
    Apple Script Quiz
    PL/SQL Quiz
    SQL Server Quiz
    PHP Quiz
    .NET (dotnet) Quizzes
    Microsoft.Net Quiz
    ASP.Net Quiz
    .Net Mobile Quiz
    C# : C Sharp Quiz
    ADO.NET Quiz
    VB.NET Quiz
    VC++ Quiz
    Multimedia Quizzes
    SVG Quiz
    Flash Quiz
    Media Quiz
    SMIL Quiz
    Photoshop Quiz
    Gimp Quiz
    Matlab Quiz
    Gnuplot Programming Quiz
    GIF Animation Quiz
    Scientific Visualization Quiz
    Graphics Quiz
    Web Building Quizzes
    Web Browsers Quiz
    Web Hosting Quiz
    W3C Quiz
    Web Building Quiz
    Web Quality Quiz
    Web Semantic Quiz
    Web Careers Quiz
    Weblogic Quiz
    SEO Quiz
    Web Site Hosting Quiz
    Domain Name Quiz
    Java Quizzes
    Java Quiz
    JSP Quiz
    Servlets Quiz
    Struts Quiz
    EJB Quiz
    JMS Quiz
    JMX Quiz
    Eclipse Quiz
    J2ME Quiz
    JBOSS Quiz
    Programming Langauges Quizzes
    C Quiz
    C++ Quiz
    Visual Basic Quiz
    Data Structures Using C Quiz
    Cobol Quiz
    Assembly Language Quiz
    Mainframe Quiz
    Forth Programming Quiz
    Lisp Programming Quiz
    Pascal Quiz
    Delphi Quiz
    Fortran Quiz
    OOPs Quiz
    Data Warehousing Quiz
    CGI Programming Quiz
    Emacs Quiz
    Gnome Quiz
    ILU Quiz
    Soft Skills Quizzes
    Communication Skills Quiz
    Time Management Quiz
    Project Management Quiz
    Team Work Quiz
    Leadership Skills Quiz
    Corporate Communication Quiz
    Negotiation Skills Quiz
    Database Quizzes
    Oracle Quiz
    MySQL Quiz
    Operating System Quizzes
    BSD Quiz
    Symbian Quiz
    Unix Quiz
    Internet Quiz
    IP-Masquerading Quiz
    IPC Quiz
    MIDI Quiz
    Software Testing Quizzes
    Testing Quiz
    Firewalls Quiz
    SAP Module Quizzes
    ERP Quiz
    ABAP Quiz
    Business Warehousing Quiz
    SAP Basis Quiz
    Material Management Quiz
    Sales & Distribution Quiz
    Human Resource Quiz
    Netweaver Quiz
    Customer Relationship Management Quiz
    Production and Planning Quiz
    Networking Programming Quizzes
    Corba Quiz
    Networking Quiz
    Microsoft Office Quizzes
    Microsoft Word Quiz
    Microsoft Outlook Quiz
    Microsoft PowerPoint Quiz
    Microsoft Publisher Quiz
    Microsoft Excel Quiz
    Microsoft Front Page Quiz
    Microsoft InfoPath Quiz
    Microsoft Access Quiz
    Accounting Quizzes
    Financial Accounting Quiz
    Managerial Accounting Quiz
    Testimonials | Contact Us | Link to Us | Site Map
    Copyright ? 2008. Academic Tutorials.com. All rights reserved Privacy Policies | About Us
    Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Interview Questions | Discussions World | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Indian Free Ads | Jobs Assist | New Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Webhosting in India | Dedicated Server in India | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Testing Interview Questions | Tests World | The Galz | Top Masala | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World | Important Websites
    Copyright ? 2003-2025 Vyom Technosoft Pvt. Ltd., All Rights Reserved.