Prism for WP8 and the new guy in town

Topics: Prism v4 - Silverlight 4, Prism v4 - WPF 4
Oct 5, 2013 at 7:39 AM
Edited Oct 5, 2013 at 7:52 AM
Hey Guys,
I'm trying to compose a windows phone 8 app with Prism and Ninject or even better Unity. I'd like to make it fully MVVMble to do two things. A StepByStep Guide for absolute beginners, because I think learning it the wright way from the start is a very good thing.
And I'd like to do a sample for our Barcode scanner Project with Prism for Windows Phone 8.

my Enterprise App for WP8 also needs some more stability, maintainability and extendability. And I think I can only achieve that with composition and the wright framework :)

I think because of the small amount if space on a tablet and even more on the phone, you deal with so many screens in comparison to e.g. WPF, that the usage of composition and reusanlility is even more important on the mobile devices than on the desktop.

I'm also thinking about cross platform Dev with Prism for WP8 and WinRT. Could Prism help? How to structure XAML to able to reuse it?

Thank you so much for your awesome work and brainmelt in all your projects. We love you for that :)
If you need any help with anything - don't hesitate to ask :)
Oct 7, 2013 at 7:18 PM
Hi Fabian

I'm glad you are interested in using Prism in your project. However, based on the description of what you want to achieve I not sure how much of the current Prism library will be of help to you.

First of all, as far as I know the latest version of the library for Windows Phone was designed to target Silverlight on Windows Phone 7.1. Therefore, some capabilities of the library might not work as out of the box. However, I believe there are parts of the library that could be taken out and used in a Windows Phone 8 that you might find useful to apply in your application.

Second, the Windows Phone version is limited providing only the following functionalities:
  • Support for MVVM: A base class for view models, command implementations, etc.
  • Event aggregation to publish / subscribe events in a loosely coupled fashion.
  • Interactions between view models and views.
As far as I know, it doesn't provide any functionality to compose views or manage navigation in Windows Phone, which if I understood correctly is the main functionality you are interested in.

Regarding your approach of making the application cross-platform between Windows Phone 8 and Windows Runtime, I don't think Prism will be of help in this case either as each version it's dependent of its corresponding platform. As far as I know, views are rarely reused between different platforms. What can be often reused between them is the logic part of the application, including view models, models, services, etc.

Even so, there is a version of Prism for Windows Runtime that you might find useful for the Windows Runtime version of your application, which provides navigation functionalities, state management, etc:

Damian Cherubini