What visualization method would you recommend for event driven programs? Are there industry standard diagrams, such as flowcharts?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
The flow of an event driven program cannot easily be represented by a flow chart as it is very much dependent on outside things happening and flow charts just are not geared to that.
One way to visualize the flow of an event driven program is to use the good ol' conversation design diagrams (which I learned when programming mainframes). In these diagrams, you have a symbols representing screens. In the center is the screen under analysis or design. At the top will be the screens from which application logic can lead to the central screen. At the bottom will be screens that you can go to from the central screen.
Of course back in my mainframe days, we didn't have to deal with on-screen interactions like dropping down a menu (though for the top menu we had different diagrams) or opening up/filling out a details section on the same screen depending on the current selection in a list.
To address interactions like those, you could define a "screen" per screen state, but that would mean that the number of screen would grow to unmanageable proportions pretty quickly. Mock ups are probably a better solution here. They are perfectly suited to communicate the design of a screen without getting lost in all kinds of itty-bitty details. They also allow for annotations and other ways to indicate on-screen interactions. And using arrows and labels with the name of a following or preceding screen, transitions to other screens can be indicated thus giving a feel for the major navigation within the app.
Balsamiq ( http://www.balsamiq.com ) is a mock up tool that you can try out online and also use on your desktop. Check it out to see whether it would help in what you are trying to do.
UML Sequence diagrams are probably the most universial tool to use. Flow charts are only suitable for the flow through event processing, not for the event triggers themselves.
If you want to visualize a chain of events, an UML sequence diagram might be something you can start with. If you are looking, however, for a general approach to model event based programs, where the order of events is intentionally left out, then Flow Design may be the right thing for you.