QuackFuzed.com is the personal ColdFusion coding blog of Matt Quackenbush. It exists primarily as a place for the author to learn, and hopefully to assist others in learning and/or avoiding some of the same pitfalls and mistakes. (Quack certainly makes enough mistakes daily to make up for the entire ColdFusion community.)

To Gateway Or Not To Gateway?

Posted on August 29, 2007 at 3:54 PM in ColdFusion

So my good friend Charlie Griefer has finally decided to take the OOPlunge. He has started a series of posts about his OO learning expedition, aptly entitled going OO. Good reading.

Sean posted the following comment to one such post...

"You're starting down the path of the "5:1 Syndrome" where you are going to end up with bean + dao + gateway + manager/service + controller for every single table in your application.

"Whilst that may seem a common practice in the ColdFusion, it's not a good one - and since you clearly want to understand OO and write good OO code, let's at least get the word out as to why

This comment made me question my own understanding of why I do things the way I do them, which has generated this post from me.

[Continue Reading]

Comments
(Comment Moderation is enabled. Your comment will not appear until approved.)

On 8/29/07 at 9:58 PM, Sean Corfield said:

And another point to consider is that the "DAO" (in CF terms) often goes away completely if you use an ORM since basic CRUD is handled automatically.

I find more and more that I don't have DAOs in my apps because I use Transfer and it encapsulates that behavior centrally for all objects. At most I may have a few methods in my gateways that wrap the use of Transfer to provide a consistent, gateway-only API.

In other words, as far as I'm concerned, the gateways are fine and it's the (CF) DAOs that I've moved away from...

On 8/29/07 at 11:30 PM, Matt Quackenbush said:

Sean,

Thanks for the reply. I almost put in the post the point about an ORM, as I am in love with Transfer myself, but figured it was another topic. I now see that it wasn't gateways per se that you were pointing out, but rather the (CF) DAOs, as it were. Since you didn't rip apart my post, I feel confident again that I am still on the right track in my own OO (as it relates to CF) adventure. :)
CodeBassRadio

Latest Articles

Eventually something really brilliant and witty will appear right here.

Calendar

August 2007
S M T W T F S
« Jul   Sep »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Subscribe

Enter a valid email address.

The Obligatory Wish List