当前位置:网站首页>Prism framework
Prism framework
2022-06-26 03:44:00 【yuyue5945】
Prism Framework application - Basic knowledge
Prism Frame concept
prism was the code name for the guidance formally known as the Composite Application Guidance for WPF and Silverlight. For brevity and conciseness, and due to customer demand, this guidance is now referred to simply as Prism.
Prism Used to develop multiple interfaces 、 Rich data and interactive features WPF and Silverlight The specific presentation and business logic of the application .
Prism The purpose of the framework application is
- Decoupling between modules
- UI Decouple from background development
- Reduce functional coupling at the beginning of programming
Prism Frame details
Frame diagram

Introduction to framework module
Modoules:Modules Is able to independently develop 、 test 、 Deployed functional units ,Modules Modules that can be designed to implement specific business logic ( Such as Profile Management), It can also be designed as a module to implement a common infrastructure or service ( Such as Logging、Exception Management)
Module Catalog: stay Prism in ,Module Catalog It is indicated that Load Which? Module, In what order Load these Module.
Shell:Shell It's the host application (host application),modules Will be load To Shell in .Shell Defines the overall layout and structure of the application , And don't care about the boarders Module,Shell It is usually implemented in general application service and infrastructure, The logic of application is realized in the concrete Module in , meanwhile ,Shell It also provides a top-level window for the application .
Views:Views It's a view that shows specific functions in the application , It shows UI、 Define interaction behavior , And through data binding with ViewModel Interact .
Regions:Regions It's the app UI The logical region of , It's very much like a PlaceHolder,Views stay Regions Show , Many kinds of controls can be used as Region:ContentControl、ItemsControl、ListBox、TabControl.Views Can be in Regions Programming or auto rendering ,Prism Also provided Region Navigation support .
Navigation:Prism Support two kinds of navigation :state-based Navigation and view-switching Navigation .
EventAggregator: Components usually communicate with other components or services . So ,Prism Provides
EventAggregator Components , This component implements pub-sub Event mechanism , Allow some components to publish Events , Other components subscribe to events without a reference between the two components .
Dependency Injection container:Prism Use dependency injection pattern to manage dependencies between components ,Prism Designed to use Unity、Mef And so on .
Services:Services It's used to realize non UI The logic of the relevant functions , for example logging、exception management、data access.Services Can be defined in an application or Module in ,Services Usually registered in a dependency injection container , Make it easy for other components to locate this service .
Controllers:Controller Used to control in Region Which one of them View Will be presented , Control this at the same time View Creation and initialization of .
MVVM Related modules
View Model and Presenters:View Model To encapsulate an application UI Logic and its state .
Model:Model Is used to encapsulate data and corresponding validation , And relevant business rules to ensure the consistency and correctness of the data .
Commands:Command Is used to encapsulate application functions ,Prism Provides Delegate Command and CompositeCommand Two classes .
Bootstrapper:Bootstrapper To initialize application level components and services , It is also used to configure and initialize module catalog and Shell Of View and View Model. The function is shown in the figure :
To configure and initialize module catalog and Shell Of View and View Model. The function is shown in the figure :

边栏推荐
- Deletelater Usage Summary in QT
- General operations of asynctask
- MySQL高级部分( 四: 锁机制、SQL优化 )
- XGBoost, lightGBM, CatBoost——尝试站在巨人的肩膀上
- Classic model - Nin & googlenet
- HL7Exception: Can‘t XML-encode a GenericMessage. Message must have a recognized struct
- JS to achieve the effect of text marquee
- Nebula Graph学习篇3_多线程完成6000w+关系数据迁移
- You cannot call Glide. get() in registerComponents(), use the provided Glide instance instead
- [appium stepping pit] io appium. uiautomator2. common. exceptions. InvalidArgumentException: ‘capabilities‘ are mand
猜你喜欢

计组笔记 数据表示与运算 校验码部分

How to prepare for a moving wedding
![MySQL advanced Chapter 1 (installing MySQL under Linux) [2]](/img/24/0795ebd2a0673d48c5e0f9d18842d1.png)
MySQL advanced Chapter 1 (installing MySQL under Linux) [2]

云计算基础-0

经典模型——ResNet

Analysis of the multiple evaluation system of children's programming

Class diagram

Non H5 end of uni app, regional setting of status bar on the top of mobile phone

【好书集锦】从技术到产品

点击事件
随机推荐
mysql存储过程
MySQL stored procedure
An easy-to-use tablayout
Worm copy construction operator overload
HL7Exception: Can‘t XML-encode a GenericMessage. Message must have a recognized struct
计组笔记 数据表示与运算 校验码部分
Uni app Baidu cloud realizes OCR ID card recognition
数字孪生智慧水务,突破海绵城市发展困境
Where is it safe to open a fund account?
微信小程序开发准备工作
评价——层次分析
Cliquez sur le bouton action de la liste pour passer à une autre page de menu et activer le menu correspondant
Uni app custom navigation bar component
2022.6.24-----leetcode.515
[appium stepping pit] io appium. uiautomator2. common. exceptions. InvalidArgumentException: ‘capabilities‘ are mand
360 second understanding of smartx hyper converged infrastructure
JS to achieve the effect of text marquee
Insect structure and Deconstruction
When the tiflash function is pushed down, it must be known that it will become a tiflash contributor in ten minutes
Non H5 end of uni app, regional setting of status bar on the top of mobile phone