My personal opinion, and I'm pretty sure Dave feels pretty strongly
about this, is ColdSpring is not the place to handle creating of
value objects, including beans/tos. The top reason I would say being
that for every bean registered in the bean factory, ColdSpring will
create at least one cfc responsible for the creation of that object,
more if you define dependencies. Also, the steps involved in
returning an object are far more complex that simply creating the
object. Both Mach-ii and ModelGlue come with built in functionality
for creating beans, which is much more direct than using ColdSpring.
ColdSpring is far more suited to managing the lifecycle of objects
which persist in some scope as opposed to transient objects.
That being said, if you have pretty complex business objects that do
require dependency resolution, well than using ColdSpring to handle
their creation seems logical. But again, if we're dealing with
objects like beans behind forms, there's no way ColdSpring is going
to be as a better solution than m2 and mg's eventBean.
On Jan 8, 2006, at 2:05 PM, Peter J. Farrell wrote:
This question relates to a question just asked on the Mach-II list...
Can you use ColdSpring's Service Factory to create your
beans/value/transfer objects? What is the best practice? For some
reason, using CS to do seems wrong and I can't put my finger on it.
Does anybody have any good reasons why not. Typically I'll let the
internals of my service layer take care of init'ing my beans --
someone
else on the Mach-II list is using CS to do that.
.Peter
--
Peter J. Farrell :: Maestro Publishing
http://blog.maestropublishing.com
Rooibos Generator - Version 2.1
Create boilerplate beans and transfer objects for ColdFusion!
http://rooibos.maestropublishing.com/
- Member Team Mach-II
- Member Team Fusion