Trying to wrap my head around CS

42 views
Skip to first unread message

Christopher Jazinski

unread,
Feb 15, 2013, 10:16:18 AM2/15/13
to coldspri...@googlegroups.com
Needless to say I'm kind of late jumping on the CS train. Currently I use CF's ORM (hibernate) in most of my projects. I'm not really seeing the benefits of using the framework as for me personally I tend to just have one CFC with its properties and use ORM to handle the data. Therefore I don't really see myself building many gateways,DAOs where the dependency injection will really pay off. I will build a service layer on occasion. Having said that is that bad practice? Should I still be creating these various gateways,DAOs even though ORM will be doing most of the work out of the box? I'm not trying to ask about design patterns here I'm just trying to understand if this is still useful for me to pick up as it really feels like i'm taking one step back. I do like the benefits of what AOP can possibly bring to my world. Is CS still actively being developed it seems everything that I find is somewhat stale information. Is there an example or people that have done presentations on using CS with ORM (I see many older things talking about transfer) w/hibernate. Is there other frameworks that could possibly be easier to see the benefits right off the bat (with ORM)? I've seen a few of the CF Meetup presos on it but it still seems somewhat vague. Thanks for your input.

Brian Kotek

unread,
Feb 15, 2013, 5:55:53 PM2/15/13
to coldspri...@googlegroups.com
At minimum, you should be creating services. Gateways can also be useful if you want to abstract away the persistence mechanism. 

There are some techniques to use IoC with model CFCs, but it's more difficult because CF provides no built-in way to intercept the creation of these CFCs so that the IoC container can process them. 

On Fri, Feb 15, 2013 at 10:16 AM, Christopher Jazinski <ch...@jazinski.com> wrote:
Needless to say I'm kind of late jumping on the CS train. Currently I use CF's ORM (hibernate) in most of my projects. I'm not really seeing the benefits of using the framework as for me personally I tend to just have one CFC with its properties and use ORM to handle the data. Therefore I don't really see myself building many gateways,DAOs where the dependency injection will really pay off. I will build a service layer on occasion. Having said that is that bad practice? Should I still be creating these various gateways,DAOs even though ORM will be doing most of the work out of the box? I'm not trying to ask about design patterns here I'm just trying to understand if this is still useful for me to pick up as it really feels like i'm taking one step back. I do like the benefits of what AOP can possibly bring to my world. Is CS still actively being developed it seems everything that I find is somewhat stale information. Is there an example or people that have done presentations on using CS with ORM (I see many older things talking about transfer) w/hibernate. Is there other frameworks that could possibly be easier to see the benefits right off the bat (with ORM)? I've seen a few of the CF Meetup presos on it but it still seems somewhat vague. Thanks for your input.

--
You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldspring-use...@googlegroups.com.
To post to this group, send email to coldspri...@googlegroups.com.
Visit this group at http://groups.google.com/group/coldspring-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Chris Blackwell

unread,
Feb 16, 2013, 11:17:07 AM2/16/13
to coldspri...@googlegroups.com
So if you don't create services and gateways how do you access your orm entities? entityLoad in your controllers?

I think its accepted best practice to use a service layer and a gateway to manage persistence, I certainly wouldn't write my code any other way.

As for IOC on model cfc's, use a factory, or if they are persistent entities have your gateway autowire them. all this is bread and butter stuff for coldspring.

Chris

James Holmes

unread,
Feb 17, 2013, 4:46:33 PM2/17/13
to coldspri...@googlegroups.com

One of the main benefits of IoC is in testing. Writing a unit test is a lot easier when you can just mock a gateway instead of having to wrangle with the ORM. It also helps keep your code loosely coupled.

Reply all
Reply to author
Forward
0 new messages