September 8th, 2013, 02:38 PM
State pattern long state class names
I am using state pattern on 28 states in my application, the states are for membership cards that has 7 major states, there are 4 boolean attributes for the membership card that actually affects the its behavoir so i have decided to embed them with states, that's how it multiplied to 28 states.
the problem now is with states class naming, it is getting crazing, i am ending up with class state named like this Membership-UnderCreation-Printed-Linked-Premium-Frozen ----- i have hyphened different attributes to make it clear.
is it ok for state class names to be like this?! what should i do for best practice?