The Watering Can of Enterprise Software Development
Pouring out information on enterprise software development in the hopes some seeds will grow.

Code Samples: Are They Ever Right?

Another Microsoft .Net code example has been taking some criticism as of late. I read some blog posts and the cooresponding comments from a couple of well known and respected developers, Ayende and Rob, and I think they are being a bit harsh on the example set. To be fair, many of their points would actually be valid if they were looking at an enterprise application. However, in this case I feel they are taking this code out of its context.

 

The requirements for this solution are to show architectures and patterns. I feel the solution does that when you review it within the context of the book, N Layered Domain Oriented Architecture Guide with .Net 4.0, which both bloggers did not originally reference in their posts (possibly because they were unaware of it).

 

The intentions of the book and the code samples are to provide guidance and some examples around how patterns "can" be implemented. It is not the intention to show how to properly do DDD or to document how a bank runs it business. There are plenty of books out there that can do those things. I don't think the authors are expecting anyone to open up the project and refactor it into their own application (although I am sure there will be some that try).

 

It takes a good bit of experience and knowledge to know when you might need a pattern. I really appreciate the work these guys have done in trying to provide some guidance around the complex enterprise patterns that are being pushed out of many blogs.

 

 

   

Search
Follow Us