NHibernate.BusinessObjects on Get NHibernate.BusinessObjects at SourceForge.net. Fast, secure and Free Open Source software downloads

NHibernate community site


NHibernate.BusinessObjects is an open source solution that provides a business layer over NHibernate. NHibernate.BusinessObjects completely hides the object-relational mapper (ORM) and the database access. It supports long living sessions and is designed for large WinForms and WPF applications. By using NHibernate.BusinessObjects, developers can focus on the business layer rather than on database aspects.

Why NHibernate.BusinessObjects

In simple applications, you can use ADO.NET and Datasets to get access to a database and display the data in a WinForms or WPF GUI. However, there are many things you have to worry about and it is easy to mix up GUI with data access related code. As soon as your application becomes bigger - interestingly almost all applications will do - this will result in a difficult to maintain project.
Therefore, I always recommend using multi layer architecture also for small applications, and in most cases, I do that even for prototypes. Two layers (data and GUI) might be sufficient for pure data viewer, but as soon as you release the first version, your customer will ask for some business logic and you will need an additional business layer.

Using multi layer architecture in application development is one point. For rapid development, to achieve a good design, and to maximize the stability of an application you should use already existing and well tested components. Instead of building the database access layer by yourself, you can take NHibernate, an object-relational mapper for the .NET framework that is used in thousands of successful projects.

Ideally, you have experts for each layer in your project: database experts, business developers, and GUI designers. Each of them should be a specialist in his domain and a business developer does not have to know much about GUI or databases. While NHibernate is excellent for data access, there is a lack of abstraction when using it on the business layer. The developer still needs knowledge about transient, persistent, or detached objects, session and transaction handling, database locks, versioning, how to fetch, save, update, and reload objects, and many other not business layer related stuff. NHibernate.BusinessObjects tries to get rid of these things. Of course, there won't be a 100% solution. You still need sessions and transaction but with NHibernate.BusinessObjects, I try to minimize the usage of database related functionality.

NHibernate.BusinessObjects Architecture

NHibernate.BusinessObjects Architecture