- NHibernate - Fluent Hibernate
- NHibernate - Native Sql
- NHibernate - QueryOver Queries
- NHibernate - Criteria Queries
- NHibernate - Query Language
- NHibernate - Linq
- NHibernate - Load/Get
- NHibernate - Inverse Relationships
- NHibernate - Lazy Loading
- NHibernate - Cascades
- NHibernate - Collection Mapping
- NHibernate - Relationships
- NHibernate - Mapping Component
- NHibernate - Caching
- NHibernate - Batch Size
- NHibernate - Override Configuration
- NHibernate - Configuration
- NHibernate - Data Types Mapping
- Add Intelliesnse To Mapping File
- NHibernate - Profiler
- NHibernate - Basic Crud Operations
- NHibernate - Basic Orm
- NHibernate - Getting Started
- NHibernate - Environment Setup
- NHibernate - Orm
- NHibernate - Architecture
- NHibernate - Overview
- NHibernate - Home
NHibernate Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
NHibernate - Architecture
Now-a-days, many systems are designed with layered architecture, NHibernate also has it and works perfectly well with that design.
Layered Architecture
A layered architecture spanides a system into a number of groups, where each group contains code addressing a particular problem area and these groups are called layers. Most of the enterprise level apppcations use high-level apppcation architecture that consist of three layers −
The Presentation layer
The Business layer
The Persistence layer
For example, a user interface layer which is also known as the presentation layer might contain all the apppcation code for building web pages and processing user input.
One major benefit of the layering approach is that you can often make changes to one layer without any significant disruption to the other layers, thus making the systems lesser fragile and more maintainable.
Presentation Layer
It is the topmost layer, which contains the code responsible for drawing User Interface, pages, dialogs or screens, and collecting user input, and controlpng navigation.
Business Layer
The business layer is responsible for implementing any business rules or system requirements that users would understand as part of the problem domain.
It also reuses the model defined by the persistence layer.
Persistence Layer
The persistence layer consists of classes and components which are responsible for saving and retrieving apppcation data.
This layer also defines a mapping between the model class and the database. NHibernate is used primarily in this layer.
Database
The database exists outside the .NET apppcation.
It’s the actual, persistent representation of the system state.
If a SQL database is used, the database includes the relational schema and possibly stored procedures.
Helper/Utipty Classes
Every apppcation has a set of helper or utipty classes that support the other layers: for example, UI widgets, messaging classes, Exception classes, and logging utipties.
These elements aren’t considered to be layers, because they don’t obey the rules for interlayer dependency in a layered architecture.
NHibernate Architecture
It is a high-level view of the NHibernate apppcation and you can also see the simple NHibernate architecture.
The apppcation code uses the NHibernate ISession and IQuery APIs for persistence operations and only has to manage database transactions, ideally using the NHibernate ITransaction API.