Thursday 9 April 2009

Avoiding too much logic in Window Open events

When flowing between windows in a Gen GUI application, it is good to have the window pop-up quickly, even if the data is not populated immediately, as this gives the user the feeling that something is happening.

If you put too much logic inside the Open event of the window, this perception changes because the window does not get physically displayed until the end of the Open event, thus giving the illusion that the application has hung, crashed or simply disappeared.

We’ve found that a good practise is to minimise the amount of logic (especially server calls) performed in the Open event, and if necessary use a TIREVENT within the Open event to trigger another event where the longer processing is performed. The window will then get displayed after the Open event so the user can at least see it is alive.

1 comment:

Anonymous said...

We utilize this technique quite a bit also. We put the least amount of logic needed in the Open event and then use a TIREVENT that does most of the server calls. The nice thing is that if you code it efficiently the same TIREVENT can be used as a "refresh" as well in other event actions.