We currently have a business object that can be represented as an enumeration or as a class.
Implementing a class is simpler and makes business logic more understandable. But there is a possibility that the requirements will change by 50%, and the presentation of the transfer will make our life easier.
Specific example
The entity has a title and color. Color is editable, so there are 2 ways
- entity - this enumeration - there is another class with a mapping from an object to its color.
- entity - this class is another vial for color, no problem.
Requirement for future change - there must be rules associated with each object
- entity is an enumeration - rules are hardcoded in code
- entity is a class - mapping requires several more classes, as well as a user interface that allows the user to specify them.
If the rule set is static, the second option is brute force.
So, if we need to convert the class to enum, are there any recommendations on this process?
EDIT
The set of objects is limited and is unlikely to be changed by the user.
Thanks in advance.
source share