Learning Dojo 1.8

By on December 6, 2012 8:22 am

Since we last posted an article on Learning Dojo, things have changed dramatically. Dojo has become an early adopter of AMD, with a new build tool to match; there is a new grid; the documentation has been vastly improved, and there are tutorials galore!

In fact, there is so much information out there on learning Dojo, it might be overwhelming. In a way, Dojo 1.7’s migration to AMD amplifies the problem, in that many previously-published articles no longer reflect the most recent best practices. This post aims to start you off on the right foot by pointing to relevant up-to-date resources for getting started with — or catching up on — Dojo 1.8.

Why Dojo

10 Reasons your Projects Should use the Dojo Toolkit
Slides: Dojo 2.0: Modular, Mobile, and Reinventing Web App Development
Interview with Dojo Toolkit Co-creator Dylan Schiemann

Getting Started

Tutorial: Dojo Start – Answers many common questions asked by newcomers
Tutorial: Hello Dojo – Guides through the first steps in exploring Dojo

Transitioning from Dojo 1.6

Tutorial: Modern Dojo – Explains key differences between Dojo before and after 1.7
Slides: Moving to Dojo 1.7 and the path to 2.0 – Presents features new to Dojo 1.7 and up

AMD Resources

Tutorial: Defining Modules – Explains how to define and load modules, and configure the loader
AMD: The Definitive Source – Explains the reasoning and benefits of AMD
Slides: Modular JavaScript: AMD & CommonJS modules – Discusses the evolution of AMD
AMD API – Wiki containing AMD API specifications

Learning Dojo

Tutorial: Making Functions with hitch and partial – Explains execution context and how to control it
Tutorial: Classy JavaScript with dojo/_base/declare – Explains Dojo’s chief inheritance mechanism
Tutorial: Ajax with dojo/request – Introduces Dojo 1.8’s new Ajax API
Tutorial: Getting Started with Deferreds – Introduces Deferreds, crucial for asynchronous logic
Tutorial: Dojo Deferreds and Promises – Discusses Promises and their relation to Deferreds
Tutorial: Dojo Object Stores – Explains the dojo/store API, new since Dojo 1.6
Reference Guide: Dojo – Index of reference material for the Dojo package

Learning Dijit

Tutorial: Understanding _WidgetBase – Details the module forming the basis of all widgets
Tutorial: Layout with Dijit – Discusses Dijit’s layout widgets
Tutorial: Creating Template-based Widgets – Describes Dijit’s templating capabilities
Recipe: Creating a Custom Widget – Walks through implementing a widget
Reference Guide: Dijit – Index of reference material for the Dojo package

Developing Applications

Tutorial: Using dojo/hash and dojo/router – Discusses Dojo’s utilities for managing the browser hash
Recipe: Application Controller – enumerates an approach to writing a small app
Dojo Boilerplate – Provides a starting point for creating a Web application with Dojo
Tutorial: Getting Started with dojox/mobile – The first in a series of tutorials to build a mobile app

Build Tool Resources

Tutorial: Creating Builds – Thoroughly explains the various facets of a custom build
Working with Dojo and AMD in Production – Enumerates approaches to loading production builds
Reference Guide: The Dojo Build System – Definitive documentation on the new build system
Dojo Web Builder – An online tool for creating Dojo builds

Dojo Packages

Dojo Foundation Packages – Explains the role packages play in Dojo’s future
dgrid – Web site for dgrid, a Dojo Foundation package

Community

As always, the Dojo community is the best around.  If you get stumped or have an advanced question, you can get more answers by leveraging the following resources:

If you find that a self-guided tour or community support is inadequate, SitePen also offers workshops taught by Dojo experts, as well as highly responsive support services.

Dojo Tutorial: Using dojo/hash and dojo/router

By on October 31, 2012 10:35 am

As part of our great updates to the Dojo Tutorials for Dojo 1.8, we’ve been busy creating several new tutorials.

Using dojo/hash and dojo/router

Using dojo/hash and dojo/router In JavaScript applications, modifying the URL hash is a great way to provide bookmarkable, history-enabled page states. With dojo/hash, adding this functionality is easy. In Dojo 1.8, we added dojo/hash. Coupled with dojo/router, dojo/hash can be a powerful tool for creating robust and interactive applications.

Check out the Using dojo/hash and dojo/router tutorial for Dojo 1.8, or the Using dojo/hash tutorial for Dojo 1.7, or 1.6!

Want to see a specific Tutorial? Want to Learn More?

Is there something you’d like to learn how to do with Dojo? Always wanted to know how something in Dojo works? Leave us a message in the blog comments and we’ll see about getting a tutorial created for you. Or sign-up for an upcoming SitePen Dojo Workshop to get a fully immersive hands-on experience with Dojo.

Now Supporting all Major Toolkits!

By on July 19, 2012 8:20 am

We have been providing JavaScript and Dojo support to freelancers, start-ups and Fortune 500 companies for nearly a decade. As we intently watch enterprise organizations everywhere begin to roll out AMD (read about why AMD matters) and the associated code improvements, we are thrilled with the industry’s direction toward toolkit interoperability! Why? Because! Our masterful engineering team, consisting of influential members of various open source communities, positions SitePen perfectly to offer full-on, front-end web development support to the world!

Getting right to the point, (The Official Point!), we are pleased to announce the expansion of SitePen Support to officially include more than fifteen popular open-source JavaScript toolkits!

Now supporting the following JavaScript toolkits:

  • Dojo
  • Persevere packages
  • dgrid
  • Curl.js
  • CometD
  • Twine
  • jQuery
  • Backbone
  • underscore
  • RequireJS
  • PhoneGap/Cordova
  • MooTools
  • jQueryUI
  • Wire
  • Socket.IO
  • Express

In addition to toolkits, we will continue to support your custom JavaScript source code, as well as key underlying technologies and formats, including JSON, HTML5, WebSockets, SVG/Canvas, Mobile Web, Server-Side JavaScript, AMD, Node.js and many more.

Our expertise with Dojo and advanced JavaScript is relevant for a wide-range of desktop and mobile web application projects and our approach to SitePen Support has always been flexible with the priority being to improve our customers’ web apps. We strive to support our customers in every way possible and we continue to be Dojo experts. In addition, we’re now committed to providing your organization with the front-end development expertise that will optimize your application regardless of which toolkits and technologies your company is comfortable using. You have our word!

Learn More About SitePen Support or Contact Us to get started today!

AMD for the Business-Side

By on July 10, 2012 8:36 am

You may have seen our recent blog entitled “AMD: The Definitive Source” which exhaustively explained Asynchronous Module Definition. AMD is a topic with significant technical nuances but the purpose of THIS article is to explain the value of AMD for your business.

AMD is an emerging defacto standard for efficiently developing modular JavaScript applications and libraries. There’s a tremendous amount of business benefit to be achieved from making the switch to AMD for any JavaScript application. If you’re using Dojo 1.7+, you’ve already made the switch and are reaping the rewards as we speak!

Utilizing AMD in your web application dramatically affects code maintainability, application performance and interoperability and these will assuredly result in the following benefits for your business:

  1. Efficient engineering
  2. Improved user experience
  3. Empowered technical leadership

Let us tell you how!

dgrid: Getting down to the nitty griddy

By on April 24, 2012 8:52 am

Inside dgrid

What does dgrid mean to Dojo?

dgrid has come to represent and demonstrate the future and power of third-party packages for Dojo. The dgrid package helps to jump-start the repository-centric approach, with parts of DojoX expected to eventually follow suit. It also demonstrates extensive use of the new features and architecture in 1.7 — including granular dependencies, and the new event mechanism in dojo/on — showing how components can use Dojo 1.7 to create amazingly compact and fast user interfaces.

dgrid has also pointed forward to lighter-weight approaches to widget design, more CSS-centric techniques for styling, better separation of structural and skinning styles, and other innovative techniques that have sparked interest into new ways of working with and on Dojo.

Because dgrid builds upon Dojo under the same licensing, you get all of this innovation while preserving Dojo’s clean intellectual property, simple integration with other features, high performance, and professional engineering, taking advantage of the many things that make Dojo excellent.

Decruft. Delight. dgrid Beta Is Here!

By on April 23, 2012 8:50 am

dgrid beta is here
Does the code for your grid customizations involve more lines than an Apple product launch?

You are not alone, brave developer. We feel your pain – the type that results from banging your head on a keyboard until the room spins – and that is why we have an amazing gift for you! Read on…

Dojo users and SitePen customers alike have needed a grid since the Dojo Toolkit project began. At first, we and several other companies banded together to purchase a non-open source grid. Enter Dojo DataGrid. We contributed our shiny new code to the Dojo Toolkit for the benefit of everyone and we’ve spent years maintaining and incrementally improving it in Dojo. But the web evolved, faster and faster, demanding more functionality, more performance, and more data! Others tried to keep up as well, enter EnhancedGrid and LazyTreeGrid. Kudos to everyone for building and contributing to Dojo!

Finally, last year, we took a long, hard look at how our customers were using DataGrid and EnhancedGrid. We agonized over the time and effort spent developing and maintaining such crucial functionality. We knew something needed to change. Enough was enough! Our choice was to attempt a DataGrid refactor or start over. The SitePen Team spoke: We started over.

Eleven Trends for 2012: The Year of Dojo

By on January 30, 2012 4:35 pm

Most 2012 trend lists include 12 trends. (Get it?  12 in ’12.  Of course you do.).  Because we are not fond of adding unnecessary or filler content (read code), Dylan has come up with 11 trends for 2012.

1.  Mobile

Mobile will gain even more momentum in 2012.  There’s no doubt we will see many new APIs, development tools and capabilities in place to both build and install most any app as a web app rather than using native technology.

2.  AMD

Following on the increasing emergence of microtoolkits in 2010 and 2011, 2012 will be the year everything becomes an AMD module, making it easier for Dojo, jQuery, MooTools and other toolkits to play nicely together.

3.  Builders & Loaders

With so many modules, performance, loading and building will need to be optimized.  Use of package management will become increasingly important.

4… Check out the rest of Dylan’s 11 Trends for 2012! And don’t forget that SitePen’s got your back when it comes to implementing efficient and scalable solutions.  Contact us today!

HTML5 data-dojo Attribute Support

By on January 19, 2012 9:05 am

Dojo has long provided support for declaring widgets and specifying other information directly in HTML. This support makes it extremely quick and easy to get an application started. You can start instantiating widgets by adding attributes to HTML elements before even writing any code. This is not only a very convenient tool, but using a declarative approach to binding widgets to elements can be viewed as cleaner and more organized than using the imperative mechanics of JavaScript.HTML5 Powered with Semantics Widgets declared in markup have an encapsulated construction, avoiding instantiation that requires spanning and synchronizing HTML and code manually.

However, the use of Dojo’s declarative tools has been avoided by some because it uses custom attributes that are outside the HTML specification. While this approach works in every browser on the market and is implicitly allowed, it does not validate against the HTML4 validators. Now, the new HTML5 specification provides a namespace for custom attributes. The data-* attributes are available for libraries and authors to use for their own purposes and extensions while still having validating markup. The HTML5 specification further recommends that library use a sub-namespace for their custom attributes to avoid conflicts with other code. All of the Dojo custom attributes begin with data-dojo-. Let’s look at the new Dojo attributes.

Dojo Tutorial: Layout with Dijit

By on April 12, 2011 12:01 pm


Next in our ongoing series of Dojo Tutorials, we’ll tell you about Layout with Dijit.

Bring your layouts to life

Creating dynamic and interactive layouts is a challenge common to any graphical user interface. We have a lot of ability to create layout with HTML and CSS. Where CSS leaves off, Dojo picks up with a set of extensible widgets as a part of Dijit – Dojo’s UI framework. In this tutorial, we’ll explain how Dijit addresses common layout needs and see how easy it can be to create even complex layouts with just a few flexible widgets.

Check it out!

Sound interesting? Check out the tutorial.

Want to see a specific Tutorial? Want to Learn More?

Is there something you’d like to learn how to do with Dojo? Always wanted to know how something in Dojo works? Leave us a message in the blog comments and we’ll see about getting a tutorial created for you. Or sign-up for an upcoming SitePen Dojo Workshop to get a fully immersive hands-on experience with Dojo.

Dojo Object Stores

By on February 15, 2011 12:02 am

Dojo 1.6 introduces a new data store API called Dojo Object Store. This new store API is based on the HTML5 IndexedDB object store API and is designed to greatly simplify and ease the interaction and construction of Dojo stores. Based on HTML5 IndexedDB

Update: dstore is developing as a successor to Dojo object stores, so if you are starting a new application, you may want to look into this project. However, this blog post still describes an important API that is widely used, and is foundational for dstore, sharing much of the same philosophy and even much of the interface.

Dojo 1.10 also includes new stores in dojox/store for local database support. Check the latest blog posts for more information about this.