Sep 21

Exploring dojo/json

By on September 21, 2012 4:52 pm

Dojo has long had great support for JSON through dojo.fromJson() and dojo.toJson(). But with the advent of ECMAScript 5′s JSON object, and the increased adoption of this API among browsers, there is now a standard API for JSON parsing and serialization. Dojo 1.7 added a module that aligns with this standard API. This enables Dojo to directly pass through parsing and serialization when native support exists. Using the native JSON parser and serialization is much faster, and allows Dojo to leverage the high-speed, in language capabilities. Also, Dojo’s dojo/json module is based on the feature detection (has() API) system that is integrated with the build system, so it will be possible to leverage the build system to create browser-specific builds (like mobile builds) where this module consumes just a few bytes.

Aug 21

Introducing dojo/request

By on August 21, 2012 6:00 am

As Dojo moves toward its 2.0 release, our focus has been on giving developers tools that will help them be productive in any JavaScript environment. This means creating consistent APIs across all environments. One area that has been sorely lacking, in this regard, is Dojo’s IO functions. We’ve always provided developers with a way to make requests in the browser (dojo.xhr*,,, but the API has been less consistent than some of us would like (dojo.xhrGet,, etc.). Additionally, we’ve never provided a server-side implementation, and if we had, it would have been another module name and API call to remember.

With the release of Dojo 1.8, we have introduced the dojo/request API which provides consistent API calls between browsers, request methods, and environments:

require(["dojo/request"], function(request){
    var promise = request(url, options);
    request.get(url, options).then(...);, options).then(...);
    request.put(url, options).then(...);
    request.del(url, options).then(...);
Jul 19

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!

Apr 12

Dojo Tutorial: Layout with Dijit

By on April 12, 2011 12:01 pm
This entry is part 4 of 13 in the series Dojo Tutorials

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.

Mar 15

Dojo 1.6 Tutorials – Finally!

By on March 15, 2011 1:52 pm
This entry is part 13 of 13 in the series Dojo Tutorials

Ask anyone who has ever contemplated using the Dojo Toolkit and they’ll tell you that its Achilles’ heel is documentation. Articles online are generally outdated and the Dojo Reference Guide and API docs, while helpful for existing Dojo developers, are anything but comprehensive if you’re new to Dojo and don’t know exactly where to start when building Dojo-based web and mobile apps.

While there are books that have been published and a smattering of resources scattered about online, there has never been a cohesive, up-to-date resource for learning how to use the greatness that is the Dojo Toolkit. Until now.

Announcing Dojo Tutorials

With the release of Dojo 1.6, SitePen has written a starter set of Dojo tutorials for your learning pleasure! These tutorials don’t just show you the code and expect you to figure out the rest, they explain how and why to use the various parts of the Dojo Toolkit — the right way. All you have to say is Hello Dojo, and you’ll be placed on the path to coding success.


The first set of tutorials are authored by SitePen engineers (many of whom are core Dojo committers) and are easy to find within the Dojo Toolkit Documentation section. The Dojo Reference Guide has also been updated making the Dojo Toolkit website the definitive place to go for Dojo documentation.

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.

Jan 13

Using the Dojo Toolkit with Microsoft’s WCF

By on January 13, 2011 12:01 am

For .NET developers, the Microsoft Windows Communication Foundation (WCF) is an excellent resource for creating service-based Web applications. Defining web services is relatively easy using WCF; using Visual Studio .NET, you can set up a solution with the interfaces needed for WCF quickly and easily. Actually doing the communication using Ajax, however, requires a client-side component to make and handle the various Ajax calls. Almost all of the examples on the Intertubes(™) use jQuery, but that’s not the only JavaScript toolkit on the market. How would you accomplish these goals if you were developing your service-based applications using the Dojo Toolkit?

It turns out that consuming WCF-based services with Dojo is quite easy to do, and in this post we’ll show you how to do it. For reference, we’ll be using this article from Sridhar Subramanian at C# Corner which shows how to write your WCF-based services, so we won’t be going into the details of the C# component here. Instead, we’ll focus on the client-side code.

Jul 22

Dojo 1.5: Ready to power your web app

By on July 22, 2010 9:00 am

Dojo Toolkit 1.5 is now available for immediate download. Dojo is a JavaScript toolkit that is lean enough for use on a simple blog, yet powerful enough to scale to solve the most advanced web application engineering challenges, allowing you to use just the features and flexibility needed for your application. The 11th major Dojo release, version 1.5 offers many important improvements and enhancements and remains as IP-safe, freely-licensed, and free to use as the first release over five years ago.

Jan 27

Efficient Lazy Loading of a Tree

By on January 27, 2010 9:36 am

Dojo 1.4 sports a fantastic tree widget, complete with ARIA compliance, keyboard accessibility, and internationalization (including right-to-left layout for appropriate countries and languages). For large tree data sets, we want to be able to only load the necessary data for the visible nodes of the tree. As a user expands a node, we then want to load the children of that node. Ideally, we only want to make one HTTP request per expansion for optimal performance. Historically, effective lazy loading has been a challenge, but some recent additions will make it much easier to utilize efficient lazy loading mechanisms in the tree.

Aug 24

Bespin Goes Social

By on August 24, 2009 8:47 am

The Dojo-based Bespin project has added collaboration and social features so developers can more easily share code in real-time! Finally, a truly productive use of social networking for developers!

By combining the benefits of SubEthaEdit and many of the social features you find on networking sites, the project is headed in a very useful direction that should significantly improve the way software is developed.

Aug 10

Web Page Global Variable Performance

By on August 10, 2009 12:02 am

Google recently released a new feature for their Google Docs writing application; the ability to draw a vector graphic and insert it in your document. This drawing module uses SVG and VML, much like DojoX GFX. I was curious about their code and explored with Firebug. To my surprise, I found that most of their code uses variables in the global scope. The code is compressed, but when observing with Firebug’s DOM tab, there are several pages and a few hundred lines of global variables.