nhibernateormibatis.netdata-mapping

What is the difference between NHibernate and iBATIS.NET?


I am looking for some up to date information comparing NHibernate and iBATIS.NET. I found some information searching Google, but a good bit of it applies either to the Java versions of these products or is dated.

Some specific things I am interested in:

Real world examples of observed benefits and drawbacks are appreciated!

EDIT: Thanks for the information. I am doing my own evaluation as well. One thing I am wondering about still, does iBATIS help you to save/update complex object graphs? It seems like NHibernate is nice in that I can pass it a root object and it figures out the details of what, if anything, needs to be updated in the database.


Solution

  • I made some research a while ago.

    One specific question from me, might give you some additional information: Would you use NHibernate for a project with a legacy database, which is partly out of your control?

    Some of your points of interest I can answer:

    I can answer it the other way around: If you don't have control over the data model and thus facing some legacy database, iBatis is the better choice.

    It depends what you want to do with it. If you have a domain driven development approach then iBatis might get painful by time. If you just do simple data manipulation and don't have a full blown domain model then nHibernate might be a overkill by the time.

    Both have mechanisms to shield you off from a specific database vendor, but I admit that have not done intense research in this direction.

    When you use iBatis, you need more SQL skills than NHibernate. Using iBatis you always need to code some SQL. NHibernate doesn't require you to code SQL statements -- it even can do the DDLs for you. Powerful features will require you to go to old good SQL, which will be inevitable.

    Some other points: