If you are persisting in a relational database, impedance mismatch suggests that at some point the 1-1 correspondence will break down. One could elaborate the naming convention to distinguish the names the classes and properties that have a 1-1 correspondence with a database entity from those that do not. Once you start down that road, it is difficult to know when to stop elaborating the naming convention. In any case, you would still need a mechanism to handle the mismatches.
In a language like C#, using attributes to define the database mapping might be an interesting approach that would allow you to keep the mapping information with the class itself. Has anybody tried using attributes for that purpose? -----Original Message----- From: Jeff Grigg [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 2:13 PM To: [EMAIL PROTECTED] Subject: Re: [XP] [OT] Delegation and YAGNI! And XML xref --- Steven Gordon <[EMAIL PROTECTED]> wrote: > [...] It does not feel like OnceAndOnlyOnce when I have > to keep the database, code, and XML descriptors in synch. > Of course, an Eclipse Plugin with XDOCLET-like functionality > could automate a lot of the synchronization issues away. And so would a good naming standard. With appropriate automation. Consider: Suppose the Customer class was stored in the CUSTOMER table, and the Employee class in the EMPLOYEE table. Why is the source of this cross-reference data an XML file, rather than a general rule? Same for columns: Suppose the 'firstName' attribute is stored in the 'FIRST_NAME' column. If you had naming standards and rules, you'd hardly need a cross-reference file. To Post a message, send it to: [EMAIL PROTECTED] To Unsubscribe, send a blank message to: [EMAIL PROTECTED] ad-free courtesy of objectmentor.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/extremeprogramming/ <*> 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/
