Using the Gofer Pattern (XDEV8607)
What I call "everyday" programming can lead to serious confusion. As a small application grows, it gets more and more windows and you need control between those windows to manage the overall workflow. You need to keep the overview without being distracted by tiny details. That's easy… if you have a focus on this right from the beginning!
How do you solve the issue where you have a window open and then you need to open another window for user input, and then you re-open the first window? Do the windows call each other to perform the overall task? Do we need some kind of "window controller" to have the correct window open at the right time? And what if the first window has some data thatpersists that has been edited within the second window -- and we learn that this data should not have been saved?
Have you ever heard about a workflow object? A lot of REALbasic developers -- not you, of course -- tend to take windows, put methods on them, and let the windows call each other. Thus they make the workflow invisible! If we have algorithms in the program and don't name them carefully, they get angry, big, complicated, and they tend to eat up the whole project. Let's see how to prevent our applications from suffering this agony.