WP8 and .NET – A paradise for developers and users alike

Yesterday, the Windows Phone 8 SDK was officially released, bringing the .NET framework to Windows Phone! This brings many new improvements that both developers and users will appreciate.


Faster Launch Speeds
Apps will launch “twice as fast as on Windows Phone 7.1 devices”, which is great for both developers and users! These performance improvements could certainly be due to the newer hardware, but Silverlight has never been known for performance and the new .NET framework should finally bring Windows Phone up to speed.

I’ve used the SDK beta, and the emulator was lightning fast at launching apps. That could of course be due to it running on my i7 desktop… but things certainly feel fast! App launch speeds should hopefully be on par with the competition now.

Apps will also be “compiled in the cloud”, so that they can launch faster than before. Previously, app code would be compiled locally on the device every single time you launched an app! Sound inefficient to anyone?


Instant Resuming from Homescreen
Apps can finally resume when launched from the homescreen, called “fast app resume“. Windows Phone 7 was significantly lagging behind in this department, but now when you click that Facebook tile, it’ll launch into the app instantly if you recently used it!

Developers have a lot of control over this feature, which can be great or can be a curse. By default, this feature is disabled on all apps. Developers have to enable it in order for apps to resume as you would expect. Luckily, it’s a simple 1-line change in the app’s manifest and fast app resuming is enabled.

Developers also can decide which page the fast app resume will launch into. They can have it launch directly into the current page you left, launch back to the main page, or launch to a specific page (like if you clicked a secondary tile). As long as developers use this responsibly and correctly, this will be great!


Async – This one’s for developers
WP8 will finally support async just like Windows 8, which will make porting over your apps much easier. Async works like this: Say your app needs to display a status message saying “downloading”, and then download a file, and then say “done”. With Async, you can simply write (pseudo code):

  • textBlock.Text = “Downloading”;
  • Response response = await webRequest.getResponse();
  • if (response.Error == null) textBlock.Text = “Done!”;

Without async, this would have to be broken up into a series of ugly methods. Async allows the code to “pause” at the line where it says await without actually freezing the app. The download could take 1 second, or it could take 5 seconds. The code has to pause at that location while the download completes, but the app still must stay responsive and not appear frozen. Async makes writing this code so easy!


And more!
Read Microsoft’s MSDN blog about the .NET framework for WP8 to hear about the rest.