Using NHibernate Challanges
I've mostly completed my initial foray into NHibernate. Over the past couple of weeks I downloaded the latest build, configured it, and created an account management system which includes some e-commerce elements.
My Initial Thoughts
Documentation is lacking. This should be absolutely no surprise to anyone. I should probably be a little more concise in that assessment. There is a whole lot of documentation on NHibernate and even more on it's java based predecessor. The problem isn't so much that there isn't any documentation, it is that the documentation that is out there is out of date and doesn't work with the current build.
There is a significant up front investment of time and energy just to get the basic stuff working. When things work it is great, but when they don't that is when the trouble starts. A lot of the error messaging isn't terribly helpful. I lost more time trying to decipher odd errors that turned out to be single fat finger keystroke issues than I did on most other problems. That is where the current documentation really falls down. If you don't know what you doing then trying to figure out a problem can be a daunting task.
As I stated before, it can be a real time sink. The problem I see is that most developers simply can't justify the time and effort to learn something like NHibernate when they don't know or can't prove the time savings it will/may give back. Sure, if you are an expert, or have the luxury of vast amounts of time, then it isn't a problem, but who has those things?
I have to admit I was hesitant to start down this road, not because I wasn't sure there would be some payback, but because I wasn't sure I had the up front time available to wait for that payback. As it stands, I feel like I have just about broken even. I haven't even begun to dig into some of the more advanced features, and I haven't solved a single complex problem so I can't say I will continue to be at a break even point.
On the other hand, today I had to spend well over an hour digging through the database trying to find all the dependencies a particular table had. Those dependencies included a laundry list of procs, some user defined functions and a couple of computed columns. If all this was simply encapsulated in a NHibernate backed object I would have had the problem fixed in minutes. Instead I had to come up with a patching plan that will take me through to the next big release cycle.