Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How easy is it to port a Windows Phone 7 application to Metro on a Windows 8 tablet?

I know that Metro on both platforms shares a common “look and feel” and that WinRt makes use of XAMLand C# (or VB.NET) like Silverlight does on Windows Phone 7.

However I also know that WinRT is not Silverlight.

Therefore what is the process of creating an app that will work on both a Windows 8 tablet and a Windows 7 (or 7.5) Phone?

How close is WinRt to Silverlight?

like image 262
Ian Ringrose Avatar asked Sep 15 '11 10:09

Ian Ringrose


3 Answers

Despite certain people in Microsoft claiming it will only require changing a couple of lines of code...

The only possible answer to how difficult it will be to port an app is IT DEPENDS!

  • What does the phone app do?
  • How much of that functionality is also available on Win8?
  • What should be done done when it's not possible to do the same thing on Win8?
  • What should additionally be added (if anything) to the Win8 version?
  • What are you going to do with the extra screen real estate that you have on Win8 compared with the phone?
  • Are you using controls or UI elements on one which don't exist on the other?
  • etc, ....

The parrallels are that:

  • both use XAML
  • both can use the same programming language for the code (probably C#)
  • the design of "metro style" apps on Win8 was INSPIRED by Metro (the design language of WP7)

beyond that it will depend on the app.

You can't create an app which will run on both. At the very least you'll need to recompile as the 2 platforms will require targetting different versions of the .net framework.

Update:
Microsoft have provided some early stage guidance on making such a port. It includes some namespace and API mappings.

like image 81
Matt Lacey Avatar answered Nov 20 '22 13:11

Matt Lacey


Looking at the APIs, and ignoring differences in user experience, I'd say: not difficult but not trivial. Or, another way, more difficult than going from WPF to Silverlight but less difficult than WinForms to WPF.

  • Most of the WP/Silverlight controls (minus pivot/panorama) exist, but they exist a different namespace
  • Other features, like inter-application communication and state management, appear to work completely differently.
like image 30
Richard Szalay Avatar answered Nov 20 '22 14:11

Richard Szalay


The biggest potential problem I experienced is if you happen to have chosen to develop with XNA/Silverlight on the Windows Phone. In that case you either have to decide to completely rewrite the application or try out an XNA replacement such as MonoGame. Having gone that route myself I can happily say that, at least at this stage, MonoGame seems to support at least 90% of the functionality of XNA and due to the hard work of a few groups of developers and individuals it is now relatively easy to port over the application without too many fundamental changes.

Here is the link to MonoGames website http://monogame.codeplex.com/

like image 43
RobCurr Avatar answered Nov 20 '22 15:11

RobCurr