In the past 2 years since I started writing business applications (before I did
ID: 642849 • Letter: I
Question
In the past 2 years since I started writing business applications (before I did either high level front end or very low level systems programming), learned datasets, linq to sql, and now entity framework. The logical thing to look at next seems to be NHibernate.
Reasons I eventually ended up at EF are: (1) it has the best designer support and (2) it is the most supported by Microsoft.
Reasons (these have elements of assumption) I am interested in NHibernate are: (1) it might not get superceded by a totally different thing as quickly as MS churns data access technologies (2) It seems like its either the front running or second to front running tool for what it does and (3) It appears to be stable and tracable back through time quite a bit.
Has anyone published a comparioson of the two? Is one better than the other for certain types of architectures? Or is it just a matter of style and preference?
Explanation / Answer
At this point I think the main (only?) advantages NH has over EF are some very fine-grained fetching strategies. Instead of lazy-loading OR eager-loading everything, NH gives you some very nice intermediate options.
Having said that, I've never needed that level of control over my data access, and so the simplicity of EF has made the choice an easy one.
Just be aware that the EF designer file that's otherwise so nice to work with can become a nightmare in source control; it doesn't merge well, or at all. Make sure you check it out with an explicit lock anytime you need to change stuff.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.