LightWire 0.62 - Ghetto Annotations!

Want to see what it is like to let your bean dictate some of its dependency injections? Try out LightWire 0.62. For now it is just for mixin injections and requires you to add a simple cfset in your init() methos rather than adding true annotations and reading them via getmetadata.

The bottom line is that if you'd like to move some (or all) of your bean definitions into your beans a la Google Guice, 0.62 lets you give it a shot.

I'm looking for feedback on how this should work before I implement it in a more elegant manner, but it's tested and working on my sites, so check it out and let me know what you think!

To add mixin injections (in addition to those described in your central bean config) add the following to your init() method (MUST be in the init() method):

<cfset variables.MixinObjectNameList="UserService,ProductService">

Replacing "UserService,ProductService" with a comma delimited list of bean names you want to inject.

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.5.006.