Chris Falter

.NET Design and Best Practices
posts - 38, comments - 59, trackbacks - 24

My Links

News

All source code published on this blog is placed in the public domain.

Archives

Post Categories

Image Galleries

About Me

A Good Solution for "Magic String" Data

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!

Print | posted on Thursday, March 06, 2008 10:08 AM | Filed Under [ Coding Practices and Design Patterns ]


Feedback

No comments posted yet.


Post Comment

Title  
Name  
Email
Url
Comment   
Please add 8 and 4 and type the answer here:

Powered by: