Book Image

Learning Dojo

By : Peter Svensson
Book Image

Learning Dojo

By: Peter Svensson

Overview of this book

<p>Dojo is a popular AJAX-specific open-source JavaScript framework for building powerful web applications. It provides a well conceived API and set of tools to assist you and fix the issues experienced in everyday web development. Your project size is no concern while using Dojo. It is the best scalable solution to all your size-related issues.<br /> <br />This book starts by giving you tips and tricks for programming with JavaScript. These tricks will help you with Dojo. With every chapter, you will learn advanced JavaScript techniques. You will learn to leverage Dojo for a clean web application architecture using JSON or XML.</p>
Table of Contents (13 chapters)
Learning Dojo
Credits
About the Author
About the Reviewer
Preface
Free Chapter
1
Introduction to Dojo

Dojo Ajax features


XHR is an acronym for XmlHttpRequest. It doesn't actually force you to transfer only XML data, though it was meant for that from the beginning. XHR techniques is the reason Ajax is called Ajax. Ajax - Asynchronous JavaScript And XML.

The idea behind Ajax is to make it possible for scripts inside the web page to send and retrieve data to and from the server without having to reload the page. A side-effect of this is that the page can retain state between data transfers without having to rely on cookies (although the methods can be combined).

In practice, what happens is that the browser opens a new iframe with zero height and width. Each iframe is capable of loading and posting data independently of each other, and so the accesses of the 'invisible' iframe will not affect the main page to be reloaded.

This results in a page whose JavaScript functions are able to post a form and get a reply, which in turn updates only part of the page, flicker-free, so to speak.

The function...