Geeks With Blogs
// ThomasWeller C#/.NET software development, software integrity, life as a freelancer, and all the rest August 2009 Entries
NHibernate EnumStringType error, and praise for Open Source

NHibernate's EnumStringType class is a custom user type to realize an arbitrary mapping between an enum in your domain code and a related set of strings in your database. While playing around with it, I stumbled over some strange behaviour that turned out to be a bug in NH's codebase. It took me two days to finally nail down the problem. This is a short recap of my findings, that hopefully prevents some other poor developer souls to get stuck with the same problem...

Posted On Thursday, August 27, 2009 9:20 AM

Keeping your enums in sync with database strings

In some scenarios, you may have a database that contains text data in a column which is restricted to a certain set of discrete values. In such a case it is a good idea to use an enumeration for representing these data in your domain. This post demonstrates an easy and effective way to put this mapping under test.

Posted On Tuesday, August 25, 2009 4:01 AM

The silver bullet of software architecture ?
Stumbled across a funny video this morning: An Introduction to the Lego Software Process from Thomas Hansen on Vimeo. This video is taken from the website The Lego Software Process, which states further: "For far too long Software Developers have been living in the stone age. The Lego Process proposes a Modular design. This makes you 20 times as productive. In addition it also makes maintenance a breeze, bugs vanish and security a commodity. Imagine; 20x Productivity No Maintenance Problems And Zero ......

Posted On Monday, August 24, 2009 12:58 PM

"We'll fix that later."? No!
A situation, that most developers might know from personal experience: The project is nearing the deadline, and there is far too much work left to be done. Usually the consequence is, that the remaining features of the software will be implemented in a quick-and-dirty way, leaving aside quality related issues like e.g. proper design or adherence to coding standards for the moment. - Much of today's spaghetti code is born this way. The common excuse for that is: "We'll do that later. Now our first ......

Posted On Monday, August 24, 2009 7:52 AM

About hammers and screws

During the last days and weeks, there's an increasingly heated debate about the performance of NHibernate vs. some other commercial and noncommercial ORMs. While there may or may not be good arguments for both sides, the discussion seems to miss the point...

Posted On Saturday, August 22, 2009 8:10 PM

Keeping your enums in sync with your database

Having an enum in code that corresponds to a database table is a common scenario in enterprise application development. - For example you may have an 'OrderStatus' enum in your business logic and a corresponding database table 'ORDERSTATUS' in your database. In such a scenario the enum-table relation might be at risk to go out of sync. This post introduces a simple but useful unit test fixture, that keeps an eye on this for the entire project lifetime...

Posted On Saturday, August 22, 2009 7:18 AM

Copyright © Thomas Weller | Powered by: