loading words...

May 26, 2019 08:43:31

Re: Statecharts 3 — Practical application

by @svenka | 374 words | 🐣 | 16💌

svenka

Current day streak: 0🐣
Total posts: 16💌
Total words: 4357 (17 pages 📄)

I've really enjoyed reading your series of very well written articles and thought I'd give my perspective on a (failed) practical application of statecharts. 

We tried to go with UML diagramming for a mobile app I had been working on some time ago, because it seemed to make sense. But we ultimately found it counter-productive and went with "boring" written and less detailed specifications. There were several problems with using diagrams for an app (this is my analysis after the fact, at the time I believe we just gave up on the idea because we felt it was too complicated to lay out visually and too time consuming):

1) The large majority of the stuff (states) that you end up describing in painstaking detail can actually be deduced through common sense. For example if you're describing a search field, it just makes sense that the send button be disabled while the field is active but no text has been entered yet. Do you really need diagrams for every single component?

2) You will probably never eliminate 100% of edge cases, no matter how painstakingly detailed you go, which leads to point number 3:

3) Your design is a moving target. You often run into unforeseen problems or simply have new ideas as you move along. Which in turn affect the rest of the design.

4) It is not that easy to communicate through complex diagrams. They are supposed to make communication between designer and developer more efficient, but we found it much more easy to just discuss something verbally.

Obviously, it is very dependent on the type of app or product your are building, as well as the size of your team and what your priorities are. Because we were just making a non-critical mobile app, it just made more sense to tackle most edge cases as we moved along. If we had been building something more critical, it might have made sense to spend more time describing everything using statecharts.

I realise our failure to properly use statecharts is not inherent to the concept itself, but rather due to a lack of proper tooling. There now seem to be some interesting tools being developed to make the entire process less painful and more efficient, such as sketch.systems and xstate.js.org.

contact: email - twitter / Terms / Privacy