Resource Injection with Fuse 0.4

Daniel Spiewak, editor for the EclipseZone, and I released Fuse 0.4 this weekend. Fuse is a resource injection library mainly thought for GUI programming. I presented Fuse several times in this blog already.

The two major features in Fuse 0.4, at least to me, are the resource caching to improve performance and the auto injection facilities. For instance, when you build a Swing UI, Fuse is able to detect any new component you add in a JFrame and automatically inject its resources.

While Fuse was created to help build Aerith, it lacked real world testing. Daniel has been using it for almost a year now in a large-scale product and this helped him get rid of many bugs and improve performance. Fuse is released under the BSD license and provides support for both Swing and SWT.

12 Responses to “Resource Injection with Fuse 0.4”

  1. Augusto says:

    Hi Romain, this looks pretty cool. Any quick comments on the pros and cons of this approach vs some of the basic stuff the Swing application framework does in this area? (which injects resource strings and the like too)

  2. Romain Guy says:


    Well, that’s an easy question. Swing Framework’s resource loading was inspired by Fuse. I discussed it in lengths with Hans Muller, the spec lead. The major difference is that Fuse supports SWT and more data types.

  3. Rafael Fiume says:

    It sounds great!

    How Fuse is related with resource injection in Swing Application Framework (JSR-296)? Do I have to choose between one or another?

  4. Rafael Fiume says:

    Ops! Posted in the same time…
    I got the answer.

  5. Romain Guy says:

    You can use both. JSR 296 injection was based a lot on what Fuse does. If JSR 296 does not provide you all the injection services you need, take a look at Fuse.

  6. Rafael Fiume says:

    Ok, thanks Romain.
    I’ll take a look at Fuse.

  7. Bruce Scheidemantel says:

    Romain,is there significant overhead for each data type supported? Do you know why JSR-296 supports only a subset of the data types supported by Fuse? Finally, how hard is it to make this generic to support both SWT and Swing, and thus make it a true ‘standard’?

  8. Romain Guy says:


    The only overhead is the size of the library. If you look at how Fuse is implemented, adding support for new data types doesn’t cost anything (or so little, that it does not matter.) JSR 296 supports only common types whereas Fuse is aimed at supporting a wide spectrum, because that’s what I needed: gradients, alpha composites, etc.

    Are you talking about making JSR 296 generic enough to support both Swing and SWT?

  9. Great job Romain! can’t wait to see your Groovy + Fuse + JSR 295 + Timing framework demo.

  10. Romain to the rescue! Thanks for such a fantastic new addition. We have started adding it to Palantir, our product you were so kind to mention on your blog a few months ago. Add one more notch to your rich-clients-using-fuse belt.

  11. Romain Guy says:

    Thanks Carl! I’m glad to see it’s useful to you guys, I really like your UIs :)

  12. This is a outstanding piece of writing, I discovered your blog site browsing bing for a related subject and arrived to this. I couldnt come across to much additional information on this piece of writing, so it was good to discover this one. I will likely end up being back again to look at some other posts that you have another time.