alexpeachey / state_machine_experiment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An Experiment

There is likely not much of use here but I got to thinking the other day, what if the entire web application was viewed as a set of state machines and the business logic surrounding what the changes in state mean.

So I tried it out. Using the [end_state] gem, I first mapped out all of the things that can happen in the application as transitions in state and then laid out the business logic as a series of guards and concluders on each transition.

Once I had it laid out, I filled in all the classes with implementation and wired up the controllers to use the machines.

[1]: https://github.com/Originate/end_state

About


Languages

Language:Ruby 92.9%Language:CSS 3.9%Language:JavaScript 1.7%Language:CoffeeScript 1.5%