Posts Tagged ‘feather’
Please note this is part of documentation I wrote for the opensource feather web framework currently available on GitHub. You can find the document in its original form here: https://github.com/maddogawl/feather/blob/master/featherdoc/docs/state%20machines.md
feather Finite State Machines
Finite State Machines (FSM) are well understood in computer science, and as such they won’t be covered much here. There are some really good articles online that you can check out to read more in depth analysis on FSM’s.
Links to some good articles
In the simplest definition a FSM is a set of states and transitions. A FSM can only be in one state a time, thus allowing you to easily build state driven applications like Rich Internet Applications. In more complex systems that utilize state machines you will begin to see hierarchical state machines, and states that have their own state machines.
In general Finite State Machines are a tool that simplifies common problems including UI management and async flow.
Benefits of State Machines
An application could easily be created without utilizing FSM’s, but there are some clear advantages to using them.
– Flexibility : Code can easily be tweaked and extended with proper use of state machines.
– Debugging : Code that is isolated in small testable states makes it much easier to track down defects in the software.
– Simplicity : Its human nature to think of things in terms of states. It is generally simple to break down parts of software in terms of states.