views:

60

answers:

2

I hear a lot about NHibernate lately (mostly good things) and would like to get to know it. At my company we are planning to create a db based application in C#, and I was wondering if NHibernate was suitable for this project. But as I have no experience with ORM, I can not assess the risks involved.

Background:

It will be an application for statistical process control (SPC). The core of it will be a db with lots of measurements for a set of different parts. Some SPC calculations require evaluation of the last 3 or 5 measurements for a given part, while others may require the evaluation of 100 or 1000 measurements. The calculations have to be updated on each new measurement entry. The type of calculation for a part will be configurable, as well as the boundaries for acceptable values and the actions taken if the result violates those boundaries.

The db backend will be Oracle or SQL Server (that's a political decision to be taken at the top, our department has no influence on it).

So my question is: Would you recommend using NHibernate for this project? And (even more important) why?

A: 

If you end up with Oracle, you could seriously consider using Oracle Application Express to build your application - no C#, no NHibernate required. There's no faster (or in my view better) way to build an Oracle-based web application. Some PL/SQL and Javascript knowledge is required though.

Tony Andrews
Thanks, but right now my boss is fixated on C# clients for whatever reason...
Treb
+1  A: 

You can use NH for sure in a project like this. It would give you even the option to decide later which DB to use. Sometimes you may want to improve performance using direct sql queries and you have the tag in NH for this, there you will have differences between DB's but most of the work will be independent of the final decision. In a statistical application i figure out there will be a lot of read-only cache data and NH stars on this kind of data...

Tavo
Thanks! Would NH also give me the option to migrate to a different DB after deployment?
Treb
if migrating implies moving data for this you'll need an ETL solution which NH is not. If the question is given a DB with same structure but other RDBMS it will work without efforts.
Tavo