In my software development job, I do a lot of persistence layer implementation, especially using the Hibernate O/R mapper. I work closely with a clever domain layer programmer who tends to use a lot of design patterns, perhaps because he likes the woman of the cover of Head First Design Patterns.
Sometimes, these design patterns create a bit of a challenge for me in the persistence layer, especially since I always tell my domain layer programmer that I can persist things transparently, without having to muck up his code with persistence layer artifacts.
A case in point is the State pattern. I have now persisted 5 different sets of states so it’s no longer a challenge. However, it took me a little while to figure how to do it. Naturally, I started by checking out Hibernate’s forums but much to my chagrin, I found several people asking the same question but no one offering an answer. Therefore, I will provide an answer in this blog post. …Continue reading » State Pattern Persistence with Hibernate







The best things in life are free
Ever had one of those weird moments when you check out what’s stuck in your wallet and compare it with that of your buddies? I’m not talking about how much money you have, but all of the other things – receipts, drivers license, club cards, gym memberships, packs of sugar, …? (Think George in that old episode of Seinfeld…)
Well, this post is all about what’s stuck in your development environment. Perhaps one of the biggest lessons I have learned over the past few years is that some of the best development and I.T. tools out there don’t have to cost you an arm and a leg. There was once upon a time when we subscribed to a different model: the pay-as-you-go model, where every time we ran into a problem, we’d call up our favourite vendor and “discover” what next big purchase we would need to make to solve the problem. …Continue reading » The best things in life are free