What a great year 2013 has been!
We’re feeling (collectively) like Ebenezer Scrooge in the final chapters of Charles Dickens’ A Christmas Carol – except we haven’t been jerks up ’til now and we think working at SitePen is a year-round Christmas vacation, unlike the earlier chapters wherein Scrooge forces poor Mr. Cratchit to work by the heat of a candle. That’s just mean. Anyways, the point is, we’re feeling fairly festive and because of this, we have something special for you!
Sign up today and get Dojo 101 for FREE
We would like to give you a FREE pass to our Dojo 101: Fundamentals workshop (a $649 value!) when you sign up for Dojo 201: Interfaces or Dojo 202: Architecture. All you have to do is register before December 31, 2013 for any 2014 workshop and enter promo code FREE101!
The simple act of writing this blog is warming the cockles of my heart. I can’t help myself – I want to give more! How about this? The first person to register for 101 and 201 in each city, will get both workshops for FREE!
Come learn with us in 2014! Let us impart our knowledge by giving you the gifts of enlightened web development and broadened horizons!
Sign Up Today!
In general, Dojo uses the following naming conventions:
- _UpperCamelCase: mixin classes/modules
- UpperCamelCase: base classes or constructors to instantiate
- _lowerCamelCase: private/protected vars, or internal methods that may change between point releases (not typically used for a module name)
- lowerCamelCase: singletons (or normal methods when used within a module)
- _base: modules that were historically included in the default Dojo base build
The short answer is: no,
dojo/query is not guaranteed to return elements in the same order as they appear in the DOM.
query module is designed to use the DOM’s
querySelectorAll method, if available. Otherwise, it uses a CSS selector library. While
querySelectorAll does return elements in order, the selector engines provided with Dojo (
dojo/selector/lite) have been optimized for speed without strict adherence to element order. This means you may often find that they return elements in order, but this is not guaranteed.
A common error when using Dijits is “Tried to register widget with id==XXX but that id is already registered”. That is the
dijit/registry telling us that we’ve made a mistake instantiating a widget.
When a widget is initialized, it identifies itself with
registry using its
registry expects to be unique. An error will occur when you try to register that same
Dijit widgets provide the ability to write custom setters and getters, whose logic is executed when calling the
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.
Dojo stores provide a simple and powerful way to interact with data via widgets or any other data consumer. Two stores that come with The Dojo Toolkit are
dojo/store/JsonRest. Both of these stores have a
query method, which will return query results that match certain criteria.
this. For example, methods in Java are bound to classes at compile time, and
One pretty common issue we get in the dojo-interest mailing list asks why
RoundRectStoreList.set("store", store); doesn’t actually appear to be setting the store properly? That is, the data in the RoundRectStoreList doesn’t actually render the data in the new store, but instead keeps old data rendered.
In this post, we will walk through creating widgets, or UI components in xstyle. CSS itself has a basic component-like unit, a CSS rule. However, xstyle enables a level of advanced UI for constructing rich components, beyond what can be specified with basic CSS. The simple extensions in xstyle allow us to generate DOM elements, respond to events, and encapsulate functionality for easy reuse and composition.