Skip to content
Print

Fuse 0.4 Release

2
Jun
2007

Some of you may know that I worked (and have been working) on a little open source project with Romain Guy called Fuse, hosted under SwingLabs at java.net. (not related to the Filesystem in Userspace project) It’s a pretty neat project that was actually started by Romain to assist in the development of the Aerith demo (shown at JavaOne 2006).

The whole idea behind the project is to provide a simple, easy to use resource injection library. Resource injection is different than dependency injection for a number of reasons (explained in more detail on the project page), but suffice it to say that this is an incredibly useful little library that makes centralizing your resource configuration a piece of cake.

I started using Fuse on a regular basis at about the same time I stopped developing Fuse on a regular basis. :-) After I started my latest contract work (back in early last July), I no longer had enough time to devote to the project, so it went by the wayside almost immediately after the 0.3 release. Romain too, was working on various projects (including the book Filthy Rich Clients, coauthored with Chet Haase), so the project really would have just lain dormant for a while, except that I was actually using Fuse in the project I was working on.

This was really the first time (that I know of) that Fuse was used in a solid, large scale application. Those of you that have developed experimental libraries in the past know that you don’t really know that an API is working the way you want until it’s tested in a bona fide application. Well, that was true with Fuse too. In the process of using Fuse, I was able to isolate and fix a number of pesky little bugs that had slipped through our unit testing, as well as improve performance immensely.

Most of the changes made to Fuse were bugfixes, but the big ticket new feature is transparent caching of loaded resources. If a resource has the same value and type as one which has already been instantiated and injected, that instantiated instance will be used. Since Fuse is designed for (though hardly limited to) the injection of immutable resources, this works out really really well. I’ve noticed a huge return in performance from this simple change (alla GUI load times 2x as fast).

Most of these changes (including caching) were made gradually over the last 10 months, so there wasn’t really a clear line where we could say “this constitutes a release now.” For my project, I was just using a custom build of the CVS HEAD version of Fuse, rather than the 0.3 “stable” release. Ironically, it had gotten to the point where I was actually telling other people to use the HEAD version since I knew that it would be more stable and performant than the 0.3 release.

Eventually (as in yesterday), Romain and I decided that there was no real reason to hold off on a release any longer. While our documentation may still be woefully out of date, and while neither of us remembered enough changes for an impressive RELEASE NOTES, we still think that pushing out 0.4 was the right choice.

So, the 0.4 release is now up on the java.net servers and available for download here. If you’re interested in Fuse, or if you’re using Fuse already (especially if you’re using Fuse already), I suggest that you run over to the download site and grab the latest version. There were no API changes in this release, so it should just be a drop-in replacement for the 0.3 version you’re using now.

Oh, if you’re interested in Fuse, there’s some very good explanatory documentation on the project page. It’s a bit out of date (I don’t think it mentions auto-injection even once), but it does a good job on the concepts and provides a solid starting point for anyone wanting to try the library for themselves.

Comments

  1. How does this compare to the resource injection in JSR 296 Swing Application Framework? Just curious.

    Alex Miller Tuesday, June 5, 2007 at 3:35 pm
  2. No idea actually. :-) I haven’t looked at JSR 296 very much.

    I seem to remember a talk given at JavaOne 2006 which talked about the application framework a bit and resource injection. Now, if this is the same bit of resource injection that you’re talking about, then the resource injection in the SAF is in fact a simplified rewrite of the Fuse concept (annotations based resource injection).

    Daniel Spiewak Tuesday, June 5, 2007 at 3:37 pm
  3. Ok, I looked a bit further into SAF resource injection. It definitely looks like a highly simplified Fuse. Fuse can do everything that SAF RI can, as well as quite a bit more generalized injection. Also, I don’t know if SAF RI actually caches the resource values, which would mean that Fuse is probably more performant than SAF RI.

    Daniel Spiewak Tuesday, June 5, 2007 at 4:14 pm
  4. SAF resource injection was inspired mostly by Fuse since I was at Sun at the time Hans Muller designed it.

    Romain Guy Thursday, November 8, 2007 at 11:29 am

Post a Comment

Comments are automatically formatted. Markup are either stripped or will cause large blocks of text to be eaten, depending on the phase of the moon. Code snippets should be wrapped in <pre>...</pre> tags. Indentation within pre tags will be preserved, and most instances of "<" and ">" will work without a problem.

Please note that first-time commenters are moderated, so don't panic if your comment doesn't appear immediately.

*
*