Concept Question: Coldbox + Autowire vs Coldspring

Hi, I'm new to all this so I'm trying to wrap my head around some of
these concepts. I'm hoping someone can shed some light on the question
that's nagging me.

I'm looking at coldbox + transfer + coldspring. I understand how
coldbox and transfer fit in and relate to each other. However, the
question nagging me is: "If I use the autowire interceptor in Coldbox
to load dependencies, do I even need to use coldspring?"

I'm reading the documentation and different blog postings but I just
can't seem to find why I need coldspring if I can just use the
autowire interceptor in coldbox.

Thanks,
Gabriel

Gabriel,

If the key word of your question is “need”, then the answer is you don’t need coldspring. It all depends the complexity of your application and what features you need or don’t need to take advantage of. Coldspring offers many advanced features that you won’t find with the ColdBox autowire interceptor. So there are many reasons to use ColdBox + Transfer + ColdSpring. That’s what I use in all of my applications. But if you’re just doing basic autowiring, then there’s no reason to add ColdSpring to the mix.

Don’t ya just hate those “it depends” questions? :wink:

Thank you, Matt. Yes, I saw from the documentation that there’s definitely a lot more to coldspring.

As I’m just taking baby steps into the OO concepts and frameworks used, I wanted to be clear that, in terms of basic autowiring, the coldbox autowire interceptor and coldspring were doing the same thing. I couldn’t move past it feeling like I had missed something.

Gabriel,

I would like to suggest to use Coldbox Model Autowiring, its simple, easy and no more headache of having a config. Module layer is far more faster than using a coldspring.

Also its convention based, so its really good starting point for developer who like to learn and implement OO.

Thanks
Sana

Maybe, if you are learning IOC, then it might be a good idea to not
autowire, so you get your head around it more easily.
When you autowire its more easy to forget what you autowired (as its
not clear from xml), and autowiring also has a bit less possibilities
then definining the dependencies in xml.

At the moment i use coldbox autowiring only for my handlers, and for
the rest coldspring. But im wondering if i should inject them with
coldspring too. When you dont use autowiring your coldspring xml file
will have a complete map of which components are dependent on which
others..

greets,
klaas

@Sana,

Yes, that’s the direction I’m headed in. I just wasn’t comfortable cutting coldspring out without confirmation that it was, for autowiring, doing the same thing.

I am analyzing the “simple blog” 4 part sample app and coldbox, transfer, and the service layer all clicked in my head. But when I got to coldspring, the benefits of it didn’t click because it just seemed like a more complex way of doing what the autowire interceptor was doing.

I’m now comfortable moving forward with just Colbox and Transfer, so, thank you all. Coldspring can always be added to the mix later if and when I encounter a problem it fixes.

@Klaas,

Please correct me if my understanding is wrong but it seems like the coldbox autowiring addresses some of those issues.

  1. “When you autowire its more easy to forget what you autowired (as its
    not clear from xml)…”

My understanding of coldbox autowiring is that dependencies are laid out as “cfproperty” injections in the component. So you can’t forget what was autowired because it’s right there on top when you open the component.

  1. “When you dont use autowiring your coldspring xml file
    will have a complete map of which components are dependent on which
    others…”

With coldbox autowiring, I don’t see a complete map of which components are dependent on which others. But, if you open up any single component, you do easily see its dependencies because, again, they’re laid out as crfproperty injections on top.

Hi Gabrial,

you can generate doc very easily, coldbox offer a plugin cfcViewer