Christian Sepulveda's Blog

July 16, 2003
NBuilder: It Begins..(again)

"NBuilder is an application framework for developing enterprise and information system applications. It provides support for the development of an object-oriented persisted domain model. It includes tools for modeling the domain, generating code for the domain entities and application, and a series of base classes that allow the rapid development of a stable, scalable, high performance application that easily supports automated testing and reusability."

The above appears on the Source Forge site for NBuilder and pretty much reflects my original ambition. Basically, most of the code I write needs to be persisted in a database and .NET doesn't have the nifty tools for object-relational mapping that Java does. (I can't believe I used the word nifty!) So, I (and the teams I have worked with) have generally crafted custom code generators / metadata managers that provide persistence and related services for Microsoft .NET projects.

There are a few motivators for me. First, I hate duplication. I (and other team members) have built such a custom tool several times now. Each time we learn something new, experiment and tweak for the specific circumstances in which we were working. So frustration is the first motivator.

Impatience (and frustration again) is next, as I can't wait anymore for someone smarter than me to do this. I have come across a few tools that address similar issues (some free and some commercial), but they don't address my needs terribly well.

Finally, there is vanity. Part of me (a larger part than I really want to admit) is convinced I can achieve some level of generality for the tools application. I actually tried this a few months ago, wrote something fairly quickly that I thought was useful. (It is actually being used for production code by one of my clients.) It has a variety of flaws, which I won't go into here, except for one. The largest flaw was in the approach and ambition. I assumed to know too much (I have done this multiple times before, I can fast forward to..) which leed to anticipation and some flawed design decisions. I also started with the ambition of writing too general a tool.

So why will this time be any different? It probably won't. The rationale part of me can smell some bad signs already. But, there is the vanity thing and vanity isn't rationale. So, being a glutton for punishment, I being again the search for my white whale.

There are a few things that keep me hopeful (or delusional). I think of Kent Beck's reflections on the money example of Test Driven Development. Beck notes how he has written the example numerous times and found that with a new metaphor, he discovered the cleanest implementation yet. I am hoping the powers that be take pity on me and provide this inspiration. I also hope to be as disciplined as possible in XP and TDD principles as I can (which I did not do so well last time around). Next is a practical hope. I have a few current "issues" I need to address in a couple of different projects. Some are client related, some are not. This will limit the amount of disclosure I can provide in my blog entries, but being a pragmatist I will quickly abandon all lofty ambitions for solving the problems that pay the bills. If I do this well, this attempt will definitely make it worthwhile.

Finally, I will learn something, probably a lot of somethings. This new knowledge may prolong my vanity and delusions, but continued learning is better than being stale and complacent.

Posted by csepulv at July 16, 2003 07:00 PM