Skip to content

considering enum type as a value object #183

Answered by kgrzybek
mehdihadeli asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @mehdihadeli

I don't treat ValueObjects as Enumerations. For me:

  1. Enumeration is something simple, with no logic and as name implies - I can enumerate on this type.
  2. ValueObject is more advanced thing, has logic, behavior, represents a business concept. Sometimes is enumerable (for example statuses of something), sometimes is not enumerable (like Money VO, how you will enumerate?)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mehdihadeli
Comment options

Answer selected by mehdihadeli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants