[01:19:38] Back in June I talked about how Windows Phone 8 was a foundational release, because we now share a common core with Windows. On top of this common core we have a common API set. You can now build shared components that are identical to both Windows and Windows Phone and use them inside of those apps. [01:20:00]

Following that: first a picture-sharing app is shown … already paired the phone and tablet using NFC … then it is shown how a photo image-editing app written 10 years ago in C++ can be wrapped as a Windows runtime component, so it could be called from C# in Windows Phone app … next how simple is to reuse the exact same code throughout the project inside of Windows 8 …

[01:24:17] talk about some of the new features coming to the Windows Phone 8 platform. …

See all these other features that we’ve been adding to the platform over the last release. I want to highlight a lot of them there. I want to highlight a few. You asked us to make it easier to build fast and fluid UI. We delivered. We’re writing more controls to the platform and we’ve dramatically improved the performance of the existing controls. Your apps will be noticeably faster when you use them. You asked us to do more with Live Tiles. We delivered. We now support Live Tiles in three sizes. We also allow you to show notifications on the launch screen, and you can create and update the wallpaper of the phone directly from within your application.

You asked for speech support. We now support having full conversations in your app. So, not only can you launch apps, you can control them using speech. We’ve improved you’ve asked for us to improve our dev center and store. We’ve streamlined our store. It’s now more efficient to submit and update your apps, and you have more ways to monetize your apps in our store. You asked for deeper integration with the phone experiences. We delivered. We’ve opened up our camera and now we support a feature called Lenses. We’re actually better multitasking. We support location-based applications running in the background, as well as first-class support for VoIP and video chat.

You asked for us to improve and to give you advanced networking capabilities. We’ve heard your request. For Bluetooth data transfer, peer networking with Bluetooth and Wi-Fi, as well as proximity connect with NFC. Our response is done, done and done. In total we’ve delivered on over 90 percent of the top developer requests. And over the next few days you will be able to have over 20 sessions to go into detail about how to use these in your apps. [01:26:40]

Then an AR Drone Quadcopter app is shown which comes with a native code library that allows communication with it and a front end built out in XAML. What follows that is a talk about native games, supporting C++ code, which allows to write high-performance physics engines, as well as audio libraries, and get access to low-level, hardware-accelerated APIs like Direct3D, with fully programmable shader support, both pixel and vertex shaders. … Then Unity is showing the first-ever demo of the Unity gaming engine running on a Windows Phone. …

After that Richard Kerris from Nokia is coming to the stage first making publicity for the Lumia 920 and finishing with the annoumcement that every attendee will get a Lumia 920. Finally Kevin Gallo is closing with the announcement that Microsoft will reduce the individual registration for their dev center from the normal $99 to $8 for the next eight days

As Kevin Gallo told on the keynote there were detailed sessions about the Windows Phone 8 development platform. Those sessions are the following ones:When you click on the above image or HERE you will get an expanded PDF version of that which contains the abstracts to the sessions as well links to the Channel 9 video records and the associated PowerPoint slidesets. There is also another PDF document which contains related information excerpts from MSDN and elsewhere for those sessions.

2. Native C++ and DirectX brought to the platform

Windows Phone 8 applications belong to one of two categories. Managed apps are based on managed code, but you can also invoke native code from this application type. The other application type is referred to as a “Direct3D app”. You cannot invoke managed code from within a Direct3D app. In Windows Phone 8, many of the phone features are exposed via Windows Phone Runtime APIs, which are accessible from both native and managed code. Many application scenarios can be achieved with either a managed app or a Direct3D app. But even though you can achieve similar results, there are some big differences in the structure, implementation, and available APIs for each application type. It’s important that you understand these differences and choose the right model for you app before you start coding.

…

Direct3D – Direct3D apps are intended for apps for which the highest-possible performance is required, such as complex 3D games. There are no built-in controls or other user interface primitives. Pure native applications are easier to port to Windows 8 native applications as well as other platforms that support native code.

When moving a C++ application to Windows 8/Windows Phone 8 the first consideration is the user interface. Few, if any, applications have a user interface that is appropriate for the touch-centric UI that Windows 8 showcases. There are four options for the UI layer:

DirectX with C++

XAML with C++

XAML with .NET

HTML5 over Windows RT

Since the UI needs to be rewritten rather than ported, coverage of these technologies it outside the scope of this report.

…

Tarek Madkour of Microsoft [Bringing existing C++ code to Windows Store apps, BUILD, Oct 30, 2012] recommends that developers porting existing libraries to use the Windows Application Certification Kit instead of the macro. To do this, create a new XAML based application and reference all of the libraries you want to port. You then need to run it once so that it is deployed on the computer. Next you run the Certification Kit against the application to generate a list of API calls that need to be replaced or removed.

Today at Build Jim Radigan and Don McCrady gave a presentation [It’s all about performance: Using Visual C++ 2012 to make the best use of your hardware, Build, Oct 31, 2012] that discussed how the improved Visual Studio 2012 (VS2012) compiler can benefit developers programming in C++. Radigan began his talk, “Its all about performance: Using Visual C++ 2012 to Maximize Your Hardware”, by giving a brief historical overview of the increases in computer power since the introduction of the original Pentium.

That first Pentium had 3.1 million transistors while the current generation Ivy Bridge CPUs have 1.4 billion transistors. As McCrady would later note, C++ AMP allows developers to utilize everything with one single langauge– both the CPU, and the GPU that is increasingly present on CPU dies (in addition to the GPUs present in discrete expansion cards.)

While using code targeting C++ AMP can frequently provide the best performance versus generic code, Radigan continued by noting that the auto-vectorization and auto-parallelization optimizations present in VS2012 mean that in many cases recompiling existing C++ code can provide immediate benefits. As a result the optimizer present in VS2012 is double the size of previous versions.

The developer SDK for Windows Phone 8 (codename Apollo) is now available for download from an internet near you. Which means I can finally talk about what I’ve been working on this past year! I am dev lead for graphics, so I’ll probably have most to say about that area, but knowing me I’m sure I’ll find other topics to write about too.

This first post is basically just a bullet list summarizing the graphics capabilities of the platform:

Write games in high performance native C++

Or you can interop between XAML and C++/D3D, similar to the Silverlight/XNA interop feature in Mango

Graphics APIs are a subset of Windows 8, so it’s easy to move code back and forth between phones, tablets, and desktop PCs

No legacy features such as GDI, D3DX, or fixed function – parts of these can be replaced with DirectXTK

…

So what notable D3D11 features are NOT included in feature level 9.3?

No geometry shaders

No hull/domain shaders

No DirectCompute

No resource arrays

No BC4–BC7 compression

No vertex texture fetch

…

Anything else important you should know?

Windows Phone 8 uses a tiled GPU architecture, so for best performance you’ll need to understand how to use the D3D11_MAP_WRITE and D3D11_COPY flags to specify DISCARD and NOOVERWRITE behaviors, and when to call ID3D11DeviceContext1::DiscardView (ooh, good topic for future articles)

Windows Phone 8 device manufacturers can choose one of three screen resolutions:

480×800

720×1280

768×1280

Windows Phone 8 includes the same hardware scaler feature as WP7. Use this to draw at the same resolution on all devices (simplifying development) or to draw fewer pixels for better performance. Use the new DXGI_SCALING_ASPECT_RATIO_STRETCHED mode.

Starting with Windows Phone 8, Windows Phone apps can be created using native code and Direct3D. This means that a lot of code and programming techniques are the same when creating games for Windows 8 and Windows Phone 8. However, due to the smaller form factor, the different input mechanisms, and the set of available APIs, there are some significant differences that you need to consider when creating a game for the phone platform. This topic highlights the major areas where the phone platform is different.

One significant feature of the Windows Phone 8 development platform is support for the native C++ programming model. Native code offers a number of benefits related to code reuse, and it opens up opportunities for game engines, physics, animation, audio libraries, and more. The following organizations are announcing Windows Phone 8 support:

Unity Technology demonstrated today on stage at //Build for the first time, the Unity tools and engine that they used to create a game for Windows Phone 8. Read the Unity announcement and if you’re at //Build visit Unity Technology on the expo floor.

3. Partial WinRT support with phone extensions but no WinJS support

Windows Phone Runtime is a subset of native API that is built into the operating system. It is implemented in C++ and projected into C#, VB.NET, and C++, making it easy for you to consume naturally in the language of your choice. Developers that are familiar with the Windows Runtime will find the Windows Phone Runtime easy to learn. The frameworks are very similar. The following diagram shows the relationship between Windows Phone Runtime and Windows Runtime in terms of the API surface area it implements.

The diagram has three distinct areas and these are described as follows:

The set of Windows Runtime API not supported on Windows Phone 8. The API surface area of Windows Runtime is very large, with over 11,000 members. We’ve adopted a subset for Windows Phone 8 that allows you to build compelling phone scenarios. Area 1 in the diagram above represents the APIs that are not available on Windows Phone 8.

The set of Windows Runtime API adopted for Windows Phone 8. This is represented by area 2 in the above diagram and consists of approximately 2,800 members. For some types, we have not implemented certain members. For others we have added additional members to support phone-only features. In both cases, these differences are noted in the API reference documentation.

We’ve added key APIs needed to build great apps for the phone. These are represented by area 3 in the diagram and total about 600 members. For example, we have brand-new APIs for speech synthesis and recognition, VOIP, and other features. Creating these as Windows Runtime style APIs means you can use them regardless of the programming language you use for your app.

The Windows Phone Runtime API consists of areas 2 and 3 in the above diagram. For more information, see Windows Phone Runtime API.

…Supported languages

The following table shows what programming languages are supported in Windows Phone compared to Windows 8. Whether your development background is with native or managed code, you can build great apps for Windows Phone using your language of choice. JavaScript is not supported on Windows Phone 8.

4. Managed (.NET) code with XAML and a number of enhancements

Core information

Managed – The UI framework for managed apps, including controls and page navigation, means application development is quicker and easier. Access to the Windows Phone Runtime library, the DrawingSurface control, which allows you to render graphics into a XAML page using Direct3D, and the ability to invoke native assemblies from managed code means that managed apps have comparable functionality and performance to native-only apps. There are several useful features, like Live Tiles, the Background Transfer Service, and several of the built-in Launchers and Choosers that can only be used in managed apps applications. Managed apps apps will also allow you to reuse most code from Windows Phone OS 7.1 applications.

This topic describes the structure of a XAML and Direct3D app, and walks through the project template that’s included in Windows Phone SDK 8.0. This type of app uses the DrawingSurface control which allows you to use Direct3D to render graphics that are displayed behind or inline with XAML controls and content. The size and layout of your DrawingSurface are handled just as they are with other XAML controls.

We’ve made many changes to the .NET Framework libraries and runtime in Windows Phone 8, including the introduction of the new async model. We also made substantial changes to the .NET Framework engine and to our ARM compiler. As a result, we’ve observed major performance improvements both in the lab and with actual Windows Phone Store apps. On average hardware, we have seen apps start up twice as fast as on Windows Phone 7.1 devices. End-users will notice and really appreciate the speed of your apps. We hope your apps see similar gains.

Async

The most important recent advance in the .NET Framework is the new async programming model, introduced by C# 5, Visual Basic 11 in .NET 4.5. 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.

…

CoreCLR engine and garbage collector

Windows Phone 8 includes the CoreCLR engine instead of the .NET Compact Framework. The CoreCLR includes many of the same features and optimizations as the CLR in the .NET Framework 4.5. As a result, it is a lot faster and more efficient than the .NET Compact Framework. In particular, the CoreCLR includes our world-class auto-tuning garbage collector. These changes result in reduced startup time and higher responsiveness in your apps.

Much faster code with “Compiler in the Cloud”

For Windows Phone 8, we adopted a new code generation approach that is much better suited to the phone, both to deliver higher performance and to save battery life. Windows Phone 8 apps are compiled to high-quality ARM code before they are downloaded and deployed on end-user devices. They are compiled in the Windows Phone Store, with an optimizing compiler that does not have to satisfy the time and power constraints of a just-in-time (JIT) compiler. As a result, end-users will enjoy very fast app launch times on Windows Phone 8.

These changes are specific to Windows Phone 8, but they also improve launch times for Windows Phone 7.x apps. Both Windows Phone 7.xand 8 apps can be pre-compiled to high quality ARM code in the Windows Phone Store, before being downloaded and installed on Windows Phone 8 devices. You and your customers get the benefits of pre-compilation, without requiring you to make changes to your app. You can test out the pre-compiled binaries on your own Windows Phone 8 devices using Visual Studio 2012.

While these changes provide significant performance improvements for end-users, they also help battery life. In Windows Phone 7.x, app code was compiled every time the app was launched, and the CPU was used to compile that code, requiring battery power. With the new code generation approach in Windows Phone 8, apps are compiled in the Windows Phone Store with AC power generated from the Columbia River in Washington. That’s a better battery to use than yours! As you can see, we’ve removed an entire category of battery use on end-user devices.

Windows Phone 7.1 apps run on Windows Phone 8

Windows Phone 8 is designed to run existing Windows Phone apps unchanged. We’ve put in significant effort into maintaining application compatibility to ensure that your Windows Phone 7.1 app continues to run on the new Windows Phone 8 devices. It is recommended that you test your 7.1 app using the Windows Phone 8 device or emulator to ensure that you are getting a compatible experience.

In advance of new Windows Phone 8 devices coming to market, you may want to consider upgrading your existing Windows Phone 7.1 app to Windows Phone 8 to leverage new updates to the platform. The Windows Phone SDK 8.0 makes it easy to upgrade projects in Visual Studio 2012. Keep in mind that when you upgrade your existing Windows Phone 7.xapp to Windows Phone 8, you may see changes in API behavior (serialization and isolated storage are the major categories in .NET to watch for) when the upgraded app is run on the Windows Phone 8 device or emulator. You can read more about compatibility on the Windows Phone app platform compatibility MSDN page.

Writing Windows Phone 8 apps

Windows Phone 8 provides major new improvements for developers. I have already talked about the adoption of C# 5 and Visual Basic 11, particularly around async, which you can use in Windows Phone 8 apps. Another major improvement is Windows Runtime interop. You can call Windows Runtime APIs in your code to get access to new native OS APIs and third-party native APIs.

I expect that many of you are building both Windows Phone 8 apps and Windows Store apps. In many cases, you will be building versions of those apps that differ only slightly between the Windows Phone and the various Windows 8 form factors. You should find that you can share a significant degree of your app logic between these platforms.

Windows Phone Runtime interop

Windows Phone 8 exposes a new type of native API through the Windows Phone Runtime [WinPRT], much like the Windows Runtime [WinRT] in Windows 8, if you are familiar with that new API technology. Many new APIs exposed in Windows Phone 8, like the Windows Phone Runtime Location API, are exposed by the Windows Phone Runtime. The CoreCLR engine has been updated to enable you to call Windows Phone Runtime APIs in your apps. In addition, native code developers can expose Windows Phone Runtime APIs, making their native code functionality available to .NET Framework developers. You will notice that you can call Windows Phone Runtime APIs just as naturally as you would call any managed APIs.

The Windows Phone Runtime enables you to call native APIs in both the Windows Phone SDK and as exposed by third parties. In Windows Phone 8, you cannot expose .NET Framework code via the Windows Phone Runtime.

…

Additionally, you can call native code from within a managed app, as long as the native code is packaged and exposed to callers as a Windows Runtime type. We expect that several third-party native gaming engines will be leveraged this way. Note that we do not enable you to create Windows Runtime APIs using C# or Visual Basic in this release of Windows Phone.

By now you’ve learned that the CLR, Windows Phone Client, and Windows Phone Services teams got together to develop “Compiler in the Cloud”. All Windows Phone 8 apps written in .NET technologies will get the benefit of this collaboration. The end goal? Really fast startup of Windows Phone 8 .NET apps.

“Compiler in the Cloud?”, you ask.

The idea is pretty simple. First, enter MDIL or Machine Dependent Intermediate Language or .NET hybrid assembly language. MDIL is all about compiling to native assembly instructions whenever possible, and compile the rest to pseudo instructions that can quickly be translated to native instructions on the phone. Thus, this assembly containing a mix of pseudo instructions and native instructions can be shipped to the device (and is portable across the same architecture – example, across all the ARM devices), and on the device we perform a light-weight linking step to convert the entire assembly to a native image. Most of the heavy lifting is done when we compile the IL assembly to the intermediate file between an IL assembly and a native image (this is what MDIL is).

“So what?”, you ask. The linking step on the device that converts MDIL assembly to a native image only takes 1/5th 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).

Tune in to meet the program manager for code generation in .NET, Subramanian (Mani) Ramaswamy, and one of the lead developers of “Compiler in the Cloud”, Peter Sollich. Peter is an expert in precompilation. We go quite deep here with plenty of whiteboarding. Peter teaches us exactly what MDIL is and why it’s designed the way it is. We also talk about the higher level meaning in this (apps start fast, at native speed!). All around, it’s a great Going Deep episode. Take the time to watch and learn. Thanks Mani and Peter!!

See Subramanian’s BUILD 2012 session [Deep Dive into the Kernel of .NET on Windows Phone 8] where he goes into detail on MDIL/Compiler in the Cloud and other performance/functionality improvement in .NET for Windows Phone 8.

With the introduction of WinRT and the dimming of Silverlight, some NET developers are concerned that the platform’s popularity, and therefore support, at Microsoft may be on the decline. The platform’s flagship language is C#, but C# creator Anders Hejlsberg’s latest publicly released project is TypeScript. This turn of events brought a large audience to the presentation “The Evolution of .NET” by Brandon Bray to see what was in store for .NET.

Bray is the Group Program Manager of .NET and began his talk with an overview of the history of the platform: starting with its initial announcement at the 2000 Professional Developers Conference, and concluding with where it is today: marking the year of its 10 year annniversary as the .NET Framework 1.0 shipped in February 2002.

There are three enduring themes of the platform that Bray identified:

Broadening support for platforms and industry trends

Time to solution getting better

Performance improvements: by improving the runtime and libraries

As Bray worked through NET’s history, he did observe that Silverlight has “done a lot of great things for .NET” and said that the lessons learned from Silverlight have been applied to Windows Phone and Windows 8.

Since .NET Framework 4.5 was released 3 months ago, it has recorded over 4 million downloads demonstrating its continued popularity. At this point in time, Bray observed that users want the following main features:

Business compatible applications: Reflecting the consumerization of IT, the ability to bring your own device (phone/tablet/laptop) to work and in use it the corporate world is a growing trend.

Fast & Fluid experience: This is not just a requirement that applies to the user interface’s performance, it also includes the necessity that users can easily figure out how to use their apps without requiring outside help.

Modern connected apps: Getting data to and from their device to the web/cloud, desktop, etc.

From a developer’s perspective, Bray says that they want they ability to target multiple platforms: Windows Phone, web & cloud, and Windows 8. The needs of users and developers define what the .NET Framework is trying to serve.

Performance Improvements

So what are some of these available improvements? Bray highlighted .NET 4.5’s background garbage collection, multi-core JIT (just-in-time) compiler, and a reduced on-disk footprint. The adoption of this new background garbage collector by the Bing team saw them drop from an average 8% pause under the old GC to a 2% average pause with the new. Multi-core JIT is automatically used by ASP.NET, and developers can add it to their application by examining the ProfileOptimization class.

Developers seeing difficulties with DLL Hell as a result of thier upgrade to .NET 4.5 are encouraged by Bray to contact Microsoft as they are aware that there are problems and are actively working to resolve these issues.

.NET on Windows Phone 8: The Advantages of Compile in the Cloud

Moving to Windows Phone 8, Bray noted the following improvements that have been made:

CoreCLR is now the foundation for NET on WP8

Key NET4.5 capabilities are now on WP8

Compile in the Cloud means your apps will launch faster

Using compile in the cloud the average phone app can expect to see a 2x gain in performance on WP8 launch hardware. Previously assemblies were deployed in a situation that in effect treated the phone as a compiler– which isn’t optimal for either performance or battery life. But with compile in the cloud, MDIL (machine dependent instruction language) is used to outsource the compilation. The MDIL compiler produces MDIL assembly which is then deployed to the phone.

The Future

Bray was reserved when discussing the platform’s future, as he clearly did not want to make any public announcements of new features. However he did reiterate that Microsoft cares about .NET and noted that it is an integral part of all MS platforms that are shipped. Bray went on record that “We (Microsoft) want .NET to be successful.”

Looking ahead, Bray observed that assumptions change and as a result so should the .NET platform. The new areas for future focus:

Improving the device experience (Windows Phone, tablets, etc)

First class cloud experience

Heterogeneous development

Targeting multiple platforms at once

Again, while no specifics were announced, some interesting clues were left. As it was claimed lessons were learned from Silverlight, so it seems that Microsoft’s Singularity project has also found its way into different projects. Looking at MDIL for WP8, Channel 9 user “Felix9” noted in August 2012 that MDIL had previously appeared with Singularity’s Bartok compiler.

XAML related information

Blend for Visual Studio 2012 makes it easy to design great apps for Windows Phone 8 using the Windows Phone 8 SDK. Blend for Visual Studio 2012 is included with many versions of Visual Studio 2012, including the free VS 2012 Express for Windows Phone 8, VS 2012 Express for Windows 8, and VS 2012 Pro, Premium, and Ultimate. Read more on our team blog at http://blendinsider.com.

The Blend team is excited to announce our latest release of Blend and Visual Studio XAML design tools that support Windows Phone 8 development. In this release, our big focus was on unifying the XAML design support across Blend and Visual Studio, similar to the design experience available for other XAML platforms like Windows Store Apps, WPF, and Silverlight.

Blend is included with Visual Studio 2012. This makes it easy for you to create great Windows Phone 8 applications. The free Visual Studio 2012 Express for Windows Phone 8 comes with Blend as well. For all you Visual Studio 2012 Pro, Premium, and Ultimate customers out there, installing the Windows Phone 8 SDK automatically enables Windows Phone 8 development in your installed version of Blend and Visual Studio.

A lot of the Blend features you have come to love in the previous edition of Windows Phone tools are now available in Visual Studio as well, including the Device Panel, better support for editing controls like the AppBar, and template editing.

In addition to these, we have added support for designing for multiple resolutions in the Device Panel.

All the features of Blend available in the previous edition of the Windows Phone tools are carried over to the Windows Phone 8 tools as well, including Behaviors, visual state editing, and sample data. If you have the Windows Phone 8 SDK installed, you also get full design support for building Windows Phone 7.5 (Mango) apps in Blend and Visual Studio.

Visual Studio Express 2012 for Windows Phone is a complete development environment for creating Windows Phone apps. Visual Studio Express 2012 for Windows Phone includes development features such as Windows Phone project templates, a code editor, a Windows Phone-based visual designer, and a Toolbox that contains Windows Phone controls. It also includes integrated testing features such as simulation, monitoring and profiling, and the Windows Phone Store Test Kit. With Visual Studio Express 2012 for Windows Phone, you can debug and deploy your apps on Windows Phone Emulator or a Windows Phone device.

…

Supported features

With the exception of a few debugging features, the Windows Phone Add-in for Visual Studio 2012 has equivalent functionality to Visual Studio Express 2012 for Windows Phone. For detailed information about the supported debugging features, see Debugging apps for Windows Phone.

The projects that you create with either Visual Studio Express 2012 for Windows Phone or the Windows Phone Add-in for Visual Studio 2012 are compatible with Blend for Visual Studio. You can open these projects in Blend without any conversion issues or loss of functionality.

Unsupported features

Some features in Visual Studio 2012 Professional or higher are not supported when you are using the Windows Phone Add-in for Visual Studio 2012. These unsupported features include the following:

Windows Runtime (WinRT) XAML for new Windows Store apps is the latest member of the XAML and C#/Visual Basic family many of us have come to love. It all officially started in 2006 with the Microsoft .NET Framework 3.0 and “Avalon” (later named Windows Presentation Foundation, or WPF). After that came several more revisions of WPF, including the latest, WPF 4.5, and alongside we’ve had seven named versions of Silverlight (including 1.1 and 5.1), several versions of Windows Phone and more. You’ll even find part of the XAML stack available on .NET Micro Framework devices.

You might wonder why there are so many variations on XAML and the .NET Framework. Although many of the implementations have converged on similar uses (Silverlight to write desktop apps, for example), each platform was developed and optimized for different scenarios and target platforms. For example, Silverlight was designed to be cross-platform and Web-hosted. XAML on Windows Phone was designed for phone-specific scenarios and hardware, and WinRT XAML on Windows 8 was designed for high-performance, on the metal (x86/x64 and ARM), touch-first (but not touch-only) Windows Store apps.

Nevertheless, these implementations of XAML have far more in common than not. It’s because of these similarities that the differences seem so pronounced. Of course, tiny differences can cause a lot of development challenges, something I know from personal experience and from talking with other developers. However, the fact that we can even talk about compatibility at a detail level illustrates the similarity between the languages, libraries and markup.

In this article, I’m targeting two important scenarios: sharing code with a companion app and future-proofing your current development.

Companion App This is a simultaneous code-sharing, or cross-compilation, scenario for WPF and Silverlight application developers who want to develop companion Windows Store apps for Windows 8 at the same time.

Future Proofing In this scenario, developers are creating new WPF and Silverlight applications today but are not currently targeting Windows 8. When the organization adopts Windows 8, the developers want to be ready; they want to help ensure that appropriate portions of their apps will be more easily ported to the new Windows UI.

Decades of programming experience have taught us that reuse and portability are never free. However, with the techniques covered here, you’ll find much of the effort a minimal increment over what you would normally do to create well-architected apps.

Thoughtful Architecture Is Essential

Breaking large applications into smaller apps is possible only if you have good architecture to begin with. In fact, if your application has a lot of interdependencies between code modules, a lot of heavy class hierarchies, or otherwise feels like a ball of mud or throwaway code, reusing or porting anything will be extremely difficult. But don’t despair! Code can be refactored, and new code can be written with the new architecture in mind.

When designing new apps, I encourage XAML developers to follow a few key approaches: binding, the Model-View-ViewModel (MVVM) pattern and service classes.

Binding The more you embrace data binding when developing in XAML, the easier it is to keep your logic separated from the UI. Ideally, you set the DataContext for the UI, and everything else is handled by binding with data or commands. In practice, few apps are able to attain this level of separation, but the closer you get, the easier your life will be.

The MVVM Pattern The MVVM pattern goes hand-in-hand with data binding. The ViewModel is what the UI will bind to. There’s a ton of great information (and toolkits, which I’ll cover later) available for free on the Internet and in books, so I won’t rehash that here.

Service Classes This approach is not to be confused with Web services. Instead, these are classes that provide reusable functionality on the client. In some cases, they might call out to RESTful or other services. In other cases, they might interface with your business logic. In all cases, they encapsulate potentially volatile code and make swapping out implementations easier. For example, in Figure 1, the ViewModel talks to service classes in order to use both platform services and to resolve external dependencies.

Figure 1 Relationship Between the ViewModel and Service Classes

I know. You’re thinking, “Ugh! Another layer diagram.” But you know how important these concepts are. The intent is to decouple yourself from the platform you’re on as much as is reasonable within your budget and time constraints. By factoring out code that, for example, makes COM or p-invoke calls into desktop elements such as Windows Imaging or DirectShow, you can more easily replace that implementation with the WinRT camera API in your Windows Store app. Service classes are also a great place to encapsulate other platform differences, such as contract implementations: sending an e-mail from your Windows Store app would use a contract, but on the desktop it would likely mean automating Outlook or hooking into an SMTP server.

Of course, it’s easy to go overboard with architecture and never actually deliver. Good architecture should make development easier, not harder. If you find your team struggling with the minutiae of a particular architectural pattern, you’re probably wasting time. Instead, understand the patterns and what they bring, and then make intelligent and informed decisions about the trade-offs. In most cases, implementing 85 percent of a great architecture is better than 0 percent of the same. Similarly, the cost involved in getting that last 15 percent implemented is often not worth it.

Once you separate out platform-dependent code, quite a bit of other nontrivial code can be reused.

…

Wrapping Up

WinRT XAML, Silverlight and WPF have been created with different purposes in mind, but they’re more similar than different. Sharing code between them is easy, and sharing XAML is possible. There are lots of additional techniques you can follow to target all three platforms and move from the desktop to the new Windows Store UI. I’d love to continue this conversation on Twitter and on my blog at 10rem.net. If you’ve used other techniques for multi-targeting or porting code to the Windows Runtime, I’d love to hear from you.

Pete Brownis the Windows 8 XAML and gadget guy at Microsoft. He’s also the author of “Silverlight 5 in Action” (Manning Publications, 2012) and “Windows 8 XAML in Action” (Manning Publications, 2012). His blog and Web site are 10rem.net, and you can follow him on Twitter at twitter.com/pete_brown.

Thanks to the following technical expert for reviewing this article: Tim Heuer

Windows 8 Metro style XAML apps represent the newest member of the .NET/XAML family that includes WPF, Silverlight, Windows Phone, and more. In this episode, we join Pete Brown, XAML guy at Microsoft, for a brief introduction to Metro style apps with a particular focus on what may be new or different for people coming from Silverlight and WPF.

Code sharing between Windows platforms

In this section, we will help you make the right choices to maximize code reuse in your apps. As a developer, you want to streamline your development and make maintaining your apps as efficient as possible. By working smarter, you give yourself more time to develop more apps and fill the marketplace with your creations. When building an app for Windows Phone 8 and Windows 8, you should look for opportunities to share code, designs, and assets as much as possible so that you maximize the return on your investment. This section describes the sharing techniques that you can use when building you app for both platforms.

Sharing techniques to maximize code reuse

The following table shows some of the techniques you can use to share code between your Windows Phone 8 and Windows 8 apps. Each is described in detail in the topics to which they are linked. The table calls out whether a technique applies to managed code, C# or VB, or native (C++) code. You can choose any of these techniques, or a combination of them.

Sharing technique

When to use

Separate UI and app logic using the Model-View-ViewModel pattern

This guidance is applicable to many app types, but particularly to apps that have a XAML UI. Separation allows you to write the app logic and to concentrate on user experience design separately. An added benefit is that your app logic is more likely to be common for your app on both platforms, and therefore is a great candidate for code sharing using the rest of the techniques described here. Model-View-ViewModel (MVVM) is a great way to achieve this separation.

Share functionality using Portable Class Libraries

Windows Phone 8 and Windows 8 share the same .NET Framework engine. In a XAML app, most of your app logic will be written in managed code. If you are using the MVVM design pattern, you have the potential to share your viewmodel and potentially your model. Note that Portable Class Libraries are a .NET Framework concept and don’t support C++.

Share code with Add as Link

Use this technique for code that is non-portable and therefore can’t be implemented in a Portable Class Library. For example, Windows Phone 8 and Windows 8 can use the common Windows Runtime API surface to harness the power of each platform for networking, proximity, in-app purchase, and many other features. Portable Class Libraries don’t support Windows Runtime API. Instead, you can abstract this non-portable code, which is common to both platforms, into a class that can be shared using Add as Link in Visual Studio. In C++ projects files are added to projects as linked files by default.

Share using Windows Runtime Components

In addition to consuming the common Windows Runtime API available on both platforms, you can write your own Windows Runtime Component to make your functionality available in all supported languages. This can be written in C++ and consumed by C# or VB. This is a very useful technique for language interoperability or for when you want to write compute-intensive code in C++ and use it in all languages.

Sharing XAML UI

The UI in Windows Phone 8 and Windows 8 is written in XAML. However, the XAML implementations are not portable between the platforms. But you can isolate some of your custom basic UI building blocks into UserControls and share those classes as linked files that will be compiled for each platform. This technique is limited and should be used only for simple, reusable parts of your UI. The core of your UI should be built and tailored separately for each platform.

Conditional compilation with preprocessor directives

If you have functionality that’s implemented differently for Windows Phone 8 and Windows 8, you can use conditional compilation to compile the code suitably for each platform. You can’t use conditional compilation in a Portable Class Library. How much you adopt this technique will depend on your app complexity, but it can lead to more difficult code maintenance if used extensively.

The release of Windows Phone 8 is a significant step toward convergence with Windows 8. Here, we compare the Windows Phone 8 and Windows 8 development platforms, and discuss how developers can create apps for both platforms and maximize code reuse.

Windows Phone 8 now includes support for building C++ games using our new Windows 8 aligned Direct3D app model. The set of native APIs that are common to Windows Phone 8 and Windows 8 are listed in the following table.

Common native API

DirectX 11.1

XAudio2

MediaEngine

STL

CRT

WinSock

For more info about native API support for Windows Phone 8, see the following:

Windows Runtime is a technology first introduced in Windows 8 and which offers a core infrastructure, a common type system, and a standard programming model. It’s implemented in C++ and projected into C#, VB, C++, and JavaScript, so it’s easy to consume naturally in the language of your choice. A significant subset of Windows Runtime is built natively into Windows Phone 8, with the functionality exposed to all supported languages. This gives you the ability to use the same API for common tasks such as networking, working with sensors, processing location data, and implementing in-app purchase. By using common Windows Runtime API in your app, you increase the potential to share code between your Windows Phone 8 and Windows Store apps to save time and improve the maintainability of your apps over time. The following table lists the Windows Runtime APIs that are common to both platforms.

Common Windows Runtime API

Networking

Sensors

Proximity

Storage

DataSaver/Connection Manager

Location

Touch

Online Identity

Keyboard

Launchers & Choosers

In-App Purchase

Sensors

Threading

Base Types/ Windows.Foundation

We’ve also added Windows Runtime APIs for the phone to enable more phone scenarios, including APIs for speech synthesis and recognition, and VoIP. The combination of Windows Runtime APIs adopted from Windows 8 and the additional Windows Runtime APIs we’ve added on the phone is called Windows Phone Runtime API. For more info about the Windows Phone Runtime API set, see Windows Phone Runtime API.

Shared .NET engine

You can leverage the same .NET engine in your XAML apps for Windows Phone 8 and Windows 8, and use sharing techniques to maximize code reuse for these apps on both platforms. For more info, see .NET API for Windows Phone.

Similar XAML UI controls

Windows Phone 8 and Windows 8 have similar but different design guidelines and building blocks used to create your UI. The core guideline for UI development in Windows Phone 8 and Windows 8 is to design the user experience for your app tailored for each platform. It’s important to make your app look right and be immersive on each device on which it runs to create the best possible experience for your app users.

On Windows Phone 8 you’ll want to create your UI to target the phone form factor, supported screen resolutions, and unique user experiences such as lock screen integration, live Tiles, and the navigation model. Similarly, on Windows 8, your Windows Store app should adhere to Windows 8 user experience best practices, and take advantage of the platform’s support for different app views and navigation controls, and of integration with the device through contracts and the many other features that will enhance your app and make it a success.

You create your UI on both platforms using XAML. Your app will consist of one or more pages, and each page contains a UI created by and customized by UI controls. The set of controls available on Windows Phone 8 is available in the System.Windows.Controls namespace. The set of controls used on Windows 8 is in the Windows.UI.Xaml.Controls namespace. Although these are different namespaces and the types are different, there’s a lot of similarity in the controls that are supported. Most of the controls are named the same and will be familiar to you coming from either platform. This supports design reuse—you can design your app for Windows Phone 8 and Windows 8 with the same UI building blocks in mind. For a comparison of the control sets available on both platforms, see XAML controls comparison between Windows Phone 8 and Windows 8.

With the recent launch of Windows 8 and Windows Phone 8, it is a great opportunity for App Developers to target these platforms. Both of these platforms provide multiple options to App Developers in terms of Programming Language and frameworks. Some of the languages and framework options are common across these platforms and hence facilitate cross platform development. If you are an App developer who would like to develop Apps for both these platforms then you should think about cross platform development. Think about Portable Common API Layer and minimal platform specific Layer. This will reduce development effort and increase consistency and maintainability. Let us analyze what option we have.

Following are the all Language + Framework options provided for both of these platforms

Windows 8

C# + XAML

Visual Basic + XAML

C++ + XAML

C++ + XAML + Direct2D

C++ + Direct3D

JavaScript + HTML5

Windows Phone 8

C# + XAML

C# + XAML + Direct3D

C# + HTML5

VisualBasic + XAML

VisualBasic + Direct3D

VisualBasic + HTML5

C++ + XAML + Direct3D

C++ + Direct3D

Cross Platform Development Options

The Options you have depends on the what kind of App you are making

Apps

If you want to make form based Applications with Event Driven User Controls like buttons, textboxes and labels then XAML is your best bet.

When you create your app for Windows Phone 8 and Windows 8 using the Model-View-ViewModel (MVVM) pattern and using .NET APIs, you have the potential to share a lot of code in a Portable Class Library. Your ViewModel and Modelcan be designed to be portable and you should place these in a Portable Class Library. The views of your app, and the startup code, typically are platform-specific and should be implemented in your Windows Phone 8 and Windows 8 app projects. This is illustrated in the following diagram.

If your ViewModel needs to call platform-specific code, you should abstract that functionality into the platform-independent interface and use the interface in the Portable Class Library. The interface can then be implemented in a platform-specific way in each app project. This is a very powerful code-sharing technique and allows binary sharing because the Portable Class Library is compiled once and then used in multiple platforms.

I feel lucky to live in the days of continuously connected devices. I love that I’m able to reply to e-mail using my phone while riding the bus home. It’s amazing to be able to Skype with my family on the other side of the world and team up with like-minded gamers across the country on my Xbox. However, in this world of permanent Internet connectivity, there is, as Joshua Topolsky puts it, “a missing link in our computing experience” (engt.co/9GVeKl).

This missing link refers to the lack of what Topolsky calls a continuous client; that is, a solution to the broken workflow that occurs today when you move from one device to another. As I switch among my PC, tablet and phone in a typical day, my current browsing session, documents, windows and application state should naturally flow to all of them. That way, I’d spend less time on context switching and more time on actual work and play.

In this article, I’ll show you how to build a simple continuous client application that spans multiple devices and platforms. I’ll make use of the new Portable Class Libraries (PCLs) to ease the development of a cross-platform application, and the cloud—in particular Windows Azure AppFabric Service Bus—to handle the communication between the devices.…

[00:39:40]

With this kind of architecture we can build a Windows and a Windows Phone app and we can connect to the cloud, and sink data between them. … but in a lot of cases you want to target more platforms … you also need an iOS and an Android version of your application. … The pretty good solution to that is to use these tools from a company called Xamarin. … These basically will let you run C# code … platform specific user interface for these platforms …

[00:41:00] We will look at the demo of that: Twitter Search

…

[00:44:38] In review: what we learned

How to create cross-platform apps that take full advantage of platform-specific features while maximizing code reuse for the rest of your app

Share code across platforms with Portable Class Libraries

Use the MVVM pattern to write cross-platform apps

Put models and view models in portable libraries

Create platform-specific views

Create portable abstractions for non-portable functionality

Implement the abstractions for each platform you target

Consider using a service locator or IoC container to hook up implementations

… How much of a reduction actually is that? … People generally report from 60% at the low end to 95% at the high-end for the code that can be be shared between the platforms. … Using these patterns you can definitely reduce the work …

Xamarinreleases Xamarin.Mobile, a single API developers can use for common device services like contacts, camera, and geolocation, with Windows 8 and Windows Phone 8 support. //Build attendees can visit Xamarin on the Expo floor

Xamarin.Mobile is a library that exposes a single set of APIs for accessing common mobile device functionality across iOS, Android, and Windows platforms. This increases the amount of code developers can share across mobile platforms, making mobile app development easier and faster.

Xamarin.Mobile currently abstracts the contacts, camera, and geo-location APIs across iOS, Android and Windows platforms. Future plans include notifications and accelerometer services.

…

Release Notes

Release v0.6

Features:

Windows 8 support for Xamarin.Media and Xamarin.Geolocation.

Windows Phone 8 support.

Fixes:

Fixed positioning issues with MediaPicker.Pick* on retina iPads and iOS6.

Xamarin is not just a “write-once, run everywhere” platform, because one of its strengths is the ability to implement native user interfaces specifically for each platform. However, with thoughtful design it’s still possible to share most of the non-user interface code and get the best of both worlds: write your data storage and business logic code once, and present native UIs on each platform. This document discusses a general architectural approach to achieve this goal.

Here is a summary of the key points for creating Xamarin cross-platform apps:

Use C# – Write your apps in C#. Existing code written in C# can be ported to iOS and Android using Xamarin very easily, and obviously used on Windows Phone.

Utilize the MVC design pattern – Develop your application’s User Interface using the Model/View/Controller pattern. Architect your application using a Model/View/Controller approach or a Model/View/ViewModel approach where there is a clear separation between the “Model” and the rest. Determine which parts of your application will be using native user interface elements of each platform (iOS, Android, Windows Phone and Windows 8/RT) and use this as a guideline to split your application into two components: “Core” and “UserInterface”.

Build native UIs – Each OS-specific application provides a different user-interface layer (implemented in C# with the assistance of native UI design tools):

3. On Windows Phone you will be using the XAML/Silverlight presentation layer, using Visual Studio or Blend’s UI designer

4. On Windows 8, use the Metro APIs to create a native user experience.

The amount of code re-use will depend largely on how much code is kept in the shared core and how much code is user-interface specific. The core code is anything that does not interact directly with the user, but instead provides services for parts of the application that will collect and display this information.

To increase the amount of code re-use, you can adopt cross-platform components that provide common services across all these systems such as:

SQLite-NET for local SQL storage,

Xamarin.Mobile for accessing device-specific capabilities including the camera, contacts and geolocation,

Using framework features for networking, web services, IO and more.

Some of these components are implemented in the Tasky Pro and MWC 2012 case studies.

SEPARATE REUSABLE CODE INTO A CORE LIBRARY

By following the principle of separation of responsibility by layering your application architecture and then moving core functionality that is platform agnostic into a reusable core library, you can maximize code sharing across platforms, as the figure below illustrates:

Windows Azure Mobile Services makes it incredibly easy to connect a scalable cloud backend to your client and mobile applications. It allows you to easily store structured data in the cloud that can span both devices and users, integrate it with user authentication, as well as send out updates to clients via push notifications.

Today’s release enables you to add these capabilities to any Windows 8 app in literally minutes, and provides a super productive way for you to quickly build out your app ideas. We’ll also be adding support to enable these same scenarios for Windows Phone, iOS, and Android devices soon.

Read this getting started tutorial to walkthrough how you can build (in less than 5 minutes) a simple Windows 8 “Todo List” app that is cloud enabled using Windows Azure Mobile Services. Or watch this video of me showing how to do it step by step.

…

Storing Data in the Cloud

Storing data in the cloud with Windows Azure Mobile Services is incredibly easy. When you create a Windows Azure Mobile Service, we automatically associate it with a SQL Database inside Windows Azure. The Windows Azure Mobile Service backend then provides built-in support for enabling remote apps to securely store and retrieve data from it (using secure REST end-points utilizing a JSON-based ODATA format) – without you having to write or deploy any custom server code. Built-in management support is provided within the Windows Azure portal for creating new tables, browsing data, setting indexes, and controlling access permissions.

This makes it incredibly easy to connect client applications to the cloud, and enables client developers who don’t have a server-code background to be productive from the very beginning. They can instead focus on building the client app experience, and leverage Windows Azure Mobile Services to provide the cloud backend services they require.

…

User Authentication and Push Notifications

Windows Azure Mobile Services also make it incredibly easy to integrate user authentication/authorization and push notifications within your applications. You can use these capabilities to enable authentication and fine grain access control permissions to the data you store in the cloud, as well as to trigger push notifications to users/devices when the data changes. Windows Azure Mobile Services supports the concept of “server scripts” (small chunks of server-side script that executes in response to actions) that make it really easy to enable these scenarios.

…

Manage and Monitor your Mobile Service

Just like with every other service in Windows Azure, you can monitor usage and metrics of your mobile service backend using the “Dashboard” tab within the Windows Azure Portal.

The dashboard tab provides a built-in monitoring view of the API calls, Bandwidth, and server CPU cycles of your Windows Azure Mobile Service. You can also use the “Logs” tab within the portal to review error messages. This makes it easy to monitor and track how your application is doing.

Scale Up as Your Business Grows

Windows Azure Mobile Services now allows every Windows Azure customer to create and run up to 10 Mobile Services in a free, shared/multi-tenant hosting environment (where your mobile backend will be one of multiple apps running on a shared set of server resources). This provides an easy way to get started on projects at no cost beyond the database you connect your Windows Azure Mobile Service to (note: each Windows Azure free trial account also includes a 1GB SQL Database that you can use with any number of apps or Windows Azure Mobile Services).

…

Summary

I’ve only scratched the surface of what you can do with Windows Azure Mobile Services – there are a lot more features to explore.

With Windows Azure Mobile Services you’ll be able to build mobile app experiences faster than ever, and enable even better user experiences – by connecting your client apps to the cloud.

We are going to publish documentation for the HTTP REST APIs shortly – which will make it easy for anyone to consume them from any platform. We’ll then provide pre-built REST helper methods for Win8/iOS/Android/others for those who want to work with language libraries as opposed to raw REST ones.

@FDanconia,>>>>>> When you say “Windows 8 app”, do you mean a Metro app, or a Desktop app, or both?

The language libraries we are providing today work with WinRT – so you’d use them within Windows 8 Store Apps. But the underlying features can be accessed by any app using the REST APIs (including desktop ones). [So even web based, HTML5/JavaScript et al, client applications – discussed in the last section – can use the Windows Azure Mobile Services.]

…

@Jeff,>>>>>> I am confused. Scalability, user management, structured data – all of the features, with the arguable exception of push notifications, are useful for all types of applications. What about this is “mobile”?

We support all of those capabilities with other Azure features today as well (web-sites, storage, databases, cloud services, etc). You can also build your own mobile backends today using those existing features/capabilities to power your mobile clients.

The reason we are introducing Windows Azure Mobile Services is because a lot of developers don’t have the time/skillset/inclination to have to build a custom mobile backend themselves. Instead they’d like to be able to leverage an existing solution to get started and then customize/extend further only as needed when their business grows. Azure Mobile Services makes it really easy for them to do this – while preserving the ability to easily extend it with other azure features in the future.

It’s no secret that my favorite feature of our first release of Mobile Services is the ability to execute scripts on the server. This is useful for all kinds of scenarios from validation and authorization to sending push notifications. We made it very easy to send push notifications via WNS (Windows Notification Services), it’s basically a single code statement:

…

HTTP with request

It’s also no secret that the Mobile Services runtime uses NodeJS to give you the power of JavaScript on the server – with the ability to require some of the best modules in Node, including my favorite: request from Mikeal.

…

Now that we understand push and HTTP wouldn’t it be cool to pull the two together, and use the power of the internet to help us find an image to accompany our push notification. Imagine we want to send all our devices a live tile with an image whenever a new item is added to our list. And what’s more we want the image to be something that portrays the text of item inserted.

[tl;dr – the code for my sessions is available further down in this post on my github]

It’s been a very long week, but a very good one. Windows Azure Mobile Services got it’s first large piece of airtime at the BUILD conference and the reaction has been great. Here’s just a couple of my favorite quotes so far from the week:

“Mobile Services is the best thing at BUILD, and there’s been a lot of cool stuff at BUILD” – Attendee in person

The BUILD team also hosted a hackathon and Mobile Services featured prominently. In fact two of the three winners of the hackathon was built on Mobile Services and you can watch the team talk about their experience in their live interview on Channel 9 (link to come when the content goes live). Again, some favorite quotes from the winning teams (some of which were mentored by the incredible Paul Batum):

“I was watching the Mobile services talk on the live stream, and as I was watching it I started hooking it up. By the time he finished his talk, I got the backend for our app done” – Social Squares, winner

“We got together on Monday and we did a lot of work – he did a service layer, I did a web service layer, we did bunch of stuff that would help [our app] to communicate, and then we went to Josh’s session… and we threw everything away and used Mobile Services. What took us roughly 2000 lines of code, we got for free with Mobile Services” – QBranch, winner

We take a Windows Phone 8 application that has no connectivity and uses no cloud services, to building out a whole connected scenario in 60 minutes. There’s a lot of live coding, risk and we even get (entirely by coincidence) James Chambers up on stage for some audience interaction that doesn’t quite go to plan! The code for this is up on github here(download zip).

In this session, I build a Windows 8 application starting from the Mobile Services quickstart, going into some detail on authentication, scripts and push notifications including managing channels. The code for is up ongithub here (download zip) and – due to popular demand I created a C# version of the Windows 8 client. The Windows Phone client was pretty easy – I’ll leave that as an exercise for the reader.

Paul and I were also interviewed by Scott Hanselman on Channel 9 Live – right after the keynote. We had a blast talking to Scott about Mobile Services and got to answer some questions coming in from the audience.

One of the outcomes of the Channel 9 interview was we promised to setup a Mobile Services UserVoice. We never want to break a promise on Mobile Services so here you go: http://mobileservices.uservoice.com – so please log your requests and get voting! Don’t forget about our forums and always feel free to reach out to me on twitter @joshtwist.

Our friends at Microsoft recently introduced Windows Azure Mobile Services, a cloud platform that provides a scalable backend for mobile applications. It’s an easy way to add login capabilities and remote data storage to your application without building your own backend.

We are really pleased to announce that we have partnered with Microsoft to bring Mobile Services to iOS and Android developers, enabling them to easily use Microsoft’s cloud service from a common C# code base. While we have long enjoyed a productive relationship with Microsoft, we are excited to collaborating with Microsoft at a new level and to help Windows Azure Mobile Services and Microsoft reach additional platforms.

We are making a preview of our cross-platform Azure Mobile Services client framework available today on GitHub under a permissive open source software license. The framework, which is a port of Microsoft’s own Mobile Services client library, will make it easy for developers to use Microsoft’s hosted backend in their Xamarin-powered Android and iOS applications. You can start using it today in your own projects.

Azure Mobile Services offers elastic scalability, allowing you to get the capacity that you need as the popularity of your application grows. The client framework takes advantage of your favorite C# features to simplify data storage and retrieval. For example, you can access your remote data with LINQ queries instead of crafting your own REST API calls. Instead of dealing with a schema and parsing database output, you use attributes to associate remote data fields with class properties.

…

5. Web based, HTML5/JavaScript et al, client applications

… We’ve based the next release of Windows Phone on the rock-solid technology core of Windows 8. It means Windows Phone and its bigger sibling will share common networking, security, media and web browser technology, and a common file system. That translates into better performance, more features, and new opportunities for app developers and hardware makers to innovate faster.

This new shared core—along with all the extra work we’ve done on top of it—opens up a new world of capabilities, which you don’t have to be a techie to appreciate. Here’s a taste:

…

Internet Explorer 10: The next version of Windows Phone comes with the same web browsing engine that’s headed for Window 8 PCs and tablets. IE10 is faster and more secure, with advanced anti-phishing features like SmartScreen Filter to block dangerous websites and malware.

This article guides you through the process of creating a custom pinned Tile that links to your website. This helps you control your brand when users pin your site to their Windows Phone Start screen. This works on phones running Windows Phone 7 and Windows Phone 8. …

Internet Explorer 10 is fast and fluid, and built from the ground up for real-world performance. Growing evidence shows Internet Explorer as the fastest web browser on Windows 8.

1. Earlier today, New Relic published additional evidence showing that Internet Explorer 10 is the fastest Windows browser. New Relic monitors page views for thousands of Internet sites, and found that IE10 and IE9 have the “fastest browser response time on Windows, with IE10 showing a notable increase over IE9.”

Find your web browser on the chart above. Are you running the fastest Windows browser—or the slowest?

2. On September 24, 2012, Tom’s Hardware ran a story on RoboHornet, a set of open-sourced micro-benchmarks released with Google participation on Github. Not surprisingly, they found “Internet Explorer 10 smashes the competition, performing 37% better than even the latest version of Google’s Chrome.”

3. On September 18, 2012, Strangeloop Networks published a report showing performance results from 2,000 of the world’s top retail sites, finding that “Internet Explorer 10 rendered pages faster than other browsers” and that“IE10 served pages 8% faster than Chrome 20.” The tests used Webpagetest.org, an open-source project primarily developed and supported by Google.

These unpaid, independent endorsements are just three votes in favor of IE10’s real-world performance. Since the arrival of Windows 8, millions more are using Internet Explorer 10 and learning first-hand that IE10 is fast, fluid, and perfect for touch.

Today, the Windows team shared that after much anticipation, Windows 8 is available to the world.

Windows 8 represents a tremendous step forward in reimagining what people can expect from the devices in their life – whether PC, tablet, or something that can be both.

The entirely new Internet Explorer 10 is a huge part of the reimagined Windows experience.

IE10 is the Windows 8 browser. Built specifically to make the web a first class citizen on your new Windows 8 device right alongside apps.

It is exceptionally fast and fluid when it comes to performance. Most importantly, IE10 is arguably the first browser that is perfect for touch.

With an entirely new modern touch-first UI, IE10 raises the bar for what we should expect from the web on new modern devices. The underlying platform innovations in IE10 around touch are allowing developers to create new experiences that rival their native app counterparts. Check out this video from the recently released Contre Jour HTML5 game in IE10.

Hauntingly beautiful, pleasantly challenging and strangely addicting – Contre Jour is now on the web! Swing, shoot, drop or fling Petit through 30 free challenging levels right in your browser. Optimized for touch, Contre Jour is at its best using the new Internet Explorer 10 on Windows 8 devices. The game also works well in Internet Explorer 9 and other modern browsers. Find out if you have what it takes to help Petit reach his goal. Play now! at http://www.contrejour.ie

There are a plethora of new features in Internet Explorer 10 that we are excited about, but we want to call out some of our favorites:

Full-Screen Browsing: IE10 lets you enjoy the web as it was meant to be – with all of the focus on the sites you love. The browser appears only when you need it, and quietly gets out of the way when you don’t. Once you’ve experienced sites like Pulse with IE10, it’s hard to go back to having any chrome around your sites.

Pinning: IE10 allows you to pin your favorite sites to the Start screen just like apps. Simply tapping the “Pin to Start” button in the navigation bar will create a tile on the Start screen so you can put your favorite sites right alongside your applications in a beautiful display that will truly make “Start” your home. Trying pinning Facebook, Twitter, or CNN with IE10 to see how it works.

Snapping: IE10 makes multi-tasking easy by allowing you to simply “snap” IE10 to one side of the screen, while having another application – such as Mail, Xbox Music or Microsoft Office – open on the other side. It’s small but awesome example of how the web, through IE10, just blends seamlessly into your Windows 8 experience.

Your Windows Phone puts what the Web is about in your pocket, making it easy to find, view, and act on Web content. You’ll find Internet Explorer 10 for Windows Phone — the fastest version ever — on the Start screen and in the App list, and can tap a hyperlink from anywhere on your phone to launch the browser and go to that page. We think you’ll find your phone’s built-in browser to be fast, fluid, and perfect for touch.

Your phone’s built-in browser delivers many of the same features as Internet Explorer 10 in Windows 8, including a smart address bar, tabbed browsing, favorites, History, and the ability to delete your browsing history. Of course, we also optimized the browser for your phone, adding features such as multitouch zoom; landscape view; a Web-ready keyboard; and automatic recognition of street addresses, phone numbers, and email addresses on webpages.

Internet Explorer 10 for Windows Phone also includes a new SmartScreen Filter — just like the one in Internet Explorer 10 in Windows 8 — to help protect you from malicious websites. JavaScript performance is up to seven times faster than with Windows Phone 7.5 and twice as many HTML5 features are supported. We also added more ways to share, enabled you to get links via NFC, and re-enabled Find-on-Page.

Thursday, May 31, 2012, we delivered the Windows 8 Release Preview and the Sixth IE10 Platform Preview. Windows 8 includes one HTML5 browsing engine that powers both browsing experiences (Metro style and desktop) as well as Metro style applications that use HTML5 and JavaScript. The release preview represents a major revision of the same modern JavaScript engine, Chakra, which first debuted with IE9. With each platform preview we make progress against our goals to create an engine that delivers great performance on the Web while ensuring that it is highly compatible, interoperable, and secure. This post will explore how the JavaScript engine has been enhanced to deliver great performance for emerging Web application scenarios.

Performance for Real Web Applications

Internals of Chakra

Fast Page Load Time (Bytecode Interpreter, Deferred Parsing)

Performance Improvements for JavaScript-Intensive Applications

Just-in-Time Compiler – Reconsidered and Improved

Faster Floating Point Arithmetic

Faster Objects and Property Access

Garbage Collection Enhancements

Summary

IE10 achieves dramatic performance gains for JavaScript-intensive applications, particularly HTML5 games and simulations. These gains were accomplished through a range of important improvements in Chakra: from new fundamental capabilities of the JIT compiler to changes in the garbage collector.

As we wrap up development on IE10 we celebrate the progress we’ve made, but we are keenly aware that performance is a perpetual quest. New applications emerge almost daily that test the limits of modern browsers and their JavaScript engines. Without a doubt there will be plenty to work on in the next release!

If you’re a JavaScript developer, we’d love to hear from you. If the new capabilities and performance advances in IE10 helped you create entirely new experiences for your users, or make existing applications better, please, let us know. If you’ve hit any performance limitations in IE, please, drop us a note as well. We carefully read all the comments on this blog, and we strive to make IE10 and Windows 8 the most comprehensive and performant application platform available.

IE10 in the Windows 8 Release Preview supports the width and height properties of the W3C Working Draft CSS Device Adaptation. This gives Web developers a simple tool to control automatic content scaling across various window dimensions. In particular, it enables Web sites to easily adapt to Windows 8 Metro style browser in the snapped view and portrait orientation.

Internet Explorer for Windows Phone is based on Internet Explorer for the desktop; however, there are differences that web developers should consider. This topic describes some of these differences on a high level for both Windows Phone OS 8.0 as it relates to Internet Explorer 10, and Windows Phone OS 7.1 as it relates to Internet Explorer 9. For general info about designing mobile websites, see Designing Web Sites for Phone Browsers.

Windows Phone provides a WebBrowser control that is based on the desktop browser. The WebBrowser control for Windows Phone OS 7.1 is based on Internet Explorer 9, and the WebBrowser control for Windows Phone 8 is based on Internet Explorer 10. Because of this, there are slight differences in the appearance of apps that use the WebBrowser control running on Windows Phone 7.5 compared to phones that run on Windows Phone 8.

The WebBrowser control can be embedded in an app and used for a number of purposes that include, but are not limited to, the following:

Script is disabled in the WebBrowser control by default. Set the IsScriptEnabled property to true if you want to enable scripting in your control. You can then call scripts using the InvokeScript method. The ScriptNotify event occurs when JavaScript in the WebBrowser control passes a string to managed code.

We’re seeing growing support for Windows Phone 8 among cross-platform tools, frameworks, and libraries vendors. Many of them take advantage of extensive support for HTML5 in Internet Explorer 10. Here’s what’s new:

jqMobi (www.jqmobi.com) today released the developer preview of jqMobi version 1.2, which adds support for Windows 8 and Windows Phone 8. jqMobi was the first JavaScript framework specifically designed for speed and continuity of user experience across mobile devices from different manufacturers. Since its introduction and open sourcing in January, jqMobi has been adopted by thousands of developers and powers millions of user sessions per day.

In this release jqMobi adds support for Internet Explorer, making it the first time an additional mobile browser has been supported outside of WebKit based browsers. All of jqMobi’s core and base plugins have been extended to support the IE10 browser in Windows Phone 8, including fixed headers and footers, CSS3 transitions and JS-based scrolling. jqMobi 1.2 also adds commands to allow the developer to detect which OS it is running on and adds the $.os.ie prefix to support IE specific commands.

“For HTML5 frameworks like jqMobi, the quality of the browser determines what we can deliver” said Ian Maffett, jqMobi lead developer. “Microsoft’s IE10 browser delivers really good performance that is competitive with the best browsers we’ve seen on Android and iOS. So that means that developers who want to take advantage of jqMobi to deliver iOS, Android, Windows 8 and Windows Phone 8 apps can give their users an identically fantastic experience across all four device platforms.”

jqMobi is the first JavaScript framework developed solely for use on mobile devices, and it is optimized for touch based interface and smaller screen sizes. It is significantly smaller and faster than other frameworks such as Sencha Touch and jQuery that were originally developed for desktop web. jqMobi was originally created by appMobi and open sourced in February 2012, and is being used in tens of thousands of mobile web apps and hybrid apps around the world. While most JavaScript app frameworks deliver a good user experience on iOS devices, many have difficulties with the highly fragmented Android platform. jqMobi offers developers a solid framework that delivers equivalent user experiences on iOS, Android, Windows 8 and Windows Phone 8 platforms. More information is available at http://www.jqmobi.com

On Monday, Microsoft officially announced their new Windows Phone 8 operating system for mobile devices. It comes with a long list of new features, but we’re most excited about the new web browser: a new mobile version of Internet Explorer 10 that finally brings support for web fonts and the standard WOFF font format to Windows Phone. Today, we’re announcing official Typekit support for Windows Phone 8 and up.…