You are currently browsing the category archive for the ‘Entity Framework’ category.

An italian article about comparison between NHibernate and Entity Framework.

Julie and overall community are speaking about EF4. Why I make a post on “old” v1? Well, start remembering that Julie’s book is just four months old, and David’s one is not here yet! They are Evangelists and they are one or two generations beyond us, but their books arrive very late!

I’m a technician, I like new technologies but I live solving customer needs, before than solving them with new technologies. And since .NET 3.0 (dated 11/2006) I feel “late”.

Only this year I developed one WCF application, two EF applications, one WP3D (non 2D!) apps. Yes, I develop Windows Forms apps yet. No WPF, no Silverlight: there is a (real spider) web on my WPF books in the shelf!

Ok. Stop crying (myself).

I’m tweeting in these days while reading Julie’s book. I have received a request asking me if I like EF compared to other solutions.

Well, I have to say:

  • I’m in chapter 12 (“Customizing Entity Data Model”) so the road is still long
  • I cannot say anything on NHibernate: I never tried it but I think that if people like Ayende is working on it, it must be a nice piece of software
  • I feel very comfortable in a CRUD desktop application about working with entities instead of dataset tables, first and foremost no table Adapters anymore!
  • I have not so complex applications in which “database-driven model” is a problem
  • I have not read yet, but one consideration I agree is that EF objects must be private and cannot be a DataContract in a Web Service. So you have to map (a second time, after EF mapping) EF objects with Domain Objects (The WCF project I have developed is done in this way).
  • I have learned (in terms of application maintainability) that a generated model, as EF one, would be better if it is not rooted by EntityObject and so EF4 will be EntityObject free. But I don’t feel this need if EntityObjects are only Data Model and Domain Model is another thing.
  • Must be the Conceptual Model the Domain model? I have spent four years (around 1999-2002) searching for an infrastructure for what became a Domain Model with object with behavior. Many (sorry, I did’t saved links) ask for objects with behaviour. Today I think is wrong. EntityObjects, by definitions, and by application, is data only. I solved my hungry with extension methods (no partial classes) for “lifetime” methods:
    • Preload
    • InitNew
    • Commit
    • Generate
  • I feel confortable with them
  • I feel that a strong point for EF are the three files (CSDL, MSL, SSDL) and that truly maintainable apps will skip designer and perform all definition jobs with T4 code generation or, better, a Domain Specific Language (higher that CSDL) do express specific applications need.
  • Yes, for me real DDD is not a Domain Model, but a DSL that generates the code for us, as more as it can. This is why I love Python, Ruby and the DLR!

Ok, stop for now.

Community reactions to EF4 are very positive: if think that the case about “poor” EF1 was only a problem of release date. I think that the EF team have very nice people!

I don’t think I’ll try NHibernate, I don’t feel the need: I’ll continue reading Ayende for sooooo long.

Sorry if I have said many stupid things.

Marco

My tweets

Follow

Get every new post delivered to your Inbox.