I really don’t want to start a flame war or get
everyone all riled up, but I was slightly dismayed to see the recent
introduction/re-introduction of a state machine into core.
I was hoping to see things move towards being more lightweight. This seems pretty heavily coupled to ActiveRecord.
A
state machine is great and useful, but is it the beginning of a
slippery slope? With it becoming part of core, I can see arguments for
incorporating acts_as_tree, acts_as_taggable, and other types of “above
and beyond core orm” type functions into core.
My concern too is for the core team, here. There’s enough work to
be done - to add more of these types of features into core means more
maintenance and test overhead for you guys.
I really don't want to start a flame war or get everyone all riled up, but I
was slightly dismayed to see the recent introduction/re-introduction of a
state machine into core.
I was hoping to see things move towards being more lightweight. This seems
pretty heavily coupled to ActiveRecord.
It's a mixin from Active Model. What heavy coupling do you identify?
A state machine is great and useful, but is it the beginning of a slippery
slope? With it becoming part of core, I can see arguments for incorporating
acts_as_tree, acts_as_taggable, and other types of "above and beyond core
orm" type functions into core.
The reasoning is that is such a common, widespread modeling concern
that it makes sense to promote it to the core Active Model toolkit.
These other acts_as_* you mention really are AR-specific and are less
widely used. Their implementation reaches down to the database level.
Whereas managing state, events, and transitions is entirely behavioral
and model-agnostic. You could mix this in to any Ruby objects you
like.
My concern too is for the core team, here. There's enough work to be done -
to add more of these types of features into core means more maintenance and
test overhead for you guys.
Definitely core material. Signup process? State machine. Shopping, checkout and payment? State machine. Same could apply for authorizing something over OAuth, booking procedures (and filling out other complex forms), invitation-based system and more.