Sharing code between Windows 8 store applications and Windows Phone 8

Posted: (EET/GMT+2)

 

Developing Windows 8 store applications and Windows Phone apps is fun in its own right, but if you wanted to share code between these two, it requires some thinking. As a rule of thumb, you cannot easily share user interfaces (nor, perhaps, should you), but you can easily share application logic and if nothing else, the backend(s).

On the latest MSDN Magazine issue from June, there's an article about this topic. The article presents a clean, MVVM based architecture for this, and also utilizes dependency injection (DI) for an example of how to display messages to the user.

I spoke about this same topic earlier in a SANKO (Finnish .NET) user group event last year, and at that time, there already was some interest in this topic. I believe in the future, even more code can be shared between these two platforms.