An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Are you really using ColdSpring?

May 21, 2007 · 2 Comments

Brian Kotek has an excellent post about using ColdSpring to its full potential, in response to a series of articles on Tom Chiverton's blog about building services with ColdSpring and Reactor. Brian shows how to use the factory-bean and factory-method descriptors in your ColdSpring XML file to handle automatic injection of beans obtained from factory objects that are also managed by ColdSpring. It's a powerful technique that helps completely remove a number of dependencies from your application code. I use the same technique with Transfer and ColdSpring:
<bean id="dataSource" factory-bean="transferFactory" factory-method="getDatasource" />

<bean id="transfer" factory-bean="transferFactory" factory-method="getTransfer" />
This allows me to inject the data source object and the main Transfer API object directly into my service layer objects so they don't have to know about the Transfer factory at all.

Tags: coldfusion · coldspring · orm

2 responses so far ↓

  • 1 Boyan // May 22, 2007 at 6:55 AM

    Sean,

    is there some tutorials or something like it on using ColdSpring or LightWire with MG? I like the concept but I'm new to it and it seems I can't find simple docs to get me started.
  • 2 Sean Corfield // May 22, 2007 at 8:17 AM

    @Boyan, there isn't much tutorial documentation out there really. Ray Camden ran a series of posts about Model-Glue on his blog that might help you. Joe's &quot;Blog in 9 minutes&quot; video might help. Google for those. Otherwise, get on the Model-Glue mailing list (on Google Groups) and ask questions.

Leave a Comment

Leave this field empty: