What is PRISM ? Why its preferred UI framework in .NET for Desktop Based Application?

Introduction

Most of us who are from software development background especially in User Interface might have already heard about the .NET UI framework known as PRISM. Its a well accepted framework to develop scalable and complex desktop based application using .NET technology.

Its an Open Source Framework to develop complex application consisting of different UI components which in themselves are pretty complex. PRISM is based on MVVM(Model View View Model) pattern which is used in WPF to separate the View Logic from the business logic. PRISM helps in providing a template to design and develop User Interface in WPF.

Suggested Read : Load Data Asynchronously in WPF

What is PRISM?

PRISM is available in both .NET Framework as well as .NET Core. To develop application using PRISM one has to be familiar with the Microsoft Windows Presentation Foundation(WPF). The main features of PRISM are as follows:


  • Divides the UI into different Regions which are independent from each other and have no dependency with one another.

By dividing the Main UI into different Regions allows clear separation between the different UI components and these Regions serve as the placeholder for the different Views which can be injected later on based on the business logic.

 

  • PRISM allows us to develop modular application wherein the different UI components are packaged as different Modules/Projects which are essentially PRISM class libraries.

 These class libraries are independent of each other meaning they do not refer each other. If there is a need to pass some data between the modules during the application life cycle there are various ways to do so like using the EventAggregator.

 

  • PRISM comes with out of the box support for Navigation between different views with in a region. 

This is especially useful when there are multiple views to be shown in a region based on business logic. It provides different interfaces such as INavigationAware etc to get notified during the navigation process.

 

  • PRISM allows us to create Unit testable and Integration Testable application which will be very much useful while developing complex application.


Above mentioned are 
 some of the benefits of PRISM but there are some more which is implicit since it uses Managed language like C#. Also Since its Open Source we are able to see the source code in Github and there are continuous feature additions/Bug Fixes which are going on.

More documentation related to PRISM components are available in this official site : prismlibrary.com

  


Comments

Popular posts from this blog

Creating RESTful Minimal WebAPI in .Net 6 in an Easy Manner! | FastEndpoints

Step By Step Guide to Detect Heap Corruption in Windows Easily

How to dynamically add Properties in C# .NET?