Generally, you will want to consider a Service class (sometimes called  
a Manager) to "hide" your DAO or Gateway (and don't think you NEED  
both a DAO and gateway - for many applications that is overkill). The  
service class acts as an API to a business object. In my apps it acts  
as a factory for creating new instances (it has a .new() method) and  
provides access to operations like save(), delete(), getBuFilter() and  
the like. I also have save() and delete() methods on my business  
objects and you'll want to include as much business logic as possible  
in your business objects rather than the service layer.

Best Wishes,
Peter


On Apr 28, 2008, at 7:20 AM, wkolcz wrote:

> Thanks. I guess then it might be better to ask when is it most  
> appropriate to interact the controller with a Service Object and  
> when to interact with a bean to utilize the DOA and Gateway objects?  
> I need to learn what is the strong point and weakness of both so I  
> can know when a situation warrants one over the other.
>
> Wish there was a real one-stop-resource out there to cover OOD for  
> CF and all the design patterns. :-)
>
> From: "Brian Kotek" <[EMAIL PROTECTED]>
> Sent: Sunday, April 27, 2008 9:07 PM
> To: [email protected]
> Subject: [CFCDEV] Re: Noobie Question
>
> Wally, you're basically asking the question "what is the best way to  
> build my object model?", which is essentially an unanswerable  
> question because the answer it "it depends".
>
> When using Reactor and ColdSpring and Model-Glue, how do you know  
> that "this way is the better way of doing things"? And what answer  
> do you expect to the question "is it right to assume one should use  
> the Service Object to interact with the bean, the DAO, and the  
> Gateway?"
>
> The questions that you're asking are so dependent on what your  
> application actually needs to do, and the forces at play in your  
> specific environment, that they are nearly meaningless without far  
> more context. In some cases the answer will be yes and in some, the  
> answer will be no.
>
>
> On Sun, Apr 27, 2008 at 9:37 PM, Wally Kolcz <[EMAIL PROTECTED]>  
> wrote:
> Another thing. Using Illudium PU-36, it creates a Service Object.  
> After reading more up on it, is it right to assume one should use  
> the Service Object to interact with the bean, the DAO, and the  
> Gateway?
>
>
>
>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to