Home >Common Problem >What does bootstrapper mean?

What does bootstrapper mean?

(*-*)浩
(*-*)浩Original
2019-07-18 14:03:195902browse

Prism is an ultra-lightweight open source framework, formerly known as Angel, and now renamed Prism. Initial Research on Prism Initialization Application

What does bootstrapper mean?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn