Microsoft details its strategy for compiling Windows Phone apps in the cloud

Summary:Microsoft has taken the wraps off its cloud-compilation architecture for Windows Phone. Here's how it works.

One of the new development concepts introduced with Windows Phone 8 is compiling applications in the cloud. But what does this mean, exactly? 

compilinginthecloud

Among the hundred-plus developer sessions that Microsoft execs presented at the company's Build 2012 conference (and which are now viewable for free by anyone, not just conference-goers) was one touching on Microsoft's cloud-compilation strategy.

The Softies first mentioned intentions to provide compilation in the cloud in June 2012 -- when Microsoft first opened up about some of the features coming in Windows Phone 8. Details were scarce, other than the fact that Microsoft, and not individual developers, was expected to be the one doing the compiling of apps once they were submitted for approval. Up until last week, Microsoft officials declined to say anything further about how cloud-compilation would work for Windows Phone.

(One thing we did know is that cloud compilation is/was part of Microsoft's strategy to insure that existing Windows Phone 7.x apps work well on Windows Phone 8.)

There's now more publicly available information. In addition to the aforementioned Build session, a new Microsoft Channel 9 "Going Deep" episode digs even further into cloud compilation, which Microsoft is advertising as enabling "really fast startup of Windows Phone 8 .Net apps."

The way this works behind the scenes isn't via NGEN (Native Image Generator) reimagined. (Ugh. Did I really just use the "R" word?)

NGEN is a tool for improving performance of managed applications byusing native images stored in cache rather than a just-in-time compiler. Instead, according to the Going Deep presentation, Machine Dependent Intermediate Language (MDIL) is at the core of Microsoft's compiler-in-the-cloud solution. Microsoft officials are claiming that the linking step on devices that convert MDIL assembly to a native image takes one-fifth of the time as traditional NGEN on device.

"Thus, we get some of the benefits of both pre-compilation (since we are executing off the native image where all instructions are assembly instructions) and JIT-compilation (no heavy compilation on the device during framework updates)," the Channel 9 session abstract says.

Here's how Microsoft is describing the process to Windows Phone developers:

"When you build your app in Visual Studio, the code is not compiled into a native image, but into a machine-independent Common Intermediate Language (CIL) binary file. (CIL was formerly known as Microsoft Intermediate Language, or MSIL.) This CIL file is what you submit to the Store when you’re ready to sell your app. At that time, the binary file is converted from CIL to optimized Machine Dependent Intermediate Language, or MDIL. Finally, when the user downloads your app to a device, the MDIL file is linked to produce a native image. These steps are repeated in your development environment whenever you deploy your app to a Windows Phone 8 device.

"The functionality of your app is not affected by the conversion to native code. However, the native image typically starts and runs faster."

If you want to know more about MDIL, you might want to check out Microsoft's patent application for the technology. The inventor is listed as Peter Sollich (who appears in the Going Deep talk about cloud compilation). (Thanks to Charon at Ma-Config.com for digging up the patent.)

I'm curious if Microsoft will make use of this cloud-compilation on the back end on the Windows 8/Windows RT side of the house. If I hear more on that, I will add any comments to this post.

Meanwhile, any Windows Phone app developers out there noticed any performance differences or other tidbits as a result of this new cloud-compilation capability?

Topics: Smartphones, Cloud, Microsoft, Patents, Software Development, Windows

About

Mary Jo Foley has covered the tech industry for 30 years for a variety of publications, including ZDNet, eWeek and Baseline. She is the author of Microsoft 2.0: How Microsoft plans to stay relevant in the post-Gates era (John Wiley & Sons, 2008). She also is the cohost of the "Windows Weekly" podcast on the TWiT network. Got a tip? Se... Full Bio

Contact Disclosure

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Related Stories

The best of ZDNet, delivered

You have been successfully signed up. To sign up for more newsletters or to manage your account, visit the Newsletter Subscription Center.
Subscription failed.