×
Namespaces

Variants
Actions

Windows Phone 8 development from a Windows 8 developer's perspective

From Nokia Developer Wiki
Jump to: navigation, search

This article explains some of the similarities and differences in developing apps for Windows 8 and Windows Phone 8.

Article Metadata
Article
Created: ()
Last edited: matthewthepc (18 Apr 2013)

Contents

Introduction

If you're a Windows 8 developer, it's quick and easy to apply your skills to Windows Phone 8 development. This article will highlight some of the differences in the platforms, and will help you port your Windows 8 applications to Windows Phone 8, and create new applications targeting Windows Phone. Note that many of the topics covered in this article have much more information available than is provided, so when possible links to longer, more detailed descriptions will be provided.

Prerequisites

If you're already a Windows 8 developer, you probably already have the latest version of Visual Studio. If you don't, or if you're running a Visual Studio Express Edition, you'll need to download either Visual Studio 2012 Express for Windows Phone or the Windows Phone SDK for Visual Studio 2012.

While both of these options come with a simulator, you'll get a better idea of how your app works in real time if you use a real device. Nokia and Microsoft both offer on site and off site test devices that you can use to test your application (MICROSOFT and NOKIA links).

Language Options

In Windows 8, you can create WinRT apps using JavaScript, C#, Visual Basic.NET, or C++. While you can create Windows Phone 8 apps in C#, Visual Basic.NET, and C++, you can not create them in JavaScript. Instead, you can create an app primarily composed of web viewers, which will allow you to display HTML5 content in your Windows Phone app.

JavaScript for Windows Phone Apps

Why isn't it natively supported?

Even though much of the backend development experience for Windows 8 and Windows Phone 8 is extremely similar, Windows Phone apps are still based off of a Silverlight frontend so there are huge differences in that regard. One of these differences is that you can't natively use JavaScript as your layout engine, or use the WinJS library to interact directly with the OS in JavaScript. (http://en.wikipedia.org/wiki/Windows_RunTime#Windows_Phone_Runtime)

How can I use it?

To use JavaScript as the primary language for your Windows Phone app, there's a handy "Windows Phone HTML5 App" template which allows you to approximate the experience. Open Visual Studio and select "New Project," then find "Windows Phone HTML5 App" under the "Windows Phone" category on the left. You can then modify the HTML of your app using the files in the HTML folder of the solution, and add code that interfaces with the operating system in MainPage.xaml.cs.

(More Info Link)

Publishing Apps

Subscriptions

There are many important differences to note between the Windows Phone and Windows 8 developer offerings. The first is the price of a subscription - Windows 8 Developer Subscriptions typically cost about $50/year, while Windows Phone Developer Subscriptions cost around $100/year. Unless you're lucky enough to get a discount on your Dev Center subscription, the easiest way to offset the cost of a subscription is to purchase it through Nokia. By visiting http://www.developer.nokia.com/Developer_Programs/Lumia_developer_program.xhtml, you can get a subscription to the Widows Phone Dev Center, a license for the Windows Phone Telerik RadControls, 1 million Buddy.com API calls/month, and 2 Nokia Tech support tickets for that same $99.

Windows Phone Dev Center vs. Windows Dev Center

Once you log into your Dev Center Dashboard at https://dev.windowsphone.com/en-us/dashboard, you'll see that the Phone dashboard is slightly different than the Windows dashboard. You can submit an app using the "Submit App" link in the top left, and other links on the page are self-explanitory.

WinRT Support

Windows Phone's WinRT implementation supports many of the same features that the Windows 8 Runtime does, although by rule of thumb the Windows 8 Runtime will usually contain more features than the Windows Phone Runtime. http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207212(v=vs.105).aspx#BKMK_winrtAPIadoptedfromwin_8_client contains a list of APIs that have been migrated from the Windows to the Windows Phone Runtime. Phone-only APIs are available in the Windows.Phone namespace, and you can see a list of them at http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207212(v=vs.105).aspx#BKMK_PhoneonlywinprtAPI.

(full documentation at http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207212(v=vs.105).aspx)


Remove Category:Draft when the page is complete or near complete


The "platform categories" will be displayed here in preview only - Copy paste relevant categories into text here

Version Hint

Windows Phone: [[Category:Windows Phone]]
[[Category:Windows Phone 7.5]]
[[Category:Windows Phone 8]]

Nokia Asha: [[Category:Nokia Asha]]
[[Category:Nokia Asha Platform 1.0]]

Series 40: [[Category:Series 40]]
[[Category:Series 40 1st Edition]] [[Category:Series 40 2nd Edition]]
[[Category:Series 40 3rd Edition (initial release)]] [[Category:Series 40 3rd Edition FP1]] [[Category:Series 40 3rd Edition FP2]]
[[Category:Series 40 5th Edition (initial release)]] [[Category:Series 40 5th Edition FP1]]
[[Category:Series 40 6th Edition (initial release)]] [[Category:Series 40 6th Edition FP1]] [[Category:Series 40 Developer Platform 1.0]] [[Category:Series 40 Developer Platform 1.1]] [[Category:Series 40 Developer Platform 2.0]]

Symbian: [[Category:Symbian]]
[[Category:S60 1st Edition]] [[Category:S60 2nd Edition (initial release)]] [[Category:S60 2nd Edition FP1]] [[Category:S60 2nd Edition FP2]] [[Category:S60 2nd Edition FP3]]
[[Category:S60 3rd Edition (initial release)]] [[Category:S60 3rd Edition FP1]] [[Category:S60 3rd Edition FP2]]
[[Category:S60 5th Edition]]
[[Category:Symbian^3]] [[Category:Symbian Anna]] [[Category:Nokia Belle]]

Add categories below using category selector.

This page was last modified on 18 April 2013, at 05:38.
20 page views in the last 30 days.