That's a very fair assessment, and one that having read, I would agree with. :-)
On Tue, Aug 26, 2008 at 9:52 AM, Brian Kotek <[EMAIL PROTECTED]> wrote: > I would differ from Matt on this though: > > On Mon, Aug 25, 2008 at 9:58 PM, Matt Quackenbush <[EMAIL PROTECTED]>wrote: > >> I think it is a bad idea to have CRUDs for multiple tables living in the >> same DAO. Does that answer your question? >> > > A DAO is something that lets you persist an *object*. It really shouldn't > matter if that "maps" to one database table or 10 database tables. If it > takes 10 tables to properly persist your domain object, then the DAO should > deal with 10 tables. While it is *common* for an object to map to a single > table, this is definitely not mandatory. DAOs exist to "translate" a domain > object into some kind of persistence system. The key is to think from the > object model back, not from the database forward. > > That said, I wouldn't put *unrelated* queries into a DAO. It shouldn't just > be a dumping ground for random queries. In other words, don't create some > "uber-DAO" that tries to do everything. > > My two cents! > > Brian > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
