What are the advantages and disadvantages of NHibernate?

For a new project, we look at NHibernate. We really like it, but one thing bothers us: it seems very resource intensive. NHibernate will apparently load all the properties of an object, even if you only need one of the properties. Moreover, it will do the same for the properties of child objects.

So, we are weighing the pros and cons of NHibernate. What would you say, and if the parties made up for the shortcomings?

+3
source share
3 answers

Disadvantages:

  • HBM ( Castle ActiveRecord, , , HBM, NH AR. : AR- Castle AR).
  • , ,
  • -, NH
  • Oracle , .

< >

  • Linq-to-NH linq .
  • HQL SQL
  • DB-
  • .
+2

:

  • ,
  • SQL- SQL-
  • Lazy loading
  • .
  • DB ( )
  • openource
  • , / Hibernate

:

  • ,
  • - .
  • ,

, . Hibernate .

+2

, (, pro/con). , ( NHibernate, ).

  • - . , .
  • , (.. - WinForms), , , ; , , , . .
  • If you have the opportunity to develop a highly competitive application using the framework, design the concurrency model from the very beginning - it can be very difficult to get it to work properly later.
  • If you use a library NHibernate.Mapping.Attributes, you do not need to deal with external XML mapping files. All you do is add metadata to data object classes. It is really convenient, intuitive and easy to maintain.

That is all I have. If I come up with anything else, I will add to my list.

+2
source

Source: https://habr.com/ru/post/1722577/


All Articles