This article is intended for developers who might consider Dojo for their applications. I assume you understand the basics and you did read the getting started articles/tutorials from dojotoolkit.org.
- There is no better IDE around than PHPStorm or WebStorm, except you’re writing even SMS with VIM & friends. However, install the “More Dojo” PHPStorm plugin and you get lots of neat coding tools and templates & proper syntax highlighting. Follow all the steps and adjust the Plugin. It also cleans your code from unnecessary AMD modules.
- Go Linux or Macintosh, seriously otherwise you will spend a lot of time to get 3th party tools or the compiler working. There are also many, MANY other reasons to not use Windows for serious web development tasks; most important is: don’t be late with recent technologies!
- Get a project template from Github:
- Download the entire Dojo source code (use the ‘dojo-boilerplate’ project template)! Whilst its very tempting and easy to follow the reference guide on the Dojo’s main page which suggest to include Dojo from CDN, you actually can save time by having the entire source directly in your project. Its including also more illustrative test units and demo applications. To install the entire Dojo framework, its just one line on the shell:
git clone https://github.com/dojo/dojo ; git clone https://github.com/dojo/dijit; git clone --recursive https://github.com/dojo/dojox;
There are already many plugins and components:
- Main page of Dojo packages
- “Sitepen”, a must know resource and company wrote an article here
- simple sandbox
- sandbox with “dgrid” included
That are some must have plugins:
- dgrid (lists and grids, provides modern infrastructure for unit-tests, using ‘intern’ and ‘Selenium’)
- cbtree (check box tree, little outdated but great widget)
- only as reference(not a plugin), IBM’s recent work (complete re-work for widget infrastructure, documentation, code style guide and testing; recommendable when working on large applications)
Those components might not be of interest for you but I urge you to have a look at them. DGrid and IBM-Js make use of modern techniques like JSDoc and unit testing(intern) which are completely different from the current Dojo toolkit. Dojo-2 will update to those techniques and therefore you’re “in” now!
Example applications beyond the kitchen-sink & Dojo for PHP developers:
- ‘cbtree’ (has also PHP examples)
- JSON-RPC-2.0 with additional signing
- a Dojo theme based on ‘claro’ but works with classic jQuery themes
- Dojo’s SMD proposal (you can switch to JSONP if you like)
- Node.JS for hot-reloading Dojo/AMD modules in your application, useful for prototyping or tuning large applications which are not fitted for jsFiddle. See the xDojoWatch repo.
Dojo for Java developers
- You can build on the good old ‘Struts’ which provides JSON-RPC-2.0 filter which works well with Dojo’s SMD proposal
Even more examples
1. Dojo’s source code includes a little application which includes all widgets. You can open it here: http://x4dojo.org/dojo/dijit/themes/themeTester.html
You can browse the source code here http://x4dojo.org/xbox-app/ (soon a real Dojo-Fiddle)