Christian,
 
Have you explored Flex data-services ?   These CRUD operations on managed collections are *so* quick to develop with FDS....we've already done all the heavy-lifting for you !
 
Steven
 
Steven Webster
Practice Director (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6108
m: +44 (0) 7917 428 947 
[EMAIL PROTECTED]

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Briggs, Christian M
Sent: 07 July 2006 16:25
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DAO Best Practices

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

__._,_.___

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





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to