Stop Hibernating.
You have heard about NHibernate or you are already using it? Read here, why you should consider Vanatec OpenAccess instead.
First of all, being famous doesn't mean being best-practice, robust or feature-rich - see Titanic for instance. Anyway there are reasons, why people are considering NHibernate (at least in the beginning). We will tell you some reasons, why you might not want to follow them.
Secondly, if it comes down to just the cost of a o/r mapping tool, make sure to understand that this is really the last criteria to make up your mind. If it does bother you, take your daily cost, consider a 90% increased productivity concerning data access and try to find out how quickly 900 $ will be returned. And btw: Vanatec OpenAccess Express provides free mapping for free databases; check it out.
Thirdly, check out a new O/R Mapping Blog written by an expert not related with Vanatec. He has chosen OpenAccess to talk about O/R Mapping for good reasons.
Last not least, our development is listening carefully to the market with respect to project requirements. We always support the latest .NET technologies and are able to implement feature requests and to add new database support within weeks. So make sure to check how to get Professional Support and Services.
Technical Concept
- OpenAccess uses code enhancement techniques to add functionality for transparent persistence; nevertheless, your classes remain your classes.
NHibernate uses a mix of reflection and proxies which is not totally transparent. Reflection is much slower than real compiled IL-Code.
- OpenAccess provides transparent change tracking and enhances the classes. So any object change creates a notification.
Nhibernate uses reflection to detect changes. The performance will break down as soon as you read a large number of objects, but modify just a handful, in which case Nhibernate has to compare all objects states for modification at transaction commit time.
- OpenAccess stores all values of fields from persistent classes in a transparent way - by default.
NHibernate uses reflection, which can bring up nasty side-effects. By default, no property is stored and you need to enumerate all persistence properties. Don't forget one!
- OpenAccess has been designed for a seamless integration into .NET:
- It follows the concept of a connected and a disconnected API (DataReader and DataSet in ADO.NET) with its ObjectScope and ObjectContainer. NHibernate does not distinguish between the both scenarios. - It supports the latest releases of .NET (3.0, 3.5 beta), Visual Studio (Orcas), LINQ (beta) NHibernate does not support the latest .NET features or technologies, e.g. .NET 3, LINQ
ORM Features missing in NHibernate
Persistence by Reachability
Once you have defined your persistent classes, all new objects being reachable from instances of such persistent classes will be persistent as well. So you can not loose anything!
With Nhibernate you need to take care to configure everything right, so that storing objects is correctly propagated or that all objects are stored explicitly.
Reverse Mapping
OpenAccess allows you to map your database schema to an object model. We have introduced the term "Reverse Mapping" for this feature, which is more than helpful if you develop new applications based on existing databases. This is also supported pretty well and graphically by OpenAccess (Reverse Mapping Wizard). Read more about Reverse Mapping ...
With NHibernate reverse mapping is very complex and not assisted by a _NHibernate_tool.
Tools and GUI
OpenAccess is tightly integrated into Visual Studio. So you have a great environment to work in and you get additional support by the OpenAccess Help, IntelliSense and Wizards. It has never been easier to define mappings or persistence behaviors.
With NHibernate you need to love your command line.
Query Language
You have heard about SQL, the Standard Query Language. OpenAccess provides support of SQL and Stored Procedures. But once you go object-oriented, you want to navigate easily and quickly through your object tree and you want to use an object-oriented query language. OpenAccess supports OQL, the standard (OMG) based Object Query Language. You will love it.
New: In addition, Vanatec OpenAccess now supports LINQ, Microsoft's new Language Integrated Query Language.
With NHibernate, you get HQL! Nice, but no standard.
Database Flexibility and Independence
Not only can you define different mappings to be used for different deployments, but also deploy on different database products. Our database support is not using just a generic driver. We look deeply into the capabilities of each server and provide great integration. That's why we support only 90%+ of the database products being used under .NET.
NHibernate supports a bunch of databases, but is much less flexible.
Flexible FetchGroups and unique FetchPlans
OpenAccess allows to configure use-case dependent fetching behaviour.
It is important to be able to retrieve exactly what you are looking for from the stored data. FetchPlans and FetchGroups provide you with a mechanism, where you can specify the retrieval of only those fields that are required from the database, in as few database calls as possible.
FetchPlans
A FetchPlan specifies fields to be loaded for all of the instances in an object graph. Using FetchPlans users can control, which fields are to be fetched from the database. A FetchPlan consists of a number of FetchGroups that are combined additively for each affected class. FetchPlans are used to activate and control FetchGroups dynamically by name.
FetchGroups
FetchGroups can be defined to describe read access based on concrete usage patterns in the application. The goal here is that only those fields, which are needed by the application, get fetched from the database in as few calls as possible. FetchGroups are used to mark fields and their associated field recursion-depth for each class for which the FetchPlan is applied.
NHibernate demands a global fetching behaviour and let you statically define, what is lazy fetched and what not.
Architecture Support
OpenAccess provides an API that does satisfy the needs for all application types.
NHibernate is grown into the web-applications, but got limitations for other types of applications.
Open Source???
There are certainly good reasons to consider Open Source. But you should not start to make up your mind just by looking to Open Source products. It is a competitive environment anyway and you should equally consider Open Source and commercial products.
Some people believe, that it is an advantage to be able to fix bugs on their own. The truth is, that you quite often have to do so. So meassure the time needed to fix bugs compared to the relatively small investment of a tool including support.
On the other side, what are really the advantages of an Open Source product compared to our product, which is
- robust
- low-priced
- feature-rich
- bullet-proof
- community driven
- professionally supported
- also available in source code
?? We don't see any; you get rather problems fixing bugs or to find anyone doing it.
You should set your personal criteria for the right mapping tool and then make your evaluation. Take the one, which fits best. To be Open Source is not a criteria ...
Please continue on our regular homepage ...
|