From jQuery to Large Applications

jQuery is a popular JavaScript library for many good reasons. It provides an excellent set of tools in a well-designed, compact file and is easy to learn due to great documentation. However, because of the focus on staying small and simple, jQuery doesn’t provide a significant infrastructure for building large scale applications. Rebecca Murphey‘s recent blog post brought a good amount of attention to the aspects of large scale development that aren’t addressed by jQuery alone. Since then she has continued to describe how Dojo provides the crucial building blocks for large applications. But switching toolkits may be a difficult, expensive endeavor, both for upgrading existing applications and for skill relearning for developers. Consequently, I wanted to look at how you and your team can start using Dojo without abandoning your investment in jQuery.

This post is intended to be a realistic conservative approach to building large applications, by leveraging Dojo infrastructure without throwing away existing code and mindshare based on jQuery. The best developers are the ones that know the right tool for a job, instead of trying to use the same tool for all solutions. jQuery’s sweet spot is in helping developers quickly get started with familiar CSS-esque syntax, while minimizing JavaScript code size. But it is important to recognize when Dojo’s infrastructure, designed for larger client-side applications, becomes a valuable tool.

This post is also intended to help point you towards some minimal effort ways to start leveraging different key components in Dojo to help build your applications. We recognize that learning new tools always has a time/effort cost, and instantly learning about everything in Dojo is unrealistic. Hopefully this post will point you to some tools within Dojo that you can quickly start utilizing and benefiting from. A jQuery application or team certainly does not need to use all of these, you can see which tools will help based on the growing pains of your application.

Continue reading

RequireJS/AMD Module Forms

The CommonJS AMD proposal defines an elegant, simple API for declaring modules that can be used with synchronous or asynchronous script-tag based loading in the browser. RequireJS already implements this API, and Dojo will soon have full support as well. The API for defining modules is as simple as:

define(, , );

This simple API can be used in a variety of different ways for different situations.

Continue reading

Resource Query Language: A Query Language for the Web, NoSQL

Data querying is a critical component of most applications. With the advance of rich client-driven Ajax applications and document oriented databases, new querying techniques are needed, and Resource Query Language (RQL) defines a very simple but extensible query language specifically designed to work within URIs and query for collections of resources. The NoSQL movement is opening the way for a more modular approach to databases, and separating out modeling, validation, and querying concerns from storage concerns, but we need new querying approaches to match more modern architectural design.

Continue reading