Perceived performance is as important as actual performance. While a large Flex application loads, users may experience unpleasant delays. Rather than frustrate them with inactivity, give the users something productive to work on. This can be a main window of your application or just a logon view. The point is that this very first view should be extremely lightweight and arrive on the user’s machine even before the Flex frameworks and the rest of the application code starts downloading. Giving users the ability to start working quickly with partially loaded code gives a perception that your application loads faster.
In this section, you’ll learn how to create and load a rapidly arriving logon screen to keep the user occupied immediately. Here are the four challenges you face:
The logon screen has to be very lightweight. It must be under 50 KB, so using classes from the Flex framework is out of the question.
The application shouldn’t be able to remove the logon window upon load, as the user must log in first.
If the user completes logging in before the application finishes its load, the standard progress bar has to appear.
The application should be able to reuse the same lightweight logon window if the user decides to log out at any time during the session.