Home >Common Problem >What does bootstrapper mean?
Prism is an ultra-lightweight open source framework, formerly known as Angel, and now renamed Prism. Initial Research on Prism Initialization Application
Bootstrapper (Recommended learning: Bootstrap video tutorial)
The responsibility of the Bootstrapper class is to initialize the application using the Prism class library. Most of the functions provided by the abstract class Bootstrapper are virtual methods.
DI
The UnityBootstrapper and MefBootstrapper classes implement most of the necessary functions.
Shell
In a Prism application, the responsibility for creating the Shell or main window is Bootstrapper's. Because some services that the Shell depends on, such as the Region Manager, need to be initialized before the Shell is displayed.
Key decision
Whether to use Unity, MEF or other dependency injection container, this determines the Bootstrapper class creation;
What services are used by the application, these The service needs to be registered in the container;
Determine whether it is necessary to create a log service, or whether other log services are required;
Determine which modules you want the application to discover, by displaying code statements and folder scanning , configuration file or XAML configuration;
Core steps
Create Bootstrapper
Implement the CreateShell method
Return to your application Shell As an instance of the class, you can choose to create a Shell object or obtain the Shell from the Container according to your needs.
protected override DependencyObject CreateShell()<br>{<br> return this.Container.Resolve<Shell>();<br>}<br>
For more technical articles related to Bootstrap, please visit the Bootstrap Tutorial column to learn!
The above is the detailed content of What does bootstrapper mean?. For more information, please follow other related articles on the PHP Chinese website!