I'm just wondering what are some best practices for returning values after
an actual database operation. I have a data layer object that handles doing
things such as inserts and updates to actual database records. For instance,
I have a InsertPage(Page) method that takes an instance of a 'Page' object
and does a database insert. What should I be returning from the InsertPage()
method? Should it be:
1. a boolean indicating success of failure
2. id of new record
3. a structure containing the following keys:
- status (success or failure)
- error (structure with type and message keys)
- obj (the updated object)
- timestamp
4. something else?
I like the #3 idea but am curious as to what other folks are doing.
Thanks,
Phillip
--
Phillip Cave
Director, ColdFusion Development
Macromedia Certified ColdFusion Developer
Carol/Trevelyan Strategy Group
202.448.5212
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]