Fuse 0.1: Very Soon

Daniel Spiewak and I are working on Fuse 0.1. He's a SWT guy, I'm a Swing guy, so Fuse will be able to cover both toolkits :) In fact, we introduced API changes for SWT. You can now set properties on an injector with setProperty(). You can also set properties common to all injectors with setCommonProperty(). These properties are passed to the type loaders. For instance, SWT type loaders require some extra resources like a Display or whatever it is that SWT requires. The bottom line is you can “customize” type loaders. The doc needs to be updated to reflect this.

Daniel also implemented a new fallback feature for properties. If a property is not found, and if you did not use the key parameter in @InjectedResource, then Fuse will try to find a property named *.name. For instance, if you have a field named MyComponent.foreground but no corresponding property, *.foreground will match. You can see those properties as common or global properties.

Before releasing Fuse 0.1, Daniel and I are trying to figure out a way to have modules in Fuse. Fuse/Core will contain the basic API and the common type loaders (String, int, double, etc.) whereas Fuse/Swing and Fuse/SWT will contain a set of type loaders specific to the corresponding toolkit. We have to finalize the API but here is what you will do before using a module:


I am not really happy to force users to make another API call but it offers a good flexibility. Fuse will be distributed as several JAR files: one for /Core and one for each module. Ultimately, this would allow other people to write their own modules (for instance Fuse/JSF or Fuse/Whatever.)

The public API should now reach a stable state. I doubt we will add more features in the incoming releases. I really want this API to remain simple. More details when Fuse 0.1 is out :)

Comments are closed.