What is composite application guidance for WPF (hereinafter referred to as PRISM)
Let's imagine that in a complex enterprise-level development, the scale of our development is so great that we need to break it down into smaller modules so that we can distribute it to different people, even teams from different places, and we finally integrate these relatively independent modules into a complete application. So we need to find a way to help us divide and organize these modules so that they are relatively independent (low coupling), and of course we need to find a better way to communicate between modules.
This problem was first noticed by the cab (if you don't know cab/scsf, you can refer to here or here, if you don't know composite application, you can refer here), but a little bit about the cab, we'll see that it's actually for Windows Forms development is designed to not support WPF very well. Some might say that they can find some way to make WPF work well in the CAB framework, and indeed, I know that because the project I'm working on is doing it. But I would say that it may be work to transform a tractor into a sports car, but it is still a tractor, the advantage of which is to harvest the wheat instead of taking you to the party.
So, from the beginning of the year, the P&p team began looking for a composite application scheme for WPF, similar to the CAB (but not the for-WPF version of the CAB), so we have the composite here to discuss Application Guidance for WPF (Prism)
The difference from the cab
In fact, when I first came into contact with Prism, I thought it was a WPF version of the cab, but then I found out: No. This is what is said in the official document of the composite UI framework,prism for WPF implementation of composite application: (in the English text here, I have a simple translation for you, do not laugh, my English is not good, hehe):
This is not a new version of the cab, but a new development library and Development guide from scratch to help you develop the new WPF composite application, although it is not a new version of the cab, but some of the core concepts of its borrowed cab, such as Modularity,ui composition,services,dependency injection (Dependency injection), and event brokering, the concept is to create composite necessary for application and prism. The reason for doing this (creating a whole new framework) is due to the following reasons:
L PRISM A lot of user feedback: Over the years, the P&P team has received a lot of good feedback about cabs, both positive and negative. A lot of feedback says it's too heavyweight, too complex, too tightly coupled, and hard to fix. And customers expressed a need for a approach this allows incremental the the library and to adoption with work Lib Raries. The patterns & practices team determined, the best way to address the concerns and tackle the new ideas is with a Clean break.
Lcab does not support WPF. Although you can find some way to work on the cab on WPF, the cab is not built on the core advantages of WPF. In fact, in many cases, many of the mechanisms introduced by the CAB are native to WPF, for example, WPF is a attached property to implement the UI composition is lighter than the way it is in the current cab. In addition, WPF is inherently different from Windows Forms, and it has a much more flexible way of combining your UI,WPF than the traditional way of using controls, and introduces a number of ways such as templates (Template) to control your interface drawing.
Lcab relies on Windows Forms development experience, while WPF development has a pattern of impassability (the contents of the WPF development model are not translated. Ha, refer to my article)
Where should I go:
Very simple, you can refer to the following recommendations:
If you need to develop a composite Windows Forms application, you can consider CAB/SCSF
If you need to develop a composite Windows Forms application but want to use some of the WPF content above, consider CAB/SCSF and WPF interop
If you need to migrate an existing composite Windows Forms application to WPF, consider the cab, SCSF, and smart Client contrib (this can create a WPF view)
If you want to develop a composite WPF application or upgrade an existing WPF project to a composite WPF application, you can consider using the composite application described in this article Guidance for WPF
Prism Environment and resources download
downloads |
compo Site application guidance for WPF Composite Application Guidance for WPF documentation (also included and the above do wnload) |
manifestmanagerutility for ClickOnce |
getting started with the composite application guidance Overview Stock Trader Reference Implementation QuickStarts Hands-on Lab |
community Feedback and Support |
codeplex Community Site |
license |
end User Licensing Agreement (EULA) |