Refactoring NHibernateQueryAnalyzer to glory
When I created NHibernateQueryAnalyzer I was well aware of TDD design principles and core idea, but I created NQA mainly as a way to familiarize myself with NHiberate's plumbing. Because of that, I didn't bother to write any tests, and did the least amount of work that was required to get the point across.
Shortly after I released it, I found out that people were actually making use of this tool in the wild. I decided that I want to turn that into a real application, and not just demo code. This meant that I need to turn a prototype into an application, without falling into the usual pitfalls. To me, that meant writing tests, and refactoring toward a testable design. NQA is not a large application by any means, but I was not willing to write it from scratch, in this I share Joel's opinion in the matter. There are quite a bit of knowledge there that I would loose if I would write it from scratch.
So I refactored, and keep on doing this. The application currently compile but does not work, and I sort of doing open heart surgery in order to fix some of the bigger Crimes Against Good Design that were commited there.
You can check the wiki page for all of the gory details.
Comments
Comment preview