GUI as a finite state machine

前端 未结 3 1106
独厮守ぢ
独厮守ぢ 2021-02-05 19:50

To implement application\'s GUI I would like to have all the logic to go from one form to another centralized. This GUI manager will behave as a finite state machine. Although I

3条回答
  •  梦如初夏
    2021-02-05 20:27

    It's a great idea! So great, in fact, that it's been done before and is probably the most common pattern used in extensible application development (think of IDEs like Visual Studio, Eclipse and the like).

    One example, SCSF (which leverages CAB), from the MS Patterns and Practices Group, uses this pattern out-of-the-box to construct pluggable and extensible composite applications in both WinForms and WPF. The actual pattern it uses involves construction of hierarchical state machines called WorkItems that control usecases and flow through the application. I'd look into how the Patterns and Practices guys did it before I implement it as my own brainchild. I've used it on many occasions and it's well worth it.

提交回复
热议问题