Over on the Domain Driven Design discussion group Scott Bellware asked the group their opinions on how they go about driving their domain driven design implementation using test driven development. Rather then just answering him there, where only the domain driven design folks will see it, I thought it might be better to not only answer the question, but go one further and let developers into my thought process when developing an application. As luck had it, I have just started a brand new project that will eventually get released as an open source project (I actually started the code the day Scott sent out his email). So, instead of me just starting to code and eventually releasing it to the public to continue its development, I thought it might be a very good learning opportunity, on a couple different levels.
The project I have started is related to the social tagging stuff I’ve been talking about. I’m looking to create a controlled vocabulary object model built around the PRISM Controlled Vocabulary spec. The object model represents controlled vocabularies, but should also be serialized and deserialized to the PRISM CV XML format. Since PRISM’s CV spec version 1.3 relies heavily on the Resource Description Framework, simple .Net XML serialization will not work, so I’m going to have to roll my own serialization (which might also be a good thing to learn about). I’m going to use the CV spec as the user requirements for the domain driven design. Because I want to appeal to as many .Net developers as I can, I’m going to stick with .Net 1.1 and use C# as my language (but the language shouldn’t really matter).
I’m definitely not a DDD or TDD purist, nor do I think it is a good idea for anyone to just adopt a practice without adding some of their own style. I just use what works for me. It might not be 100% according to the rules, but that is fine with me. What I want developers to see is that it is alright to “bend the rules” a little and not get intimidated by purists who that think everything should be done just as the technique was written. But I’m also not infallible, so I’d also like to see some of the “experts” jump in and help correct some of things I might be doing wrong (hey, I like to learn from the experts, too). Think of this as one big code camp chalk talk session.
The take aways for this series of blog posts should be:
If you want to play along at home I’m going to take a snapshot of the solution every time I make a post. The code will be from the end of that currently development cycle. You can download the first code drop here. There isn’t much code there, but it is a pretty good starting point for this experiment. If you are new to TDD, download and installed NUnit and TestDriven.Net. If you don’t know Domain Driven Design, buy the book, and/or download the Patterns Summary. Here is how I got to this point:
That’s all the time I had to play with this new project. Wonder what will happen in the next part of this series.
Partners
Dream.In.Code dotNet Slackers dotNet Spider Your HTML Source VisualBuilder.com DevGuru Planet Source Code ZVON.ORG Web Design ASPAlliance XML Pitstop Scripts
The Spot 4 SAP Bitshop Web Hosting