Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: AJAX.

AJAX: Difference between revisions

From MoodleDocs
No edit summary
 
(11 intermediate revisions by 7 users not shown)
Line 1: Line 1:
'''AJAX (Asynchronous Javascript and XML)''' is a modern web design technique that allows for more interactivity. It describes a new way of working with existing technologies (including [[HTML]], [[Javascript]], [[CSS]] and the ''XMLHttpRequest object'' amongst others) rather than a new piece of technology.
'''AJAX (Asynchronous Javascript and XML)''' is a modern web design technique that allows for more interactivity by making webpages that fetch data in the background and alter themselves without reloading. This makes the website feel much more like an application. AJAX is a new way of working with existing technologies (including HTML, [[Javascript]], [[CSS]] and the ''XMLHttpRequest object'' amongst others) rather than a new piece of technology in itself.


== Ajax in Moodle ==
== Ajax in Moodle ==


Moodle has recently (July 2006) adopted the [[Yahoo! user interface library]] and most future work in this area will  build upon that foundation.
=== YUI framework ===
 
As of July 2006, Moodle has adopted the [[Development:YUI|Yahoo! user interface library]] and most future work in this area will  build upon that foundation.


There are several current projects that make use of these technologies e.g.:
There are several current projects that make use of these technologies e.g.:
Line 10: Line 12:
* [[Student projects/AJAX course format]]
* [[Student projects/AJAX course format]]


=== AJAX renderers ===
As of Moodle 2.0, AJAX output can be generated by creating an ajax renderer class named something like mod_forum_renderer_ajax in the same way and in the same file as the normal renderer. If a script is marked as being an AJAX script by having this line placed at the top of the file (before any other code)
  define('AJAX_SCRIPT', true);
then the AJAX renderer will be used in place of the main one for all components if it exists.


== See also ==
== See also ==


* [[Javascript FAQ]]
* [[Javascript]]
* [[Javascript]]
* [[Unobtrusive javascript]]
* [[Unobtrusive javascript]]
* [[Hijax]]
* [[Hijax]]
* [[Development:Firebug#Debugging_AJAX_with_Firebug|Debugging AJAX with Firebug]]


* [http://www.adaptivepath.com/publications/essays/archives/000385.php ''Ajax: A New Approach to Web Applications'', the original Ajax article by Adaptive Path]
* [http://www.adaptivepath.com/publications/essays/archives/000385.php ''Ajax: A New Approach to Web Applications'', the original Ajax article by Adaptive Path]
Line 22: Line 34:
* [http://www-128.ibm.com/developerworks/web/library/wa-ajaxtop1/?ca=dgr-lnxw01AjaxHype ''Considering Ajax, Part 1: Cut through the hype'' from IBM developerworks]
* [http://www-128.ibm.com/developerworks/web/library/wa-ajaxtop1/?ca=dgr-lnxw01AjaxHype ''Considering Ajax, Part 1: Cut through the hype'' from IBM developerworks]
* [http://en.wikipedia.org/wiki/Ajax_%28programming%29 Wikipedia article on ''AJAX'']
* [http://en.wikipedia.org/wiki/Ajax_%28programming%29 Wikipedia article on ''AJAX'']
* [http://www.maxkiesler.com/index.php/weblog/comments/how_to_make_your_ajax_applications_accessible/ How to Make Your AJAX Applications Accessible: 40 Tutorials and Articles]
*[http://www.ajaxload.info/ AJAX loading icon generator]


{{stub}}
[[Category:Developer]]
[[Category:Javascript]]
[[Category:Javascript]]
[[Category:AJAX]]
[[Category:AJAX]]
[[Category:YUI]]
[[Category:User Interface]]

Latest revision as of 09:18, 16 May 2011

AJAX (Asynchronous Javascript and XML) is a modern web design technique that allows for more interactivity by making webpages that fetch data in the background and alter themselves without reloading. This makes the website feel much more like an application. AJAX is a new way of working with existing technologies (including HTML, Javascript, CSS and the XMLHttpRequest object amongst others) rather than a new piece of technology in itself.

Ajax in Moodle

YUI framework

As of July 2006, Moodle has adopted the Yahoo! user interface library and most future work in this area will build upon that foundation.

There are several current projects that make use of these technologies e.g.:

AJAX renderers

As of Moodle 2.0, AJAX output can be generated by creating an ajax renderer class named something like mod_forum_renderer_ajax in the same way and in the same file as the normal renderer. If a script is marked as being an AJAX script by having this line placed at the top of the file (before any other code)

 define('AJAX_SCRIPT', true);

then the AJAX renderer will be used in place of the main one for all components if it exists.

See also