Top 6 Common Language Runtime Features in Windows Phone 8

Introduction

Windows Phone 8 introduces some very hot features from Common Language Runtime that provide tremendous benefits to Windows Phone application developers.

Here is the list of top 6 Common Language Runtime features that were introduced in Windows Phone 8.

1. Faster Code Generation

Windows Phone 8 has enabled optimization for code generation by the Just-In-Time compiler. This allows for improving the application performance. By having application files precompiled to native in the cloud, Windows Phone store guarantees best performance of a Windows Phone 8 application.

2. Threading

The .NET framework engine behind Windows Phone 8 is multi-core aware and supports the ThreadPool class. This support allows applications to create threads.

Additionally, the task parallel library offers Windows Phone 8 application all thread synchronization primitives to leverage multiple cores.

Note that Thread.Sleep in Windows Phone 8 does not perform standard COM and SendMessage pumping. Calling Thread.Sleep in Windows Phone 8 will make the application unresponsive, blocking DispatcherTime and BackgroundWorker events.

The performance of async and parallel operations that use classes, which reside in System.Threading.Tasks namespace has been improved in Windows Phone 8.

3. Security Model

The security model in Windows Phone 8 has changed compared to Windows Phone 7.1. There is no managed sandbox (which has been removed in Windows Phone 8), resulting in security exceptions like MethodAccessException not to be thrown in typical cases.

4. Garbage Collection

GC (Garbage Collection) in Windows Phone matches Silverlight. (There are three generations in Windows Phone 8, unlike Windows Phone 7.1, which had only 2 generations).

The resource manager for the phone automatically invokes Garbage Collection when memory is short, and it can additionally terminate the application if it exceeds the memory cap.

The garbage collector in Windows Phone 8 includes a large object heap (LOH), however, background garbage collection is no longer offered in WP8.

5. Portable Class Libraries

With Portable class libraries, application developers can write class libraries that they can share across modern applications on Windows 8 as well as mobile applications on Windows Phone 8. This is supported by the Portable Class Library project template in Visual Studio 2012.

A Portable Class Library that is targeted for Windows Phone  7.1 and Windows Phone 8 can be run on Windows Phone 8 without any issues.

6. Interop

Windows Phone 8 applications can directly invoke Windows Runtime APIs from managed code, reducing memory and other interop issues.

Summary

In this article, we learned about new common language runtime features that we released as part of Windows Phone 8. I hope you have found this information useful.

About the Author

Vipul Patel is a Program Manager currently working at Amazon Corporation. He has formerly worked at Microsoft in the Lync team and in the .NET team (in the Base Class libraries and the Debugging and Profiling team). He can be reached at vipul.patel@hotmail.com



Related Articles

Comments

  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: March 19, 2015 @ 1:00 p.m. ET / 10:00 a.m. PT The 2015 Enterprise Mobile Application Survey asked 250 mobility professionals what their biggest mobile challenges are, how many employees they are equipping with mobile apps, and their methods for driving value with mobility. Join Dan Woods, Editor and CTO of CITO Research, and Alan Murray, SVP of Products at Apperian, as they break down the results of this survey and discuss how enterprises are using mobile application management and private …

  • On-demand Event Event Date: February 12, 2015 The evolution of systems engineering with the SysML modeling language has resulted in improved requirements specification, better architectural definition, and better hand-off to downstream engineering. Agile methods have proven successful in the software domain, but how can these methods be applied to systems engineering? Check out this webcast and join Bruce Powel Douglass, author of Real-Time Agility, as he discusses how agile methods have had a tremendous …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date