Windows Phone 7.5. Windows 8. Two platforms built by Microsoft that have inherently different ways of building apps (the platforms themselves, after all, are different). When Windows 8 was announced, Windows Phone developers soon found out that sharing code between Windows Phone and Windows 8 was not quite as simple as they thought it would be. But the truth is, it’s not that hard to create code that is useable by both Windows Phone 7.5 and Windows 8 as long as you architect it properly. And the secret sauce to making this happen is the MVVM pattern.
Windows Phone 8 has been touted as the way you can create amazing app experience for Microsoft’s smartphone platform that can also be re-used by Windows 8 apps. This is certainly will be true, but the fact of the matter is that (at the time of this post being written), there is no Windows Phone 8 SDK. Which means that many Windows Phone developers targeting Windows Phone 7.5 are likely thinking that reusable code for both their phone app and Windows 8 app is likely a pipedream. Makes sense, right? Windows Phone 7.5 apps are built using a version of Silverlight while Windows 8 is using WinRT as it’s app platform. They kind of look the same but they really aren’t.
The good news is that if you are familiar with the Model-View-ViewModel (MVVM) pattern, you can create reusable code between Windows Phone 7.5 and Windows 8. Today. As in, now. Interested? Good, thought you might be.
The great news is that MVVM is a great model to follow for most modern Microsoft platform development as well and will make your apps very ready for new platforms as they come along as well.