DevPinoy.org

A Filipino Developers Community
Welcome to DevPinoy.org Sign in | Join | Help
in Search

cruizer

aspiring to free and open the mind of .NET developers

And so I ate my words

Yeah, I said enums are evil.

Now I'm taking them back. Stick out tongue I was forced to swallow my pride and use an enum for my current project. This is for representing the privilege level of the user. I guess the simplicity of the enum won me over, since one can easily compare enums with each other. Besides, the data will be coming from a WCF service, so the data is just that -- data. It can't be an object complete with behaviour. So now, my position is to just use the simplest thing that will work. If it's an enum, go ahead and use them. If you outgrow the enum and realize that it is E-V-I-L in the context of the app you're making then just put the necessary measures in place so you can painlessly refactor later (stuff like TDD and regression tests).

Excuse me while I (grudgingly) eat my words...

Only published comments... Oct 09 2007, 06:50 PM by cruizer

Comments

 

Comgen said:

=) Just Like Carpenter Tools. whats easier to use?.... =)

October 10, 2007 3:21 AM
 

cruizer said:

or, what's more <u>appropriate</u> to use

October 10, 2007 10:15 PM
 

Comgen said:

;) Yaps......

October 13, 2007 1:20 AM
 

cruizer said:

I saw this somewhere in my daily reading list (I religiously browse my Google Reader at the start of

May 1, 2008 6:56 PM
Powered by Community Server (Commercial Edition), by Telligent Systems