Articles : Hibernate and NHibernate

Hibernate is an ORM [Object-Relational Mapping] service used to develop persistent Java classes. On the back of NHibernate, it's popularity has spread to the .NET space as well. This has proved of special interest in IT shops that are working toward interoperability strategies that leverage the skills of developers who can handle both .NET and Java problems.

NHibernate is a port of Hibernate Core for Java to the .NET Framework. It handles persisting plain .NET objects to and from an underlying relational database. Given an XML description of your entities and relationships, NHibernate automatically generates SQL for loading and storing the objects. Optionally, you can describe your mapping metadata with attributes in your source code.

NHibernate supports transparent persistence, your object classes don't have to follow a restrictive programming model. Persistent classes do not need to implement any interface or inherit from a special base class. This makes it possible to design the business logic using plain .NET (CLR) objects and object-oriented idiom.

Originally being a port of Hibernate 2.1, the NHibernate API is very similar to that of Hibernate. All Hibernate knowledge and existing Hibernate documentation is therefore directly applicable to NHibernate


NHibernate key features:
Natural programming model - NHibernate supports natural OO idiom; inheritance, polymorphism, composition and the .NET collections framework, including generic collections.

Native .NET - NHibernate API uses .NET conventions and idioms
Support for fine-grained object models - a rich variety of mappings for collections and dependent objects

No build-time bytecode enhancement - there's no extra code generation or bytecode processing steps in your build procedure

The query options - NHibernate addresses both sides of the problem; not only how to get objects into the database, but also how to get them out again

Custom SQL - specify the exact SQL that NHibernate should use to persist your objects. Stored procedures are supported on Microsoft SQL Server.

Support for "conversations" - NHibernate supports long-lived persistence contexts, detach/reattach of objects, and takes care of optimistic locking automatically

Free/open source - NHibernate is licensed under the LGPL (Lesser GNU Public License)

More detailes at official website :: http://www.hibernate.org/

1 comment:

  1. Valuable information. Fortunate me I found your website accidentally, and I am surprised why this coincidence didn't came about in advance! I bookmarked it.
    Here is my blog post - boligityrkia.net

    ReplyDelete