Categories
Uncategorized

State Machines: Know Them! Love Them!

bonsack machine

Over at the Shopify Technology Blog, Willem van Bergen reminds you that if you develop web apps, there’s a good chance that you’ll want to make use of a state machine. As Willem points out in the article, they’re useful design patterns, help prevent undefined behaviour and map quite well to a key part of the business side of your operation: they’re business processes!

If you’ve forgotten what state machines are (or more formally, finite state machines or FSMs), break out your old Comp Sci textbook, or if you sold it for beer money, take a look at SPLat Controls’ Finite State Machine tutorial. If you build your web apps with Rails, take advantage of the state_machine gem and Willem and Jesse Storimer’s state_machine-audit_trail gem.

Leave a Reply

Your email address will not be published. Required fields are marked *