Essential Developer Tools - Part 2: Microsoft patterns and practise

Submitted by Robert MacLean on Fri, 12/14/2007 - 08:53
There is a scene in Jurassic Park where Ian Malcolm (If I remember right, he is the mathematician/chaos theorist) criticizes Jurassic Park for not earning the right to clone the dinosaurs as they just "Stood on the shoulders of those before them". Well that may be true when working with millions of years old dinosaurs, but in development standing on the shoulders of the greats makes life better for you as a developer and for your clients.

Being a Dot Net developer means that those giants include the Microsoft patterns and practices team. Well what do they do?

We talk with a large number of Microsoft customers, partners, and consultants to understand the commonly occurring scenarios and the technical challenges associated with them. Then we discover and harvest the solution patterns and engineering practices (including anti-patterns) that have proved successful in addressing these scenarios.
Once we understand the scenarios and technical challenges, we work with product and technology teams across Microsoft, industry experts, and with customers and partners, to build guidance that reflects both the current, practical state of the technology and that is also aligned with future Microsoft technology plans. Often, the underlying scenarios and solutions guidance ends up influencing future Microsoft product direction.
Most of our projects are conducted in CodePlex communities. This allows continuous input from the development community at large and keeps us honest. We call this approach, “customer connected engineering” and it ensures that what we deliver actually meets the needs of our customers. We also ship the source code to nearly everything we deliver, usually along with a license agreement that encourages source level adoption and customization.

From http://msdn2.microsoft.com/en-za/practices/bb969103(en-us).aspx

That's great for marketing but for developers it means that they produce tools, frameworks and documentation (guides, proven practices etc...). My personal favorite from them is a set of components called the Enterprise Library which provides amazing code for logging (log4net eat your heart out), database access, exception handling, cache handling, cryptography, policy management (ala AD policies in your app) and validation. It really is amazing stuff. Two nice examples are the database application block, you can connect to a database, run a query and get the result in result set and close the database all following best practices with a tool to change the connection string (cause it's not hard coded so your users may need it) all in 2 lines of code! The validation block provides attributes to decorate your classes with to enforce validation with no additional code. You can get all of that from http://msdn2.microsoft.com/en-us/library/aa480453.aspx and much more from http://msdn2.microsoft.com/en-za/practices/bb969097(en-us).aspx.