Additional Javascript State Framework

I use ExtJS and I find this a terrific foundation. However, they do not have a built-in state diagram in which the application develops very painfully depending on the conditions.

I recently found this:

https://github.com/jakesgordon/javascript-state-machine

This appears to be very solid state code for JS applications.

I wonder if other frameworks like this exist, so I can compare before I agree with them.

Thanks!

+2
source share
4 answers

I like the Javascript End State Machine (v2.0.0) .

I have not tried several others:

Which of them did you agree to?

0
source

Things like JS Statemachine are fundamentally different from state maps. This is truly an FSM supernet. If you are using an application based on sproutcore, then native state diagrams are good (a little verbose imho). If you use another framework or minimize your own javascript, Stativus is actually the only full-featured statechart map. Stativus can be used in any javascript infrastructure: Backbone.js, ember.js, SproutCore, batman.js, ExtJS, Sencha, etc.

With FSM you will not receive:

  • Parallel states
  • Nested Substations
  • History of States
  • Statechart Event Propagation

In fact, it is like trying to drag a race on a Yugo with a Ferrari. Both of them can get you places and have four wheels, but they have much more power than even competition.

caveat: I helped write the original statechart implementation for SproutCore, and I wrote Stativus ...

+11
source

Another implementation of the Statechart in JavaScript is David Datura's statechart .

one more: Machine.js based on "behavior trees". http://machinejs.maryrosecook.com/

New: xstate, https://github.com/davidkpiano/xstate

+2
source

I use javascript-state-machine , and I really like it. The only problem I encountered is trying to use asynchronous transition states. Be sure to use them when entering or exiting states . Not earlier or after events . In this case, everything works well. Still a durable tool.

+1
source

All Articles