Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Bootstrapper causes other UI frozen

$
0
0
Hi,

Unfortunately, running the bootstrapper in a background thread is not a trivial task. Basically, there are two main problems you will find when trying to do so:

  • Beside the initialization on the modules, the bootstrapper is also in charge of initializing the shell. Hence, you will need to invoke all logic related to the creation, initialization and activation of the shell to the UI thread (for example, via the Dispatcher.)
  • Usually during their initialization, the modules might need to interact with the with the UI too, for example by adding or registering views to a region. This logic also needs to be invoked in the UI thread.
In my opinion, an easier implementation could be to show a new "window" though a different STA thread and then run the bootstrapper in the main thread normally. In this new "window" can show any information you might need to inform the user that the application is being loaded (using busy indicators, progress bars, etc.)

This approach is similar to the one used to show non-static splash screens in the following thread:
I hope this helps,

Damian Cherubini
http://blogs.southworks.net/dcherubini

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>