The second beta of DojoBuilder has just been released. DojoBuilder is an Eclipse RCP based tool for generating customised builds of the Dojo Ajax toolkit. It provides a number of useful utilities for working with Dojo, including checking out the source code from source control (Subversion), configuring the build, and running the build. For information on what it can do, check out my first post on the subject.
Suffice to say, this is all you should need to create custom builds of Dojo – no need to install Subversion, Ant, hacking away at a command line interface with arcane “build targets”. It’s all been wrapped with a simple UI, while still providing you with access to all the complexities of Ant if you want them. For the impatient and enthused, you can download the application from http://www.skynet.ie/~sos/dojobuilder/downloads/DojoBuilder.zip.
This second beta release has a number of improvements over the original release.
- Compression of all Javascript files in the build. While the usual Dojo build process only compresses the main dojo.js file, you are now given the option to compress all files in the source tree using a very quick compressor.
- Dojo Profile Builder. Rather than a user having to manually write a JavaScript profile file describing what files they would like to be baked into their main dojo.js file, the new Dojo Profile Builder will now do this for them. Not only that, it will show you all the files actually included in the build (which are pulled in via dojo.require() calls) including the size of each, preview the dojo.js file that would be generated, and even compress that for you. This means you can quickly and easily find the right balance between runtime speed (via cached JavaScript) and first time download performance issues (dojo.js tends to get very, very big if you’re not careful).
- Works as a perspective in Eclipse 3.2. The initial release only worked in standalone mode, meaning users had to download both the DojoBuilder plugins (~2.4 megs) and the Eclipse framework (~22 megs), even if they already had it. This new release can be added to an existing Eclipse 3.2 installation from the update site http://www.skynet.ie/~sos/eclipse/updatesite . However, DojoBuilder uses a Subversion plugin to work its magic, so you’ll have to install it first. See here for Subclipse, the Eclipse Subversion plugin. So, if you already have Eclipse 3.2 and Subclipse installed,
- Click Help/Software Updates/Find And Install
- Select “Search for new features to install” and click Next
- Click “New Remote Site” and add the URL http://www.skynet.ie/~sos/eclipse/updatesite
- Click “Finish” and step through the prompts to install the plugin.
- Restart Eclipse, and to open the tool, click “Window/Open Perspective/Other/Ant Builder”
If you had downloaded the first beta of DojoBuilder, to update it you can simply download the ZIP file at http://www.skynet.ie/~sos/dojobuilder/downloads/DojoBuilderPlugins.zip into the DojoBuilder folder and restart the application.
The standalone DojoBuilder application for Windows can be downloaded from http://www.skynet.ie/~sos/dojobuilder/downloads/DojoBuilder.zip. Make sure you read the blog post here describing the prerequisites for running the application. Don’t worry, they’re not all that bad! That post also describes most of the capabilities of the application and how to use it, so I’ll just describe the new features here (proper help documentation is on the way, which I think should be the Dojo mantra at this stage
Update: documentation is now available at http://dojobuilder.skynet.ie ).
To create a new profile file,
- Choose a Dojo build to use, either “nightly” or “4.1″ will do, and click the “Use customized Build Source”
- In the “General Dojo Options” section, chooses a Dojo click the “New” button. This presents you with a window detailing the files you can use.
- Double click on the files you’d like to include in the build. They are added to the list on the right.
- To preview the final file, click “Update Preview”. This shows you the generated dojo.js file, and a list of all the files it is made up of.
- If you want to compress the preview dojo.js file, click “Compress Preview”.
- You can then save the Profile file (to use when doing a full build later) or the Preview dojo.js file.
To edit or remove a profile file,
- Click “Window/Preferences/Ant Builder/General Dojo Settings”
- Choose a profile file and click either “Edit Profile” or “Remove Profile”
Incidentally, you can also create a new profile from this dialog, and also import an existing profile file you may have handwritten previously.
To compress all files in a build
- Choose a Dojo build to use, either “nightly” or “4.1″ will do, and click the “Use customized Build Source”
- In the “Compression Options” section, select the “Quick Compress” and “Apply to All files” checkboxes.
- Choose the “release” target set in the “General Dojo Options” section.
- Click the “Build” button.
Still to do:
- Multi-platform builds of the standalone application. I’m working on it, but don’t have the ability to test right now. However, if you have Eclipse already downloaded for your platform, you should be able to get DojoBuilder from the update site and use it without any problems. Let me know if this is not the case.
- Performing builds without checking out the entire code base from source control.
- Mac OSX support. There is some obscure bug occurring with Mac OSX that causes builds to fail.. Testing this could be tricky (I develop on Win XP), as it is unclear whether the fault lies in my code, Ant’s or Dojo’s. However, I will get to it somehow.
As always, please keep the feedback coming, it helped greatly in debugging this release.
