Announcement: Prism / data support for Windows Phone 7

Topics: Prism v4 - Silverlight 4, Prism v4 - WPF 4
Jan 5, 2011 at 10:16 AM

If you are interested in using Prism for Windows Phone 7 I have successfully ported Prism 4.0 to it.   The Prism port itself wasn't the challenge, it was the dependency injection container.  I took the ContainerModel DI container from the Mobile Application Blocks (http://Mobile.CodePlex.com), slapped an IUnityContainer interface on it, dragged over the applicable Unit Test from (Prism and Unity) and performed TDD until the test passed; there are close to 800 passing unit test.

With the Prism and a Unity (like) container available I developed a multi-targeting framework where Desktop, Silverlight and Phone all use the same code base.   The Silverlight and Desktop even share the same XAML with the Desktop application "only" having a Resource folder (templates/styles) with its own code.  

All that was lacking was data so I took a port of Sqlite and adapted it to run on all three platforms (with a single code base using IsolatedStorage)

The http://PasswordMgr.CodePlex.com currently has a functional login screen (panaroma for the phone) which loads "on-demand" a PasswordManager module after a successful login.   The application is a work in progress however the frameworks are essentially completed and appear to be stable.

 

 

 

Developer
Jan 5, 2011 at 4:42 PM

Hi Bill,

Thank you for your contribution. It could be also helpful to know that there is a Windows Phone 7 version of the Prism Class Library (more information here).

Thanks.

Guido Leandro Maliandi
http://blogs.southworks.net/gmaliandi

Jan 6, 2011 at 3:56 PM
Edited Jan 6, 2011 at 3:56 PM
GuidoMaliandi wrote:

Thank you for your contribution. It could be also helpful to know that there is a Windows Phone 7 version of the Prism Class Library (more information here).

 

Any rumors on when the Windows Phone 7 version of Prism Class Library will have dependency injection?   My port is only intended to be around until I have something I can plug in along side of the silverlight and desktop versions (critical for the multi-targeting direction that I'm taking).  I don't want to spend a lot of time investing in it when something better is around the corner :)   Last conversation in the Unity forum was that it wasn't on the table and MEF might be a longer reach (for the Phone).

 

 

 

Developer
Jan 6, 2011 at 5:08 PM

Hi Bill,

You could check the following resources about MEF support for WP7:

As for Unity, you can check these posts:

Other than that (which are probably the posts you've already read), there isn't official information on the subject. You should take into account, however, that Prism is container agnostic, so you could try using other Dependency Injection containers, some of which may already have a WP7 version. You can read more about the container agnostic design of prism in this thread:

MEF or Unity for Prism v4 "Dependency Injection"?

Thank you again for your contribution. I've added a link to this thread in the Prism Knowledge Base for other users to benefit from this.

I hope you find this helpful.

Guido Leandro Maliandi
http://blogs.southworks.net/gmaliandi