IOC vs BeanFactory -- is there a good reason to go one way or the other?

Hi all,

I'm gradually making progress on getting a handle on the wonders of
coldbox and I'm up to exploring the various methods available for
handling the model. I initially started by setting up Lightwire, which
seems to make sense and all works nicely. I then noticed that CB
appears to have its own methods for dealing with injection and
singleton caching and so forth. This leaves me with a few questions:

a) is there any benefit to using lightwire vs the CB "native" bits?
b) are the two engines designed to be used in collaboration with each
other or does one replace the other? Is the CB getBean stuff an
interface to lightwire or is it a completely seperate entity?
c) I've read the caching docs for coldbox, but exactly what difference
does using LW or CB make to caching? Is one faster than the other for
creating transients like the user bean below?

Say I have a gateway object which has to create a new User bean. I've
tried the two methods below and both work fine, but I can't see any
clear reason to use one over the other.

LIGHTWIRE:

<!--- metadata --->
<cfproperty name="ioc" inject="coldbox:plugin:IOC" scope="variables" /

<!--- create a bean --->
<cfset var User =
ioc.getBean("UserBean").init(argumentCollection=arguments) />

OR BEANFACTORY:

<!--- metadata --->
<cfproperty name="beanFactory" inject="coldbox:plugin:beanFactory"
scope="variables"/>

<!-- create a bean -->
<cfset var User =
beanFactory.getModel("com.model.security.User").init(argumentcollection=arguments)>

I haven't used lightwire.

b) It's a completely separate entity. CB has support for lightwire but
it also has support for coldspring. For version 3.0, the dependency
stuff is being refactored into its own framework called wirebox.

- Gabriel

Thanks for the reply --

Sounds like I'd be better off exploring the built in wirebox. Are the
docs for that up to date?

Look for the word "autowire" on the docs page.

Aaron Greenlee

http://aarongreenlee.com/
Twitter: aarongreenlee