README.md 15.3 KB
Newer Older
D
Dan Siegel 已提交
1
# Prism
D
Dan Siegel 已提交
2

D
Dan Siegel 已提交
3
Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Xamarin Forms, Uno Platform and WinUI. Separate releases are available for each platform and those will be developed on independent timelines. Prism provides an implementation of a collection of design patterns that are helpful in writing well-structured and maintainable XAML applications, including MVVM, dependency injection, commands, EventAggregator, and others. Prism's core functionality is a shared code base supported in .NET Standard 2.0, .NET Framework 4.5 / 4.7. Those things that need to be platform specific are implemented in the respective libraries for the target platform. Prism also provides great integration of these patterns with the target platform. For example, Prism for Xamarin Forms allows you to use an abstraction for navigation that is unit testable, but that layers on top of the platform concepts and APIs for navigation so that you can fully leverage what the platform itself has to offer, but done in the MVVM way.
B
Brian Lagunas 已提交
4

D
Dan Siegel 已提交
5 6
## Help Support Prism

D
Dan Siegel 已提交
7
As most of you know, it takes a lot of time and effort for our small team to manage and maintain Prism in our spare time. Even though Prism is open source and hosted on GitHub, there are a number of costs associated with maintaining a project such as Prism.  Please be sure to Star the Prism repo and help sponsor Dan and Brian on GitHub. As a bonus GitHub sponsors get access to Sponsor Connect where you can access exclusive training content, all Prism CI builds, and a Sponsor Only Discord with Brian and Dan!
D
Dan Siegel 已提交
8

D
Dan Siegel 已提交
9
Don't forget both Brian and Dan have content on YouTube and stream there from time to time. Be sure to subscribe to their channels and turn on notifications so you know when they do a Live Stream!
D
Dan Siegel 已提交
10

D
Dan Siegel 已提交
11 12 13 14
| | Sponsor | Twitter | YouTube |
|:-:|:--:|:--:|:--:|
| Brian Lagunas | [![GitHub][OctoSponsor]](https://xam.dev/sponsor-prism-brian) | [![Twitter][TwitterLogo]](https://twitter.com/brianlagunas)<br /><span style="font-size:9px">Follow</span> | [![YouTube][YouTubeLogo]](https://youtube.com/brianlagunas)<br /><span style="font-size:9px">Subcribe & Ring the Bell</span>
| Dan Siegel | [![GitHub][OctoSponsor]](https://xam.dev/sponsor-prism-dan) | [![Twitter][TwitterLogo]](https://twitter.com/DanJSiegel)<br /><span style="font-size:9px">Follow</span> | [![YouTube][YouTubeLogo]](https://youtube.com/dansiegel)<br /><span style="font-size:9px">Subscribe & Ring the Bell</span>
D
Dan Siegel 已提交
15

D
Dan Siegel 已提交
16
## Build Status
17

B
Brian Lagunas 已提交
18 19
|          | Status |
| -------- | ------ |
D
Dan Siegel 已提交
20 21 22 23 24 25
| Full Build | [![Prism CI](https://github.com/PrismLibrary/Prism/actions/workflows/ci.yml/badge.svg)](https://github.com/PrismLibrary/Prism/actions/workflows/ci.yml) |
| Prism.Core | [![build_core](https://github.com/PrismLibrary/Prism/actions/workflows/build_core.yml/badge.svg)](https://github.com/PrismLibrary/Prism/actions/workflows/build_core.yml) |
| Prism.Wpf | [![build_wpf](https://github.com/PrismLibrary/Prism/actions/workflows/build_wpf.yml/badge.svg)](https://github.com/PrismLibrary/Prism/actions/workflows/build_wpf.yml) |
| Prism.Forms | [![build_forms](https://github.com/PrismLibrary/Prism/actions/workflows/build_forms.yml/badge.svg)](https://github.com/PrismLibrary/Prism/actions/workflows/build_forms.yml) |
| Prism.Uno | [![build_uno](https://github.com/PrismLibrary/Prism/actions/workflows/build_uno.yml/badge.svg)](https://github.com/PrismLibrary/Prism/actions/workflows/build_uno.yml) |
| Prism.Maui | [![build_maui](https://github.com/PrismLibrary/Prism/actions/workflows/build_maui.yml/badge.svg)](https://github.com/PrismLibrary/Prism/actions/workflows/build_maui.yml) |
D
Dan Siegel 已提交
26

D
Dan Siegel 已提交
27 28
## Support

D
Dan Siegel 已提交
29
- Documentation is maintained in [the Prism-Documentation repo](https://github.com/PrismLibrary/Prism-Documentation) under /docs and can be found in a readable format on [the website](http://prismlibrary.com/docs/).
B
Bart Lannoeye 已提交
30
- For general questions and support, post your questions on [StackOverflow](http://stackoverflow.com/questions/tagged/prism).
D
Dan Siegel 已提交
31
- You can enter bugs and feature requests in our [Issues](https://github.com/PrismLibrary/Prism/issues/new/choose).
D
Dan Siegel 已提交
32
- [Enterprise Support](https://avantipoint.com/contact?utm_source=github&utm_medium=prism-readme) is available exclusively from AvantiPoint, and helps to support this project.
B
Bart Lannoeye 已提交
33

D
Dan Siegel 已提交
34 35
## Videos &amp; Training

B
Brian Lagunas 已提交
36
By watching our courses, not only do you help support the project financially, but you might also learn something along the way.  We believe this is a win-win for everyone.
B
Brian Lagunas 已提交
37

38 39 40 41 42 43 44
- [Introduction to Prism for WPF (NEW)](https://pluralsight.pxf.io/bE3rB)
- [Introduction to Prism (Legacy)](https://pluralsight.pxf.io/W1Dz3)
- [What's New in Prism 5.0](https://pluralsight.pxf.io/z7avm)
- [Prism Problems & Solutions: Showing Multiple Shells](https://pluralsight.pxf.io/XVxR5)
- [Prism Problems & Solutions: Mastering TabControl](https://pluralsight.pxf.io/B6X99)
- [Prism Problems & Solutions: Loading Modules Based on User Roles](https://pluralsight.pxf.io/GvjkE)
- [Prism Problems & Solutions: Loading Dependent Views](https://pluralsight.pxf.io/a01zj)
B
Brian Lagunas 已提交
45 46 47

We appreciate your support.

D
Dan Siegel 已提交
48 49
## NuGet Packages

D
Dan Siegel 已提交
50
Official Prism releases are available on NuGet. Prism packages are also available on the SponsorConnect feed which will be updated with each merged PR. If you want to take advantage of a new feature as soon as it's merged into the code base, or if there is a critical bug you need fixed we invite you to try the packages on this feed. The SponsorConnect package feed is available to Sponsors only.
D
Dan Siegel 已提交
51

B
bartlannoeye 已提交
52 53 54 55
### Core Packages

These are the base packages for each platform, together with the Prism's Core assembly as a cross-platform PCL.

D
Dan Siegel 已提交
56
| Platform | Package | NuGet | SponsorConnect |
D
Dan Siegel 已提交
57
| -------- | ------- | ------- | ----- |
D
Dan Siegel 已提交
58 59 60 61
| Cross Platform | [Prism.Core][CoreNuGet] | [![CoreNuGetShield]][CoreNuGet] | [![CoreSponsorConnectShield]][CoreSponsorConnect] |
| WPF | [Prism.Wpf][WpfNuGet] | [![WpfNuGetShield]][WpfNuGet] | [![WpfSponsorConnectShield]][WpfSponsorConnect] |
| Xamarin.Forms | [Prism.Forms][FormsNuGet] | [![FormsNuGetShield]][FormsNuGet] | [![FormsSponsorConnectShield]][FormsSponsorConnect] |
| Uno Platform and WinUI | [Prism.Uno][UnoNuGet] | [![UnoNuGetShield]][UnoNuGet] | [![UnoSponsorConnectShield]][UnoSponsorConnect] |
B
bartlannoeye 已提交
62 63 64

### Container-specific packages

D
Dan Siegel 已提交
65 66 67
Each supported IoC container has its own package assisting in the setup and usage of that container together with Prism. The assembly is named using this convention: Prism.*Container.Platform*.dll, e.g. **Prism.Unity.Wpf.dll**. Starting with version 7.0, Prism is moving to separate packages for each platform. Be sure to install the package for the Container and the Platform of your choice.

#### WPF
B
bartlannoeye 已提交
68

D
Dan Siegel 已提交
69
| Package | NuGet | SponsorConnect |
D
Dan Siegel 已提交
70
|---------|-------|-------|
D
Dan Siegel 已提交
71 72
| [Prism.DryIoc][DryIocWpfNuGet] | [![DryIocWpfNuGetShield]][DryIocWpfNuGet] | [![DryIocWpfSponsorConnectShield]][DryIocWpfSponsorConnect] |
| [Prism.Unity][UnityWpfNuGet] | [![UnityWpfNuGetShield]][UnityWpfNuGet] | [![UnityWpfSponsorConnectShield]][UnityWpfSponsorConnect] |
73

D
Dan Siegel 已提交
74
#### Xamarin Forms
B
Bart Lannoeye 已提交
75

D
Dan Siegel 已提交
76
| Package | NuGet | SponsorConnect |
D
Dan Siegel 已提交
77
|---------|-------|-------|
D
Dan Siegel 已提交
78 79 80 81 82 83 84 85 86 87
| [Prism.DryIoc.Forms][DryIocFormsNuGet] | [![DryIocFormsNuGetShield]][DryIocFormsNuGet] | [![DryIocFormsSponsorConnectShield]][DryIocFormsSponsorConnect] |
| [Prism.Unity.Forms][UnityFormsNuGet] | [![UnityFormsNuGetShield]][UnityFormsNuGet] | [![UnityFormsSponsorConnectShield]][UnityFormsSponsorConnect] |
| [Prism.Forms.Regions][PrismFormsRegionsNuget] | [![PrismFormsRegionsNuGetShield]][PrismFormsRegionsNuGet] | [![PrismFormsRegionsSponsorConnectShield]][PrismFormsRegionsSponsorConnect] |

#### Uno Platform

| Package | NuGet | SponsorConnect |
|---------|-------|-------|
| [Prism.DryIoc.Uno][DryIocUnoPlatformNuGet] | [![DryIocUnoPlatformNuGetShield]][DryIocUnoPlatformNuGet] | [![DryIocUnoPlatformSponsorConnectShield]][DryIocUnoPlatformSponsorConnect] |
| [Prism.Unity.Uno][UnityUnoPlatformNuGet] | [![UnityUnoPlatformNuGetShield]][UnityUnoPlatformNuGet] | [![UnityUnoPlatformSponsorConnectShield]][UnityUnoPlatformSponsorConnect] |
D
Dan Siegel 已提交
88

B
Brian Lagunas 已提交
89
![NuGet package tree](images/NuGetPackageTree.png)
B
bartlannoeye 已提交
90

B
Bart Lannoeye 已提交
91
A detailed overview of each assembly per package is available [here](http://prismlibrary.github.io/docs/getting-started/NuGet-Packages.html).
B
Brian Lagunas 已提交
92

D
Dan Siegel 已提交
93 94
## Prism Template Pack

D
Dan Siegel 已提交
95 96 97
Prism integrates with Visual Studio to enable a highly productive developer workflow for creating WPF, and native iOS and Android applications using Xamarin.Forms.  Jump start your Prism apps with code snippets, item templates, and project templates for your IDE of choice.

> **NOTE**
D
Dan Siegel 已提交
98
>
D
Dan Siegel 已提交
99
> The Prism Templates are open source and available at
D
Dan Siegel 已提交
100
>
D
Dan Siegel 已提交
101
> https://github.com/PrismLibrary/Prism.Templates
102 103

### Visual Studio Gallery
D
Dan Siegel 已提交
104

D
Dan Siegel 已提交
105
The Prism Template Pack is available on the [Visual Studio Gallery](https://marketplace.visualstudio.com/items?itemName=BrianLagunas.PrismTemplatePack).  To install, just go to Visual Studio -> Tools -> Extensions and Updates... then search for **Prism** in the online gallery:
106

B
Brian Lagunas 已提交
107
![Visual Studio Gallery](images/prism-visual-studio-gallery.jpg)
108

D
Dan Siegel 已提交
109 110
## Plugins

D
Dan Siegel 已提交
111
There are certain things that cannot be added directly into Prism for various reasons. To handle these common tasks such as supporting PopupPage's in Xamarin Forms, there are Prism Plugins. You can find a number of Plugins available on NuGet from our maintainer [@DanJSiegel](https://twitter.com/DanJSiegel).
D
Dan Siegel 已提交
112 113

- [Prism.Plugin.Popups](https://github.com/dansiegel/Prism.Plugin.Popups) (Forms Only)
114 115
- [Prism.Popups.XCT](https://github.com/FileOnQ/Prism.Popups.XCT) (Forms Only)
  - Adds support for native popups using Xamarin Community Toolkits Popup API
D
Dan Siegel 已提交
116
- [Prism.Plugin.Logging](https://github.com/dansiegel/Prism.Plugin.Logging) (Works on all Platforms)
D
Dan Siegel 已提交
117 118 119
  - Adds support for Syslog, Loggly, Graylog, Application Insights, &amp; App Center
- [Prism.Container.Extensions](https://github.com/dansiegel/Prism.Container.Extensions)
  - Adds advanced Container Registration abstractions
D
Dan Siegel 已提交
120
  - Adds DryIoc & Unity ContainerExtension with support for Microsoft.DependencyInjection.Extensions. Uses a singleton pattern to allow initialization from a native platform
D
Dan Siegel 已提交
121
  - Provides an extended PrismApplication with additional error handling and platform specifics support for Prism.Forms
D
Dan Siegel 已提交
122 123 124 125
- [Prism.Magician](https://sponsorconnect.dev/nuget/package/prism.magician) (Works with ALL Platforms)
  - The Magician works to reduce the amount of code you need to write with a collection of intelligent code generators that evaluate your codebase and references
  - It additionally provides a series of Roslyn Analyzers to help prevent you from making common mistakes
  - **NOTE:** This package is only available to Dan's [GitHub Sponsors](https://xam.dev/sponsor-prism-dan) and [Enterprise Support](https://avantipoint.com/contact) customers.
D
Dan Siegel 已提交
126

D
Dan Siegel 已提交
127 128
## Samples

D
Dan Siegel 已提交
129 130 131 132
For stable samples be sure to check out the samples repo for the platform you are most interested in.

- [Prism for WPF Samples](https://github.com/PrismLibrary/Prism-Samples-Wpf)
- [Prism for Xamarim.Forms](https://github.com/PrismLibrary/Prism-Samples-Forms)
D
Dan Siegel 已提交
133
- [Prism for Uno Platform](#) (Coming soon)
D
Dan Siegel 已提交
134
- [Prism for .NET MAUI](#) (Coming soon)
B
Bart Lannoeye 已提交
135

D
Dan Siegel 已提交
136 137 138 139
## Contributing

We strongly encourage you to get involved and help us evolve the code base.

140
- You can see what our expectations are for pull requests [here](https://github.com/PrismLibrary/Prism/blob/master/.github/CONTRIBUTING.md).
141

D
Dan Siegel 已提交
142 143 144
[CoreNuGet]: https://www.nuget.org/packages/Prism.Core/
[WpfNuGet]: https://www.nuget.org/packages/Prism.Wpf/
[FormsNuGet]: https://www.nuget.org/packages/Prism.Forms/
145
[UnoNuGet]: https://www.nuget.org/packages/Prism.Uno/
D
Dan Siegel 已提交
146

D
Dan Siegel 已提交
147
[PrismFormsRegionsNuGet]: https://www.nuget.org/packages/Prism.Forms.Regions/
D
Dan Siegel 已提交
148
[PrismFormsRegionsSponsorConnect]: https://sponsorconnect.dev/nuget/package/Prism.Forms.Regions
D
Dan Siegel 已提交
149
[PrismFormsRegionsNuGetShield]: https://img.shields.io/nuget/vpre/Prism.Forms.Regions.svg
D
Dan Siegel 已提交
150
[PrismFormsRegionsSponsorConnectShield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fsponsorconnect.dev%2Fshield%2FPrism.Forms.Regions%2Fvpre
D
Dan Siegel 已提交
151

D
Dan Siegel 已提交
152 153 154 155 156 157
[DryIocWpfNuGet]: https://www.nuget.org/packages/Prism.DryIoc/
[UnityWpfNuGet]: https://www.nuget.org/packages/Prism.Unity/

[UnityFormsNuGet]: https://www.nuget.org/packages/Prism.Unity.Forms/
[DryIocFormsNuGet]: https://www.nuget.org/packages/Prism.DryIoc.Forms/

D
Dan Siegel 已提交
158 159
[DryIocUnoPlatformNuGet]: https://www.nuget.org/packages/Prism.DryIoc.Uno/
[UnityUnoPlatformNuGet]: https://www.nuget.org/packages/Prism.Unity.Uno/
160

D
Dan Siegel 已提交
161 162 163
[CoreNuGetShield]: https://img.shields.io/nuget/vpre/Prism.Core.svg
[WpfNuGetShield]: https://img.shields.io/nuget/vpre/Prism.Wpf.svg
[FormsNuGetShield]: https://img.shields.io/nuget/vpre/Prism.Forms.svg
164
[UnoNuGetShield]: https://img.shields.io/nuget/vpre/Prism.Uno.svg
D
Dan Siegel 已提交
165 166 167 168 169 170 171

[DryIocWpfNuGetShield]: https://img.shields.io/nuget/vpre/Prism.DryIoc.svg
[UnityWpfNuGetShield]: https://img.shields.io/nuget/vpre/Prism.Unity.svg

[DryIocFormsNuGetShield]: https://img.shields.io/nuget/vpre/Prism.DryIoc.Forms.svg
[UnityFormsNuGetShield]: https://img.shields.io/nuget/vpre/Prism.Unity.Forms.svg

D
Dan Siegel 已提交
172 173 174 175 176 177 178
[DryIocUnoPlatformNuGetShield]: https://img.shields.io/nuget/vpre/Prism.DryIoc.Uno.svg
[UnityUnoPlatformNuGetShield]: https://img.shields.io/nuget/vpre/Prism.Unity.Uno.svg

[CoreSponsorConnect]: https://sponsorconnect.dev/nuget/package/Prism.Core
[WpfSponsorConnect]: https://sponsorconnect.dev/nuget/package/Prism.Wpf
[FormsSponsorConnect]: https://sponsorconnect.dev/nuget/package/Prism.Forms
[UnoSponsorConnect]: https://sponsorconnect.dev/nuget/package/Prism.Uno
179

D
Dan Siegel 已提交
180 181
[DryIocWpfSponsorConnect]: https://sponsorconnect.dev/nuget/package/Prism.DryIoc
[UnityWpfSponsorConnect]: https://sponsorconnect.dev/nuget/package/Prism.Unity
D
Dan Siegel 已提交
182

D
Dan Siegel 已提交
183 184
[UnityFormsSponsorConnect]: https://sponsorconnect.dev/nuget/package/Prism.Unity.Forms
[DryIocFormsSponsorConnect]: https://sponsorconnect.dev/nuget/package/Prism.DryIoc.Forms
D
Dan Siegel 已提交
185

D
Dan Siegel 已提交
186 187
[DryIocUnoPlatformSponsorConnect]: https://sponsorconnect.dev/nuget/package/Prism.DryIoc.Uno
[UnityUnoPlatformSponsorConnect]: https://sponsorconnect.dev/nuget/package/Prism.Unity.Uno
D
Dan Siegel 已提交
188

D
Dan Siegel 已提交
189 190 191 192
[CoreSponsorConnectShield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fsponsorconnect.dev%2Fshield%2FPrism.Core%2Fvpre
[WpfSponsorConnectShield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fsponsorconnect.dev%2Fshield%2FPrism.Wpf%2Fvpre
[FormsSponsorConnectShield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fsponsorconnect.dev%2Fshield%2FPrism.Forms%2Fvpre
[UnoSponsorConnectShield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fsponsorconnect.dev%2Fshield%2FPrism.Uno%2Fvpre
D
Dan Siegel 已提交
193

D
Dan Siegel 已提交
194 195
[DryIocWpfSponsorConnectShield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fsponsorconnect.dev%2Fshield%2FPrism.DryIoc%2Fvpre
[UnityWpfSponsorConnectShield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fsponsorconnect.dev%2Fshield%2FPrism.Unity%2Fvpre
D
Dan Siegel 已提交
196

D
Dan Siegel 已提交
197 198
[DryIocFormsSponsorConnectShield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fsponsorconnect.dev%2Fshield%2FPrism.DryIoc.Forms%2Fvpre
[UnityFormsSponsorConnectShield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fsponsorconnect.dev%2Fshield%2FPrism.Unity.Forms%2Fvpre
199

D
Dan Siegel 已提交
200 201
[DryIocUnoPlatformSponsorConnectShield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fsponsorconnect.dev%2Fshield%2FPrism.DryIoc.Uno%2Fvpre
[UnityUnoPlatformSponsorConnectShield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fsponsorconnect.dev%2Fshield%2FPrism.Unity.Uno%2Fvpre
D
Dan Siegel 已提交
202 203 204 205 206

[TwitterLogo]: https://dansiegelgithubsponsors.blob.core.windows.net/images/twitter.png
[TwitchLogo]: https://dansiegelgithubsponsors.blob.core.windows.net/images/twitch.png
[YouTubeLogo]: https://dansiegelgithubsponsors.blob.core.windows.net/images/youtube.png
[OctoSponsor]: https://dansiegelgithubsponsors.blob.core.windows.net/images/octosponsor.png