Complex EDM

time to read 3 min | 418 words

Hammett posted "Is EDM the unlearned EJB lesson?", he is not impressed with the amount of complexity that is required. I reviewed EDM a while ago, and came back unimpressed, I guess that I'll have to look again to see what they did in the meantime.

Here are some interesting quotes from Hammett's post.

They have also tried to achieve what seems to be unique features on their Entity framework, which is the ability to compose an entity as a logical view of n tables.

This is something that Hibernate (but not yet NHibernate) actually supports, using the <join table="employees"/> syntax. You can get some of the details here. I remembered seeing something about that in the Hibernate documentation, and indeed, I found this:

We consider it an essential element of good object model design that the object model be at least as granular as the relational model. If the original data modeller decided that certain columns should be split across two different tables, then there must have been some kind of conceptual justification for that. There is no reason not to also make that distinction in the object model.

I can certainly agree with the sentiment above.

The only cases when I wanted to do something like this was when there was something really bad in the data model in the first place. I should mention that this is also extremely easy to build using the Delegate pattern at any rate. Scratch that one as an important feature.

If you have to rely on tools to use a technology which otherwise you just couldn’t do it, maybe there’s something wrong with it!

Oh, yeah! With that we are fully in agreement. I am so pleased that Microsoft released the .Net 3.0 without releasing all the tools for it. It means that the technology had to be usable with the crutches of the tools.