Well, I see that Billy McCafferty has updated his article NHibernate Best Practices with ASP.NET to cover NHibernate 1.2. Excellent article, I’d suggest taking the time to read it.
Archive for the ‘.NET’ Category
As mentioned in some of my previous blog entries, I’m looking for am embedded database. At the present, I think that I will remove SQL Server CE for now. The biggest reason is that, as part of my pet project, the application to run on Mono as well. So, that kind of leaves SQLite and Firebird.
Now, in theory, it should matter much between the two for what I want to do. I’m planning to use ActiveRecord for my data layer, and I see that both SQLite and Firebird are supported. So, switching between SQLite or Firebird will be pretty minimal. What about stored procedures, I hear you say? Well, truth be told, in my old age, I’ve sort of drifted away from stored procedures and look at them with a suspicious eye. So, the fact that SQLite doesn’t have stored procedures really doesn’t bother or impact me at all.
I’ll do a bit more comparison between the two, and then decided from there which database to use.
Well, as predicted something did distract me from my ActiveRecord experiment. I got a copy of Genome Express while at an EDMUG meeting recently. Given that my copy of Genome Express was shiny and new, I installed it and began playing.
My initialize impression is that it’s promising. I was able to very quickly reverse engineer a SQL 2005 schema and get a heirarchical data model going. I was able to generate working DAL code for a 12 table database inside of a couple of hours. About 75% of this time was spent reading the documentation.
One thing I’m not to sure about is how they pretty much replace SQL. Genome has it’s own Object Query Language (OQL) for getting objects from database tables. Given that I’ve been working with SQL for the past 12 years, I really don’t see why I need to learn a proprietary, non-standard "query language" to find data. Doubly so with LINQ and WinFX floating around.
Another thing that kind of gives me reason to pause is, as a consultant, I don’t know how receptive clients would be to me coming in and saying that they have to spend up to $3000.00 to buy another tool. Especially when things like ActiveRecord do the same job for free, and the source code is available.
Well, after playing with ActiveRecord for about a week and a bit now, and I can say it’s kind of a love-hate relationship. I like how easy it is to drop in a class, or to make changes to the DB schema and have that reflected in your model. Contrawise, changing databases should be just as easy.
Troubleshooting is a real bitch, and I find the documenatation a bit on the light side. Also, on the surface, the parent/child relationships seem pretty easy to setup and configure, but I seem to be having some issues with it. Also, a familiarity with NHibernate definately seems to be helpful when debugging/troubleshoot.
Right now I’m going to assume that my difficulties are primarily related to the learning curve, and I am plodding along merrily, content in the belief that I will work things out and solve all problems in due course. Also, for now I’m not bothering to much with the support for some of the .NET 2.0 features, such as Generics.
Lately I’ve been playing with MSBuild, the new build tool that ships with Visual Studio 2005. Before, I’ve always used Nant for my automated builds. I’ve been using nant since 2002 or so, and found it to be a pretty useful, stable tool to take the drudgery out of deploying builds. Figured I would give MSBuild a try, just for comparison sake.
I must say, MSBuild isn’t bad. One thing that I’ve found interesting about is that it has been ridiculously easy to port tasks from nant and nantcontrib to MSBuild. So far I’ve written tasks to apply a label to VSS, and to help me create a zip file holding the deployables of the build.