Infrastructure is king: The To Do app
I spent the last few days writing the NHibernate in Desktop Apps sample. Since I didn’t feel like doing something adventurous, I choose to use the age old ToDo app as the sample.
Now that I have finished it, I run some stats on it, and it is… interesting.
Here is the number of lines split into infrastructure and application code:
The funny part about this is that this is for an application that has three forms altogether and very little behavior.
The not so funny part is that I fully expect that extending the application would require very few modifications to infrastructure code, while the support of the infrastructure means that I can churning out new features without really having to think about anything but that specific feature.
Comments
The desktop app presents a subtle but interesting challenge, being the "occaisionally connected" client.
I am assuming your infrastucture share of the code is large because you spent some time writing a server that communicates with thick clients in a "unit-of-work" fashion, such that the thick client doesnt deal with persistent objects.
I'd love to see your example when you are ready to share it :)
1k LOC is very small, however i am wondering myself whether this is to be considered an "agile" development?
The domain is far less complex than client/server communication/syncing on the other side.
Pete,
The sample app isn't an occasionally connected
Will you post the code somewhere? I'd love to see how you approached Infrastructure in a so simple sample app.
I'd love to see the code too!
Yes,
I'll post it when the article is ready.
Looking forward to seeing this.
There is a great need for this; I'm looking forward to your article.
I am awaiting for the code too :). It is interesting to see DDD in such simple app.
I was challenged with writing an "occaisionally connected" client, and I leveraged NHib for persistence. iT turns out there was a scarcity of examples around using NHibernate in a thick client in this kind of manner.
The majority of examples you will find involve web-based stateless connections where sessions are much easier to manage.
Dinesh,
This is anything but DDD
Great Oren! It´ll be nice to see full desktop sample.
Ayende, maybe i've missed some posts but can i ask - what's your attitude towards DDD? Your response to Dinesh was intriguing.
Arnis,
I think it is over used in situations that it shouldn't be
I'm really looking forward to this article. Do you know where it will be published?
Glenn,
December, on MSDN Mag
Aw, a long wait :D But worth it, I’m sure. Thanks for the reply!
Comment preview