By Peter Bell

Coldbox and Lightwire

One of the many stories I didn't get a chance to mention recently was the great efforts by Aaron Roberson and Luis Majano. LightWire is now a supported DI engine in Coldbox.

Great work guys - many thanks!

LightWire: Paul Marcotte on the new "mixin" tag

One of the differentiators of LightWire is the concept of "mixin injection". It could more properly be called generic setter injection and the idea is to provide the benefits of setter injection (the ability to handle circular dependencies) without having to clutter up your classes with a bunch of setters that you're never actually supposed to call.

Paul has added a tag to allow you to describe your mixin injections using an XML config file. Check out his posting for more information.

LightWire Preso Recording Available Online

As Nick just mentioned, the LightWire recording is now available online.

The presentation provided a brief intro to Dependency Injection, a short overview of ColdSpring and then ran through how to use LightWire and why you might consider it for some use cases.

If you're interested in why you might want to use a programmatic config file, "mixin injection" or "ghetto annotations", check it out. Good Q&A at the end, and as always, Joe had the last word (ColdSpring Forever *grin*).

Programmatic Config Files and Automagic Configuration

Something I was getting really tired of in my framework was that every time I added a new feature (controller) or custom data type, not only did I need to write the CFC, but I also had to add the bean definition to my config file. With the programmatic config file in LightWire, I was able to write a script to automagically instantiate and inject all of the custom data types and features by looking at all of the CFC's in the appropriate directories . . .

[More]

ONLINE LightWire Preso at 2pm EST Today

Just realized I hadn't made it at all obvious. The preso today at 2pm is online. Just click here just before 2pm EST if you'd like to attend!

This is a redo of last weeks which was marred by some technical glitches. Thanks to the CF Frameworks crew for putting this together.

Programmatic Configuration and Virtual Beans

Something else I'm going to be presenting today at 2pm EST in terms of the kinds of benefits you can get by using a Dependency Injection engine with a programmatic config file . . .

[More]

An Example of the Benefits of a Programmatic Config File for Dependency Injection

I'm giving a presentation at 2pm EST today on LightWire. As part of that I decided to finally take a few minutes to mock up what a small part of my config file would actually look like if I did it in XML rather than programmatically . . .

[More]

When NOT to Use Dependency Injection (introductory)

While I can't imagine any non-trivial OO project that I wouldn't use dependency injection for, there are specific tasks within a project that don't necessarily need DI. Someone asked me a question earlier today which raised a good point when getting comfortable with DI - the difference between a dependency and a runtime bean request . . .

[More]

InitMethod Added to LightWire

I just had a use case where I needed the ability to call a custom init() method after fully initializing a bean but before returning it from LightWire (I needed a config method for my #BusinessObjectName#Metadata config beans to automagically add any config properties I hadn't explicitly set for an object). In the past I'd just called super.config() at the end of the init() method, but that didn't allow for metadata inheritance (if you called MyUserMetadata that extended UserMetadata config would get called twice and it'd get nasty). So, I have officially added support for an InitMethod property to the addSingleton(), addTransient() and addBean() config methods. This has not been added to the ColdSpring XML reader, but I'll have a word with Paul and wouldn't be surprised if this got done soon. For now I've just updated the LightWire svn repo for anyone in a rush to use the feature :->

LightWire Preso - Apologies

To the few, the trusty who sat through almost 40 minutes of technical issues, many thanks for hanging in there :->

After resolving sound, screen sharing and connectivity issues, we finally gave up the ghost when my Internet went down hard for almost 10 minutes.

The preso will be rescheduled, and the preso will be fully debugged so it should be nice and smooth next time. I'll post the new time when I get confirmation from Nick.

More Entries

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