Guilty in first degree

 
event
Note: This post was never supposed to exist, but since I felt that the post mother was getting somewhat lengthy, I moved some of the content from that post to this one.

Fact is we are guilty. Yes we are. We have created yet another ORM (YAO in today's world of 3 letters acronyms - TLA). We I say WE, I am referring to a project team-mate, credit to whom deserves, but we happen to share project and since I/we couldn't keep him from doing it, I/we will share some of the guilt.

To be perfectly honest, we had to do it. Background is: Commerce Server Profile System. For those who do not know it (I was one of those) it's kind of a pseudo-ORM itself. In the sense that you create overly complicated mapping files in XML, you perform some clicks on a terribly user-unfriendly application to repeat all the information you did before and you get a full object model in which properties you defined are accesses using strings with no type safety whatsoever (sigh). For some more information around the subject and motivations, hear it from the mouth of the culprit ;-) Magic String Galore and The Starter Site.

Anyway, we all love type safety. We despise those who advocate loosely typed languages (not really, do not attack my blog), so we have to have wrappers around those objects.

Code generating? Well... not really in the mood. Let's do it the "hard way" and create some kind of mapping engine that using overly complicated rules (due to different types systems, magic strings again) ties up both worlds in a nice-enough way.

Those wrapper objects are essentially DTOs decorated with mapping attributes which bring the opportunity to show: Ye Olde 2.0 Code