SOS

Shane O'Sullivan's technical blog… really ties the room together

Archive for the ‘Rich Client’ Category

Second beta of DojoBuilder released

Posted by Shane O'Sullivan on January 29, 2007

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.

Posted in Ajax, compression, Dojo, eclipse, Javascript, open source, Rich Client, Technical | 26 Comments »

First beta release of Dojo build tool

Posted by Shane O'Sullivan on January 8, 2007

Update: A second beta release of DojoBuilder is now available, click here.

Following on from my earlier post about the Eclipse RCP based tool I was building for Dojo, the first beta release is now available. You should read my first post on the subject for an overview on what it is, why it exists and what capabilities it has.

Steps to use the tool (Windows only for the moment, other builds coming soonish):

  1. Make sure you have Java 5 or greater installed on your machine. You can get it from http://java.sun.com/javase/downloads/index_jdk5.jsp , click on the download button next to “Java Runtime Environment (JRE) 5.0 Update 10“. Once it’s installed, make sure that you your PATH variable is set correctly by opening a command prompt (Start/Run/cmd) and typing “java -version”. It should print out a version of 1.5 or higher.
  2. Download my tool from http://www.skynet.ie/~sos/dojobuilder/downloads/DojoBuilder.zip .
  3. Extract the zip file and click on the DojoBuilder.exe file. This opens the application with four view panes.
    1. Ant Builder Control – This is used to specify the Ant build file to use
    2. Ant Settings – This contains the Dojo-specific tooling, e.g. Subversion tooling to download builds, selecting specific build targets, doing extra compression on the Javascript files etc.
    3. Ant Properties – Lists the user editable properties on the Ant build project. Usually you shouldn’t have to touch these if you don’t want to, the Dojo tooling should take care of it.
    4. Ant Targets – Lists the available Ant targets. You shouldn’t have to touch these if you don’t want to, just use the “Target Set” combo box in the “Ant Settings” pane.
  4. Choose a Dojo build you want to use in the “SVN Repository” combo box (only nightly and 0.4.1 have been tested so far).
  5. Click the “Use customized Build Source” checkbox.
  6. Choose a Target Set you want to build. “Release” is the most common.
  7. Choose a “Build Profile” you want to build, or just leave it at the default.
  8. Click the “Build” button.

This should result in a Dojo build being created in the “release” folder of your checked out source files. By default, these are placed in your home directory, as shown in the “Svn Dir” text box. You can change this if you like. You can also change where you want the built files to be placed by changing the “Build Dest” text box.

There is an additional option to “Super Compress” the files. This uses the Packer compressor to compress either the dojo.js file (your main Dojo file) or even all files in the Dojo tree (note that compressing all files may not be very reliable at the moment). To use this, check one or both of the “Super Compress” and “Compress All Files” checkboxes. Note that while these are extremely effective and result in very (very!) small javascript files, this step is very slow and should usually only be used before deploying the code to your application.

As this is the very first beta release, it is of course not yet perfect. If you have any issues, please reply to this post with details.

Update: A second beta release of DojoBuilder is now available, click here.

Posted in Ajax, Ant, compression, Dojo, eclipse, Javascript, open source, Rich Client, Technical | 33 Comments »

Eclipse RCP Build tool for Dojo/Ant

Posted by Shane O'Sullivan on December 19, 2006

There has been a lot of talk currently about making the build system for Dojo simpler. The web based method (customise a build on the Dojo website and download it from there) definitely shows promise, and will be attractive to many users. However, I think that many developers would like to have more control over the build process, while still having the possibility of all of it being automated for them. For this reason I’ve decided to look in to the possibility of using an Eclipse based build system that can operate as a standalone Rich Client application or be a new perspective in Eclipse.

My current thinking is that it will be a generic Ant-based build system that can be customised for multiple “categories”, of which Dojo will be one. The use case is:

1. User chooses an Ant build file to import (either from an existing Subversion checkout or from a copy of Dojo downloaded by this application via Subversion)
2. View pane 1 lists all the available Ant build targets as a list of checkboxes that the user can select
3. View pane 2 lists all the properties that can be set on the Ant build. This pulls the original values for these properties from the build.xml file, but these can be overridden by setting some defaults in the application.
4. View pane 3 provides customised Dojo controls, and this is where the meat of the application will lie. These controls will be able to do a number of things:

  • Select combinations of build targets based on predefined settings. E.g . “release” and “intern-strings”
  • Set various properties on the build
  • Check out various builds of Dojo from SVN trunk and give the user the option to use the build files and/or source files from that release, or from the nightly builds.
  • Provide a list of build profiles that the user can choose from, with the possibility of also having a profile-builder that will automatically import a list of all the files that a user can choose and writes the profile for them

The advantages of this approach:

Easy to use

  • Works both online and offline (online for checking out builds, offline for building)
  • Integrates with Eclipse, so can be a standalone application or part of an existing development environment
  • Gives you complete control over the build process, while also simply letting you choose a profile and click “Build”
  • Users don’t have to install Ant, Subversion etc. All these utilities will be included in this application
  • Can leverage the Eclipse update mechanisms so that users can update their application from an Eclipse update site hosted at dojotoolkit.org
  • Fun to write

Disadvantages:

  • Large initial download – probably ~15megs for the standalone app, much smaller for just the Eclipse plugin set
  • A lot of work for me :-)

I’ve started work on this, and it’s showing promise. So, all comments and suggestions are welcome.

Update Jan 8th 2006: First beta of this program released. See here for details.

Update Jan 29th 2006: Second beta of this program released. See here for details.

Posted in Ajax, Apache, Dojo, eclipse, Javascript, open source, Rich Client, Technical | 8 Comments »

Software Factories in .NET, by Christian Weyer

Posted by Shane O'Sullivan on August 29, 2006

I went to an interesting talk tonight by Christian Weyer, where he described some of the upcoming features in Visual Studio, namely Software Factories. Software Factories allow you to customize and extend Visual Studio much more easily than before, so you can bundle together things like wizards, context sensitive menu actions, code generation etc. The slides from the event are available here.

Being the good Java-devotee that I am (I’m not religious about it or anything, they pay me to care :-) ), I of course pointed out that this is, in many ways, very similar to Eclipse perspectives, which also allow you to easily (“easily” being relative of course) extend an Eclipse rich client application with organised packages of code in Plugins and Features. These plugins and features are used to do everything in Eclipse applications, like wizards, context sensitive menu actions, code generation etc (seeing a pattern here?).

As I promised to Christian and others, here are some useful links to Eclipse documentation on this subject:

  • This is the basic, high level description of Eclipse perspectives, more from a users point of view than a developers.
  • Eclipse Rich Client tutorials Part 1, Part 2, and Part 3. Part 2 is where it describes Perspectives best.
  • A book, in German (for you Christian ;) ), on the Eclipse Rich Client Platform (RCP).
  • A screencast on Eclipse RCP application development. All RCP applications are based on Perspectives.ISV Guide pic
  • And finally, a plug, my RedPaper called “IBM Workplace Managed Client: ISV Integration Guide“, which describes a number of different methods of writing Eclipse RCP applications based on the IBM Workplace Managed Client application. (It’s really good, honest!). Much of the practices and technology described in this paper are used in the upcoming Lotus Notes release, codename Hannover.

All in all, it was a very good talk, with a packed room. It’s just a pity there wasn’t a screening of Blade Runner in a private cinema, like the last time I saw Christian present, in 2004. I guess we were a bit spoiled that time!

P.S. Thanks to Kieran from Digerati for telling me about the event.

Posted in .NET, eclipse, IBM Workplace, Microsoft, Rich Client, Technical, Visual Studio | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 533 other followers

%d bloggers like this: