Geeks With Blogs
Chris Falter .NET Design and Best Practices

Dealing with vendor data (or your own) in the form of "codes" can pose significant challenges. You must ensure that your source code remains readable, that data are properly validated, and that data can be displayed as user-friendly descriptions. The built-in solutions (named constants and enums) help, but they have some significant shortcomings. If you derive a class of named constants from the MagicStringTranslator class, though, you can vanquish all 3 challenges in one fell swoop!

Egghead Cafe has kindly published the improved version of my article here.  Enjoy!

Posted on Thursday, March 6, 2008 10:08 AM Coding Practices and Design Patterns | Back to top

Comments on this post: A Good Solution for "Magic String" Data

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Chris Falter | Powered by: