Enterprise Library from Patterns & Practices
What is the “Enterprise Library“? Well, look at the .NET framework. It is big and feature rich. But what if you want to so something the righ way, like write code with lots of trace & logging commands, lots of try/catch blocks, encrypt lots of potentially secret values, cache stuff for performance or even just retrieve data from the database in a safe, high performance manner? Well, doing any of these the right way will take ten times as much code.
Every time I catch and error, log it and alert the user, I’m down ten lines of code. Setting up a stored procedure with parameters is a dozen lines of code, short cutting and using string concatenation takes two lines of code, but is subject to SQL injection attacks. Encryption, again takes a couple of lines of code each time it is used.
The solution is to use the Enteprise library, which provides a layer on top of the .NET frame work that cuts the number of lines of code it takes to log and event, call a stored procedure or encrypt a string.