Below are the 4 unreplied questions from the Q&A session in SilverlightShow webinar 'Prism and WCF RIA Services' delivered on 5/30/2012 by Brian Noyes. Watch a recording of this webinar here (Q&A session starts at 00:51:00). Jump to a question:
Prasert Simla: Prism 4 support event to command?
Brian: No, Prism 4 takes a dependency on the Blend SDK, and expects you to use the InvokeCommandBehavior that is in the Blend SDK for that. The Blend SDK is freely downloadable and redistributable, no Blend license needed.
Jonathan Hornberger: Due to the silverlight lingering thing, is there any chance Prism would be able to adapt to WinRT in the future?
Brian: I can speculate and say I think they will address WinRT with Prism functionality in the near future. Keep an eye out on my blog for when I can say more, in discussions with the Prism team on that now.
Chris Evans: I love Silverlight, but worried about the future with Win8 etc. any words/direction you can give there?
Brian: That is a topic of many many discussions and speculations. Silverlight 5 is a mature product in the same sense that WPF is a mature product. Not much more is needed there. It will be supported for 10 years. The flat fact is Microsoft is not saying anything about future versions, but most of the people in Redmond who were working on Silverlight are now working on WinRT so I’m not holding my breath expecting some surprise announcement there. The fact is WinRT is the priority right now because Silverlight is mature and doesn’t need a lot of attention. Just like Windows Forms has had no attention since .NET 2.0 shipped. But I have had many customers in the last 7 years starting new projects on Windows Forms – because it was the most mature and stable and reliable UI technology to build apps on today. I don’t think we will ever see a UI technology that you can say “build on this and you will get the perfect mix of user experience, productivity, performance, maintainability, etc for the next 10 years or more”. The technology just moves too fast. The best we can generally do is forecast about 3-5 years out, and within that window, it is still a pretty simple formula:
- If you want a desktop, Windows only app that has the most powerful framework and capabilities behind it – WPF
- If you want a desktop or browser based app that runs on both Windows and Mac (at least current versions) – Silverlight
- If you want a truly multi-platform UI – HTML 5
- If you want a mobile device UI – tough tradeoff between single code base, multi-platform HTML but not the best user experience vs writing at least 3 versions – WP7/WP8, iOS, Android to maximize user experience
Atif Shahzad: What you recommend for MEF and Navigation frameworks (PRISM OR MVVM).
Brian: Yes :) Prism can use MEF, shows you how and encourages you to use MVVM, and allows you to mix MVVM style navigation (changing data bound properties that expose child view models and having the UI re-render as a result) and Prism Region Navigation (swapping views in Regions with either Add/Activate API or the newer RequestNavigate API). So I favor using MEF over Unity these days myself, although it is easy to switch or use a different container if you prefer. I always use MVVM for structuring my individual views. I mostly use MVVM hierarchical view models (parent view models exposing child view model properties with data templates to render their view) for sub-view navigation, and mostly use Prism Regions for plugging in top level views and navigating between them.