In this article, learn how Dojo Mobile addresses the performance issues, and how you can optimize Dojo Mobile-based user applications to make them as small and efficient as possible.
The Dojo loader includes two APIs:
- The Asynchronous Module Definition (AMD) API ("AMD API")
- The legacy dojo API which consists of dojo.require(), dojo.provide(), dojo.requireIf(), dojo.requireAfterIf(), dojo.platformRequire(), and dojo.requireLocalization() ("legacy loader API")
If you are creating a custom extended widget you can override any of those lifecycle events in order to provide your own functionality at any point in the widget’s lifecycle. Since everything in javascript happens in a very particular order (and certain things will completely fail to work, if not included in the correct lifecycle event), it is wonderful to have these easily extendable methods. In fact, it is one of the reasons why I am such a big fan of Dojo.
Sometimes, however, extending the lifecycle events will cause problems. You are supposed to include
this.inherited("postCreate", arguments);
in your overridden method, in order to make sure the superclass methods are called appropriately.
Built on the latest Dojo technology, dgrid is designed to be lightweight, fast, mobile-ready, and easy-to-use.
The Dojo Boilerplate is a set of files to help you rapidly get up and running with the Dojo Toolkit. It illustrates some basic best practices when working with Dojo. This is the branch for the new Dojo 1.7 loader and build systems, which use AMD modules;
JSON Schema is a standard (currently in draft) which provides a coherent schema by which to validate a JSON "item" against. Properties within the schema are defined and with another object containing their expected type.
JSONP is the process of SCRIPT tag injection, referencing a cross-domain URL and providing a callback function (on your page) that the provider will call so that you can handle the result. Let's take a look at how JSONP is handled with jQuery, MooTools, and the Dojo Toolkit.
dojox.image is host to many common UI plugins, the most popular being dojox.image.Lightbox, a great solution if you're looking to create a reliable, elegant Lightbox with Dojo. Let me show you how use dojox.image.Lightbox in your next web application!
http://davidwalsh.name/event-delegate
One of the hot methodologies in the JavaScript world is event delegation, and for good reason. Event delegation allows you to avoid adding event listeners to specific nodes; instead, the event listener is added to one parent. That event listener analyzes bubbled events to find a match on child elements. The base concept is fairly simple but many people don't understand just how event delegation works.
I often hear developers complain about how difficult validating credit cards can be, especially when only supporting specific credit cards. Luckily the Dojo Toolkit includes dojox.validate.creditCard, a resource capable of efficiently validating a credit card. Better yet, you can easily take its logic and create you own validator.