17
votes

I was reading about Windows Phone 8.1 Development, because I already work with Windows Phone 8 and I intend to start working with the new OS version.

Then I downloaded the Visual Studio for Windows with update 4, opened one project of mine (target to WP8) and clicked to "upgrade to 8.1".

I saw that my solution changed the name to "Windows Phone SilverLight 8.1".

Then I tried to create a new project targeting Windows Phone 8.1, and I saw the following options under Visual C# tree (as shows the image):

  • Universal Apps
  • Windows Apps
  • Windows Phones Apps

enter image description here

As my goal is to develop for phone devices with Windows Phone 8.1, I chose "Windows Phone Apps". But I saw that this project is kind different from the other (the one that I upgraded from WP8). It appears "Windows Phone 8.1" on the solution instead of "Windows Phone SilverLight 8.1". And codes are also very different.

So, I made a research about it, to understand the difference between "Windows Phone SilverLight 8.1" and "Windows Phone 8.1", read some posts like this:

but I couldn't find anything that made me understand.

At some point, I found an answer saying that "Windows Phone 8.1" is for Universal Apps... but I disagree, if I wanted to create an Universal App, I would choose the "Universal App" instead of "Windows Phone Apps".

Does anyone knows exactly the difference between this two projects?

3

3 Answers

22
votes

The main difference is that Windows Phone 8.1 Store Apps strictly use WinRT APIs which are not available under Silverlight.

Before you read on, this is the short version:

  • Windows Phone 8.1 Store App code runs on all Windows Phone 8.1+ and Windows 8+ machines, since it uses the unified WinRT API.
  • Windows Phone Silverlight App code runs on all Windows Phones 7+ but not on all Windows 8 machines (ARM machines do not support all features). That's why Windows Store apps are using different APIs (WinRT). You might want to check out this link: http://msdn.microsoft.com/en-us/library/windows/apps/jj681690%28v=vs.105%29.aspx

Windows Phones were using Silverlight apps only up to version 8 while apps for Windows 8 (an up) offered the WinRT API as well - you may have noticed the Windows 8 RT versions for ARM CPUs..

So - to stop the endless parallelism of Silverlight and WinRT Microsoft decided to unify the development process. Starting from Windows Phone 8.1, Windows Phone also runs WinRT (rebranded as Windows Runtime, I think) apps.

The main advantage is that you can now easily port Windows Phone 8.1 code to a Windows 8.1 app and vice versa, since both are using the same APIs. Accessing files, storage, networking.. it's all the same across Windows Phone and for Windows Store Apps.

This is where Universal Apps come into play. Instead of porting your code later by creating a new project you can now easily create a universal project that contains shared code both for Windows Phone 8.1 and Windows 8.1.

However, the downside is that your app won't run on Windows Phones < 8.1.

2
votes

The difference is in the framework the app will use.

Silverlight is a plugin like Flash, so if you develop an app that use it, you have to use his library/syntax. It is an old way to develop web and phone applications.

Universal is the new framework that Microsoft develop for help developers to create apps that run both on Windows Phone or Windows Store.

So, what you find in internet is correct: Phone App is for Universal framework. The voices that VS offers mean: - Universal App: for any device (Phone/Tablet/PC) - Phone App: only for Phone (pay attention! Can use any library developed for Universal App since Universal App can run on Phone) - Windows App: only for Tablet/PC (no phone). You can use Universal App library like Phone App can do

I hope this could help

-1
votes

Silver Light project does have service reference facility while in window phone it is removed so you can use either azure provided services or rest services while developing for windows phone