I’m wondering what people are doing as a best practice for the location 
of sophisticated business logic in a gateway/dao/bean pattern.

For example, I’m currently building an application that has three 
tables, one of them a linking table for a one-to-many relationship 
between the other two:

- User(userID, username)

- AccessKey(accessKeyID, userID, businessID)

- Business(businessID, businessName)

As a hypothetical example, let’s say that, every time I modified an 
access key, I wanted to verify that both the user and the business 
still existed before CRUD-ing an accessKey.  This would clearly be 
outside of a simple get/set operation.  Would it be best to put this 
logic in the DAO or in the gateway?  (I presume it should NOT be in the 
bean)  Currently I have the following functions in the

- DAO.cfc: read, create, update, delete

- Gateway.cfc: getByID, save, deleteByID, getAll

Would it make sense to create a new function in the Gateway.cfc called 
"saveAndCheck", then call the necessary DAO object(s) to use?

Thanks for any input,
Christian Briggs






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to