News
New Version of .NET Framework, SDK for Windows Phone 8 Released
Upgrades to the development suite include CoreCLR and async programming.
On the heels of its Windows Phone 8 launch Monday, Microsoft has provided significant new tooling to encourage developers to build apps for it. They include a phone-focused version of the .NET Framework, and the long-awaited Windows Phone SDK.
Microsoft Program Manager Pracheeti Nagarkar posted about the upgrades on the .NET Framework blog. The new framework, called ".NET for Windows Phone 8", is essentially a streamlined version of the .NET Framework 4.5 meant to work specifically with Microsoft's new phone. The key component of .NET for Windows Phone 8 is the integration of CoreCLR on top of Windows Phone OS. CoreCLR is the heart of the .NET Framework CLR.
Async Programming Model
The framework has been overhauled for its Windows Phone 8 version, with the biggest upgrade being the inclusion of the async programming model. Async made its debut in C# 5 and Visual Basic 11 in the .NET Framework 4.5. Nagarkar wrote about the impact of async on Windows Phone 8 development:
"We've enabled the task-based async model on Windows Phone 8, with changes to both the CoreCLR and the .NET Framework libraries. This change is particularly relevant since Windows Phone 8 will run on multicore hardware. You can take advantage of these improvements by using the new async and await language keywords or by also using the popular Task Parallel Library. As a result, it is now much easier to provide a highly responsive UI experience for your users by leveraging both the async model and the multiple cores on end-user devices."
The changes make apps faster to start up -- Nagarkar said he's seen Windows Phone 7.1 apps boot twice as fast on Windows Phone 8 -- and reduce battery usage, two crucial factors for end users.
Adding async code will be easier than ever, Nagarkar said, because .NET for Windows Phone 8 includes new task-based async methods across the .NET Framework libraries. "Much of the .NET Framework is now async, and we can expect that some new APIs will be async-only," he explained.
The CoreCLR replaces the .NET Compact Framework. Not to fear, however; Nagarkar said that due to features like auto-tuning garbage collection, developing with the CoreCLR will result in faster, more efficient apps.
Code Generation in the Cloud
Windows Phone 8 also includes a new method of compilation, moving it to the cloud. Windows Phone 8 apps are compiled to ARM code (ARM is the processor that runs on Windows Phone 8 devices) in the Windows Phone Store before being downloaded and deployed to the user. Since code generation happens through Microsoft, the CPU is spared the task, resulting in faster loading of apps and less battery power used.
Microsoft said that existing Windows Phone 7.x apps will run on Windows 8, but encourages developers to try them out on a real Windows Phone 8 device or, at least, an emulator. It also suggests upgrading previous Windows Phone apps to Windows Phone 8, to take advantage of the platform upgrades.
Windows Phone SDK Available -- to Everyone
The Windows Phone 8 SDK, released yesterday, can help with that task. The SDK includes a stand-alone version of Visual Studio Express 2012 for Windows Phone, for developers on earlier versions of Visual Studio; for those with the latest version, it can be installed as an add-in to Visual Studio 2012 Professional, Premium or Ultimate.
The SDK also includes Windows Phone 8 emulators in multiple screen sizes; Expression Blend for Windows Phone, a UI designer that works for both 7.1 and 8 apps; Team Explorer, a Team Foundation Server (TFS) Client for application lifecycle management (ALM) and source control of apps; and XNA Game Studio, for building games for Windows Phone, Xbox 360 and desktop apps.
The release of the Windows Phone SDK has stirred some controversy among developers. Access to the preview SDK in September had limited availability, being restricted to developers who already had published Windows Phone apps. Many developers were upset at the restrictions, noting that not even having an MSDN account was sufficient to get the SDK. They complained that they wanted the SDK in advance to have apps ready for Windows Phone 8's launch.
Whether that will affect the number of apps available in the Windows Phone Store in the coming weeks and months is difficult to say, but at least the wait is over for present, and potential, Windows Phone 8 developers.
About the Author
Keith Ward is the editor in chief of Virtualization & Cloud Review. Follow him on Twitter @VirtReviewKeith.