Dojo Foundation Packages

By on July 25, 2011 12:01 am
This entry is part 1 of 4 in the series Dojo Foundation Packages

The Dojo Foundation was founded for the purpose of facilitating an active and open community of web technology, making high-quality code accessible to developers without constraint. The Dojo community has a history of commitment to the open web, with active involvement in many standards bodies and interoperability efforts, dedication to standards based approaches with the move to the AMD format and promises implementation, HTML5-based store API, data attributes, to-the-letter HTTP REST implementation, and more. The Dojo Foundation is working to further advance the open web with the introduction of a JavaScript package repository.

Git-Linked Packages for NPM/Node

By on July 29, 2011 2:30 pm
This entry is part 2 of 4 in the series Dojo Foundation Packages

The new Dojo Foundation Package repository is an easy and powerful new way to host Node packages for installation with NPM. This new repository allows you to directly link packages to git repositories and it works with NPM without changes. Developing a Node package couldn’t be easier. Simply submit your package URL to the repository, and instantly it will be available for installation for NPM! Not only that, but you never have to resubmit version updates. Since the package repository is linked to git, any new version tags that you create on your github package repository will automatically be reflected as a new package version available for NPM installation. NPM does not need to be reconfigured at all, just run install like you would with any other package:

npm install my-new-package

When you have updates for your package that you want to designate as a new version, simply tag it in Git. And that’s it! Next time your package is installed or upgraded the newest version will be there.

ComposeJS: Robust, Lightweight Object Composition

By on September 28, 2011 2:51 pm
This entry is part 3 of 4 in the series Dojo Foundation Packages

ComposeJS is a JavaScript package/module for object-oriented programming available in the Dojo Foundation package repository. JavaScript itself is already a highly object-oriented programming language, and the prototype-based inheritance system is very powerful. Rather than simply porting a “class” system from another language, the core philosophy of ComposeJS is to leverage JavaScript paradigms and enhance it with clean, terse syntax and modern composition and resolution concepts for simple, high-performance, and robust object constructors. ComposeJS uses concepts from class inheritance, multiple inheritance, mixins, traits, and aspect-oriented programming to compose functionality in the most efficient manner possible.

put-selector: CSS Selector-Based DOM Element Creation and Manipulation

By on September 29, 2011 1:05 am
This entry is part 4 of 4 in the series Dojo Foundation Packages

The put-selector package provides a small yet powerful function for creating and manipulating the DOM through brief, familiar CSS selector syntax. CSS selectors are well understood by most front-end developers, used both for CSS and element selection through query engines. This function leverages this syntax for creating and updating elements quickly and efficiently. For example, to use the provided put() function to create a div with a class name of “foo” and append it to a parent element, we could write:

put(parent, "");

We can also update existing elements, here we add the class “updated” to an element:

put(element, ".updated");