- Posted by Matt on May 14, 2008
I realized a while ago that I was breaking the "DRY" (Don't repeat yourself) rule pretty severely when looking at my various projects as a whole. I generally focus on not repeating code within an application but I have not been careful enough with this rule when starting new projects. Many times when I need a particular function that I have written before I will just go hunt it down and copy the code into my new project. It has recently become a problem because I now have the same function littered throughout my different programs with various modifications made to each!
It's time for me to build a utility library that will become the main source for commonly used functions in my applications. The main need that I saw for this library was the simple but tedious task of creating an email message and sending it along via a web contact form. Just about every .NET web site I've ever built has needed this functionality and each time I created a new MailMessage and Email class to handle the job. This was the first thing I added to my new Utility Library.
The purpose of this post is to try and get some feedback on which functions you would include in such a library and which you would leave out. The last thing I want to do is create some bloated set of code filled with methods that are rarely used. If anyone is interested in seeing how I am going about creating this library (or would like the actual library) just let me know in the comments and I'll do my best to help out.
Here is the initial structure and the classes I'm starting with:

Each class contains a few functions that I find myself using frequently. Here is the class diagram for the few classes I have so far:

Again, if anyone wants the actual code or libraries let me know.
Help!
If you were building a utility library, what would you include or exclude? Anyone? Bueller...?
EDIT
I've added the source code for the project to the post for anyone interested. Since the post I've added a couple more functions to the library.
SevenLabs.Utilities.zip (35.55 kb)
