Infrastructure Drops Entity Framework in Favor of NHibernate

I did some searches for tutorials on Entity Framework (EF) + Code First.  Most of the tutorials I found involved clicking on some design time view and right clicking to add columns, then clicking and right clicking to generate the code first SQL.  It was neat, it was clean, and it was sort of fast.  However, it didn’t beat FluentNHibernate in cleanliness.  There still ended up being some huge and nasty generated (from the design time) file and some other things that just didn’t sit well with me.  With the host of other things that are just now getting developed for EF that have been in NHibernate for ages I’ve decided to yank Entity Framework support for now and just stick to NHibernate + FluentNHibernate.  Simply, it just works better and I have more immediate support, feedback, and input into what is available with NHibernate.  For Entity Framework nobody really has any of that, one has to wait for the Microsoft machine to move forward on design decisions before something gets dropped either via a proper version or CTP.  I’ll stick to the more responsive open source solution, k thx.  🙂

HOWEVER, In the future I do intend to add Entity Framework support, I’m just not spending the time right now.  I’d be perfectly happy if someone else wants to do so, just let me know…

In other news from the UI from of the Infrastructure Project, I’ve made another decision to use the Zen Garden CSS to setup the original layouts & such.  Since it is the UI, I thought that going with something that designers are more familiar with instead of the ASP.NET MVC Themes oddities (which I don’t even really know where they’re hiding those these days) would make things even simpler from that aspect.  A clear separation of concerns for devs vs. graphic artists & layout pros.

Anyway, that’s all committed and I’ll be building a new template before the end of this week.  As always, if you’re interested in adding to the project, or just using it, I’d love any and all feedback.

4 thoughts on “Infrastructure Drops Entity Framework in Favor of NHibernate

    1. 🙁 Now you’re motivating me to up the ante again and get the EF stuff figured out. Argh!?!?

      Maybe if I took a few days off from work, to write code… 🙂

  1. > “There still ended up being some huge and nasty generated (from the design time) file and some other things that just didn’t sit well with me.”

    In all fairness: who gives a shit. The stuff is generated for you, tucked away in a file, you compile it with the rest, you get a working binary image you can give to your customer/client and they’re happy.

    Writing software isn’t about you writing code which can also be generated. Writing software is about solving problems for your clients/customers with software.

    1. You’re missing a key objective point. That generated file then must be regularly maintained. If the database changes, then that file become error prone and almost impossible to read by the developer. It’s much easier and reliable to read plain POCO style entities instead of entities that have lots of generated metadata around them that cause difficulty in reading the file. Microsoft often even tells people, don’t change these files yourselves. The problem lies in the fact, that after a number of changes, the files eventually get corrupted and one has to go back to the drawing board anyway…

      …and I almost feel stupid explaining this to you. If the code generated was readable, I’d be all for it, but it isn’t and I’ve already seen too many dev groups get sucked down the dark hole of ever increasing technical debt. Easily developer readable files is what I want. I’ll probably end up with at least one template with the generated stuff, just because I’m sure a lot of people will go that route. Keep the projects simple and maybe they’ll never run into problems. Then all is great…

      either way, cheers, I see your point but intend to prepare for multiple scenarios. Also, does this mean you want to contribute and add the design time version? 🙂 Because if you do I’d be more than happy to have your input! Also you could contribute an LLBLGen Version! Now that would be freakin’ awesome! Alas, I’d work toward one, but I don’t have a license to LLBLGen. 😉

Comments are closed.