As others have pointed out, this post (and the other one, actually) come down to a great deal of personal preference and context. If your intent is just to hear the range of ways other people are doing things, fine. But if you're looking for some kind of rulebook, you're not really going to find it.
On Wed, Jan 28, 2009 at 4:20 AM, Henry <[email protected]> wrote: > > - Do you have Save() that automatically determines calling Create or > Update? determined by isDirty flag? > Transfer does this for me. > > - What other methods do you have in DAO beside CRUD? > Anything related to the database. > - Do you usually delete, or soft-delete (set a isDeleted bit on the > record)? Would you still name the soft-delete function delete()? > It depends on what you're deleting. > > - Does CRUD all takes in the bean as the argument? or just beanID for > read() and delete()? > I usually pass the id. > > - Do CRUD methods return boolean for success or fail, or throw the > actual database exception if error occurs? > Exception. Boolean result flags are the devil. > > - Lazy-loading to all children properties? > Depends. Again: Transfer. > > - Assuming you have no Gateway object, do you return a collection of > objects or a query? or.. IBO? > I use a query. Otherwise you can look at an IBO. A collection of objects will become slower as the result set increases. > > - Do you have separate methods for returning array / query? Or one > method that's based on a returnType parameter? I have separate abstract methods that do this. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
