3
votes

I have LoginForm, Splashscreen, MainForm and Authentification.

Current design is to show LoginForm before any other action and MainForm.

Main() calls modal LoginForm that check credentials, if ok Application.Run(MainForm) with Splashcreen.

Problem: LoginForm freeze for 6sec when EF checking for uid/pwd. As a result splashscreen is shown < 1sec.

Q1: Is there a way to speed up cold start because only check user/password combination before MainForm start?

Q2: What would be best start sequence design? What You think of:

  1. From LoginForm, call Spashscreen with context load dummy data (all users),
  2. then show LoginForm and check credentials.
  3. After modal LoginForm closes Run(MainForm).

Note: EF600rc doesn't have UNIQUE annotation yet.

3

3 Answers

0
votes

A better solution would be to use a framework window, which shows a login screen. Login screen checks credentials and let the framework window to switch to main screen.

You can read about here. Source code is also available.

0
votes

As far I could find answer to:

A1: Upgrade EF, and generate native images for the EntityFramework assembly with Ngen and VS2013 as in link (performance issue). But VS2013 is not option for me. Other option maybe is to downgrade to EF5.?!?

A2: Proposed start sequence of LogIn form with Splash Screen exposed to be good.

0
votes

About the Sequence

Splash screens help in giving a "face" to your application. They are generally eye appealing and blah blah blah but they are a great tool for developers in letting certain parts of application initialize behind the scenes. As such sometimes this bulk comes initially prior to authentication or later depending on the application. Many times it comes later because user related data has to be loaded.

Now from a user point if view Login->Splash->Application are too many transitions IMO especially considering the possibility of combining the two.

Alternative Idea

Here is another idea that meets the requirement and makes it easier to program. You could combine the 2 with some careful design of splash screen UID, Password fields could be right on the splash screen. Then when the userID/password is clicked and the server is authenticating you may continue to show some "progress bar" when the user is authenticated (> 3 sec) you can now pre-load your app data (authorization/security data etc) and still continue.

I am not familiar with MS technologies so can;t go into the specific but this should be easy to accomplish given the nature of the problem you are facing. Good luck.