RailsCasts Pro episodes are now free!

Learn more or hide this

Mark W Windholtz's Profile

GitHub User: mwindholtz

Site: www.agiledna.com

Comments by Mark W Windholtz

Avatar

Thanks Ryan. Good review.

What bothers me about most of these is that they keep state behavior all in one class.
That can make for a big state model class.

An alternative is something like StateObjects
which uses the State Design Pattern from the Gang of Four book. The state behavior is moved to small separate classes. StateObjects has less support for transitions/events but more for extracting the behavior.