this is a blog by Jeff Perrin, a software developer based in calgary alberta

Persistence Ignorance

People are talking about Microsoft's Entity framework and how it does not currently allow persistence ignorant domain objects.

I've been torn about this issue for a while now. On the one hand, having an O/R mapper that is persistent ignorant essentially means that it has to support XML mapping files. The downside to this approach is duplication of each entity's properties (which leads to managing them in multiple places), having to edit and maintain these files, and not being able to see mapping information all in one place. This price is often worth it, though.

On the other hand, using attributes to specify mapping information leads to less "code" to manage, and the advantage of having your domain class and mapping information all in one location. The price is that your domain objects have to know about the persistence framework.

The one thing I've observed recently is that most of the Java developers I've talked to who've used Hibernate in the past are excited and relieved that the latest versions support annotations (attributes in .NET) for specifying mapping information. Most of them seem to dislike mapping via XML files, and feel that the price of using annotations is worth it.

It's too bad for Microsoft that nHibernate already supports both methods, so they'll have to as well if they want to keep up.

Obscuring HTTP

For Posterity’s Sake