top | item 24787022

Qt Support for State Charts

67 points| barumi | 5 years ago |doc.qt.io | reply

14 comments

order
[+] dmitryminkovsky|5 years ago|reply
I recently discovered state charts via xstate in JS/React. A truly empowering experience. I was able to resolve spaghetti code that accounted for 75% of business logic (not all bad paths handled, or good ones either really) and “worked” 90% of the time (certain transitions in certain states not implemented) into a state machine that accounts for all cases and actually works. Without the state machine, complexity seemed to scale exponentially. With the state machine, complexity scales linearly.

Since then I’ve thought I’m not sure how I could adopt a UI system without a state charts implementation. Most user interactions aren’t that complicated, but some can be, and really do need to be resolved into state machines unless you are an expert spaghetti developer.

So, very glad to see this and hope to see more and more implementations.

[+] davidkpiano|5 years ago|reply
Completely agree with you, and thanks for the kind words about XState! (I'm the creator)
[+] pjc50|5 years ago|reply
State charts (as a specialisation of state machines) are a really underappreciated tool. Fits in with the modern thinking on immutability: you can't really work without state, but you should herd it into clearly defined locations where you can keep an eye on it.
[+] jandeboevrie|5 years ago|reply
This reminds me of (now from IBM) rational rhapsody from i-logix. Great tool back in 2004 for embedded development and c++ state charts. Also a nice c++ framework, oxf and Omreactive, almost revolutionary for that time. Still being maintained by IBM nowadays but on life support as far as I know.
[+] nurettin|5 years ago|reply
One of the few frameworks with decent SCXML support.
[+] dmitryminkovsky|5 years ago|reply
xstate seems to support SCXML, keep seeing it in docs but not sure: what’s the benefit of SCXML support?