Discover the Design Patterns You’re Already Using in the .NET Framework

By Ashish Khandelwal, September 14, 2009
Recently, Microsoft has placed increasing emphasis on design patterns. If you are unfamiliar with patterns, suddenly being inundated with new terms and foreign-looking UML diagrams can be overwhelming. This emphasis on patterns, however, doesn’t represent a shift in methodology so much as a change in vocabulary. The Microsoft® .NET Framework base class library (BCL) already makes extensive use of patterns, and you are probably familiar with the most common ones, even though you might not realize it yet.
In this article, I’ll cover a basic overview of several common design patterns and how they are used in the BCL and other areas of the .NET Framework. In doing so, you can discover some of the motivation for why the Framework is designed the way it is, as well as make the abstract concepts of the patterns themselves more intuitively understandable.
Most of the patterns I’ll be covering come from the canonical reference, Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, (Addison-Wesley, 1995). These authors are collectively known as the Gang of Four. The Gang of Four didn’t invent these patterns, but they documented and formalized the good work others had been doing since the beginning of software development.
Please follow the links:
Conclusion
Now that I have examined instances of common patterns in use throughout the .NET Framework and BCL, it should be even easier to recognize those same patterns in code you work with every day. Hopefully highlighting the design patterns underlying common classes and functionality has given you a better sense of what those patterns are and the benefits they provide. Trying to imagine UI programming without the Observer pattern or collections without an Iterator shows how indispensable these frameworks really are. Once you understand what each does, it becomes another valuable tool to add to your toolbox.
VN:F [1.7.2_963]
Rating: 0.0/5 (0 votes cast)

Leave a Reply