Loading ...
Sorry, an error occurred while loading the content.

100155RE: [XP] [OT] Delegation and YAGNI! And XML xref

Expand Messages
  • Steven Gordon
    Dec 1, 2004
    • 0 Attachment
      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:jeffgrigg@...]
      Sent: Wednesday, December 01, 2004 2:13 PM
      To: extremeprogramming@yahoogroups.com
      Subject: Re: [XP] [OT] Delegation and YAGNI! And XML xref




      --- Steven Gordon <sagordon@a...> 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.
    • Show all 24 messages in this topic