Re:Formally Specifying UIs (2018)
by mukeshsoni on Thursday February 28, 2019 @01:59AM
(#19269537)
Here's an implementation of the calculator in javascript using xstate - https://github.com/mukeshsoni/statechart-calculator
Thanks, ordered it. For those having trouble searching like I did, it appears the correct title is Constructing not Designing.
https://www.amazon.com/Constructing-User-Interface-Statechar...
You are right. That is the title :-)
great comments on statecharts previously here https://news.ycombinator.com/item?id=15835005
the top few comments i find compellingly skeptical.
One illuminating example was a calculator application which had numerous errors and crashes which stemmed from intricacies of the UI implementation. By designing it as a statechart transitions are made visible and relationships are clear. The book provides three more examples.
In addition to the posted blog post, there are two more concepts in statecharts that I think are important: history and concurrency. They are not easy to explain in this comment, but the gist is that “history” allows for a simpler expression of returning to a previous state and “concurrency” formalizes the behavior of having concurrent states.
I’d recommend anyone to take a look at the book and I’d especially recommended to anyone who is a little skeptical of the idea of statecharts. I think the biggest argument against statecharts is that it requires you to specify your actual design, instead of just hacking on the code.