Business Object properties: model as Objects or Enums?
If I want to represent status types ie
I know I can use Enum's in normal code but how should i represent them in the business objects layer, as objects or as enums, I am thinking about whether to use static classes?
any advice would be appreciated.
A context example would be I have new job business object and it has a status of inprogress when retrieved.
Hope this makes sense?
ben brown, Jun 20, 2013
Create an Enum that contains all the possible status types.
Enums are easy to create, easy to use, and easy to convert to and from a string.
Walt Lynton, Aug 09, 2013
My suggestion is to not use separate (static) classes or objects.
Simply use an Enum or even better a String value String are easy to display and work equally well.
In my view, anything more than an Enum or String would be overkill.
Jacob Tanner, Jul 11, 2013