15. State Diagrams
Angela Brooks
UML has a rich set of notations for describing finite state machines (FSMs). In this chapter, we’ll look at the most useful bits of that notation. FSMs are an enormously useful tool for writing all kinds of software. I use them for GUIs, communication protocols, and any other type of event-based system. Unfortunately, I find that too many developers are unfamiliar with the concepts of FSMs and are therefore missing many opportunities to simplify. I’ll do my small part to correct that in this chapter.
The Basics
Figure 15-1 shows a simple state transition diagram (STD) that describes an FSM that controls the way ...
Get Agile Principles, Patterns, and Practices in C# now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.