Category: FAQ

  • Dojo FAQ: How do I optimize a Dojo app for mobile?

    Dojo FAQ: How do I optimize a Dojo app for mobile?

    Nick Nisi | February 14, 2017

    Web applications can be deployed to many environments, including desktops, tablets, and mobile devices. We can even deploy web applications natively using a wrapper such as Apache Cordova to gain access to device features such as GPS, battery, and accelerometer data. However, it is not always optimal to package our application into a universal layer

    Read More >>
  • Dojo FAQ: Is there a modern theme for Dojo?

    Dylan Schiemann | June 16, 2016

    One of the additions of the recent Dojo 1.11 release is a modern flat theme created with the Stylus preprocessor. The flat theme allows you to apply a modern, flat look and feel to existing Dojo applications.

    Read More >>
  • Dojo FAQ: How can I sequence asynchronous operations?

    Dojo FAQ: How can I sequence asynchronous operations?

    Mangala SSS Khalsa | June 10, 2015

    Dojo’s Deferred module provides a convenient way of managing asynchronous operations. If you’re new to deferreds, you can get a good introduction by reading our blog post and some tutorials on dojotoolkit.org: Getting started with Deferreds and Dojo Deferreds and Promises. There are a few features of the then method on a promise that are

    Read More >>
  • Patching Modern Dojo

    Matthew Wistrand | January 28, 2015

    While it will not happen often, there may be times when you need to patch your Dojo source. Perhaps you discovered a bug and are waiting for the fix to be committed or released, or your application uses an older version of Dojo but you want to use features found in newer releases. Dojo’s AMD

    Read More >>
  • Dojo FAQ: How can I handle recoverable server errors transparently with dojo/request?

    Mangala SSS Khalsa | January 21, 2015

    A common scenario with web applications is accessing protected resources, which require authentication with the server in order to proceed. A common flow is as follows: User opens web site Web site presents authentication screen User enters credentials Web site presents protected information Authentication workflows This is simple enough to begin with, but what happens

    Read More >>
  • Dojo FAQ: Testable store-backed widget

    Brandon Payton | January 14, 2015

    As object stores are frequently used in Dojo-based applications, developers often ask about a good way to utilize stores in their custom widgets. Here we present a common pattern for doing just that in a two-stage approach, starting simple. A store-based widget needs two things at minimum: a way to set the store and a

    Read More >>
  • Dojo FAQ – How do I use Bootstrap with Dijit?

    Ed Hager | August 13, 2014

    Bootstrap is a framework created by Twitter’s developers to consolidate their HTML/CSS design and widgets. Bootstrap provides a clean responsive design, but the set of widgets it includes is limited, especially when compared to what’s available in the Dijit library. The CSS/HTML theme can be used independently of the widgets, but how do you use

    Read More >>
  • FAQ: How can I create a JSONP service-based store?

    Mangala SSS Khalsa | July 9, 2014

    Dojo’s store API is a common interface for providing data to user interface widgets, such as dgrid, Dijit Select, and Dojo Charting. The beauty of having a consistent API is that once you’ve defined an interface for a data source, that data becomes easily available to all widgets that support the store API. We’re going

    Read More >>
  • Dojo FAQ: Dynamically loading CSS

    Paul Bouchon | July 2, 2014

    In large JavaScript applications, it can be beneficial to dynamically load CSS stylesheets. For example, if a certain JavaScript widget, such as a complex grid, uses a large standalone stylesheet for its display aesthetics, it would be optimal to only load this stylesheet if the widget is in use, rather than always including the CSS

    Read More >>
  • How can I debug Intern tests?

    Mangala SSS Khalsa | May 23, 2014

    Intern is a great test stack for writing full-featured unit and functional tests, with remote WebDriver-based testing (e.g. BrowserStack) and continuous integration (e.g. Travis CI). Debugging failing tests can be a challenge if you don’t know the most efficient techniques for troubleshooting platform-specific issues or problems with your test cases.

    Read More >>
  • Dojo FAQ: How does selection work with dgrid?

    Mangala SSS Khalsa | May 8, 2014

    dgrid’s Selection mixin dgrid is SitePen’s lightweight, modular, and easily extensible modern grid component, designed for use with AMD and Dojo. The Selection and CellSelection mixins enable selection of rows or cells, both from mouse or keyboard actions and programmatically. Adding selection functionality to a grid is a simple as mixing in the desired module:

    Read More >>
  • Dojo FAQ: What is the difference between dojo/on and dojo/aspect?

    Nick Nisi | March 26, 2014

    dojo/on and dojo/aspect are two APIs that appear to do similar jobs but actually serve two different purposes. dojo/on is used to setup event listeners for DOM nodes and event-emitting objects. dojo/aspect provides Aspect Oriented Programming facilities so functionality can be run before, after, or around a method call and can even manipulate the input

    Read More >>
  • Dojo FAQ: How do you set a default selected RadioButton?

    Mangala SSS Khalsa | February 19, 2014

    The widgets provided in Dojo’s Dijit library include not only advanced widgets not provided by HTML, but also enhanced versions of the basic HTML form elements, like <input>. Dijit’s dijit/form/RadioButton provides the same basic functionality as an HTML radio button, so let’s look at how you set one to be checked by default.

    Read More >>
  • Dojo FAQ: How do I use CORS with Dojo?

    Dojo FAQ: How do I use CORS with Dojo?

    Mangala SSS Khalsa | January 15, 2014

    In web browsers that support Cross-Origin Resource Sharing (CORS) via XMLHttpRequest objects, Dojo’s XHR mechanism can make cross-domain requests out of the box.

    Read More >>
  • Dojo FAQ: What is the difference between set and _set?

    Dojo FAQ: What is the difference between set and _set?

    Ken Franqueiro | October 16, 2013

    Dijit widgets provide the ability to write custom setters and getters, whose logic is executed when calling the set and get methods. dijit/_WidgetBase also provides a _set method, which is very important when writing widgets, but can cause a bit of confusion due to its name.

    Read More >>
  • Dojo FAQ: How do you cleanly remove aspect handles?

    Dojo FAQ: How do you cleanly remove aspect handles?

    Mangala SSS Khalsa | August 19, 2013

    In addition to a simple, consistent, cross-browser interface to DOM events, dojo/on provides for very convenient clean-up – the function returns a handle with a remove method that will un-register the event listener. Clean-up concerns are not limited to DOM events, so Dojo provides the same interface for dojo/aspect and dojo/topic.

    Read More >>
  • Dojo FAQ: dojo/domReady vs dojo/ready

    Dojo FAQ: dojo/domReady vs dojo/ready

    Matthew Maxwell | April 17, 2013

    We answer many, many, many questions on a daily basis through our Dojo training workshops, JavaScript support plans and during our customers’ development projects. We have bucket-loads of answered questions. What to do with them all… Oh? Provide you with the answers? Ok. Here it is! Each week we’ll answer a commonly asked question about

    Read More >>
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Privacy Policy