Developing a Windows Store app using C++ and XAML

January 15, 2013

Like any Windows API, Windows Store Applications API is based on native code. Unlike the old Win32 API, the new native interface is not based on the C language prototype, nor the old COM programming model. Microsoft has realized that the .NET type system provides modern, richer and more productive alternative. To have .NET productivity in native code, Microsoft has borrowed the type system principles (ECMA 335 CLI type system) and merged it with the COM programming model. In Windows Store API, you have interfaces, properties, delegates, events, attributes and many other .NET goodies, without the underlined CLR, Class-Loader, GC and the Jitter.

For .NET developers, Windows Store Application API looks like another implementation of the .NET BCL, much as Silverlight is. You still use the CLR/GC/Jitter and call the new Windows Store API using the interoperability layer (RCW/CCW), but with much richer information, about the native types, since they provide rich .NET-like metadata.

But the real revolution is for the native C++ developer. You can develop Windows Store Application using C++/CX, a language that handles the .NET-like type system (somehow resembles the C++/CLI) and provides the new C++ 11 abilities (auto, lambda expressions, R-Value references, new libraries).

As a C++ developer you have in your toolbox the power of STL, the ability to bring existing C++ code, the advantage of developing high performance applications with better control, and all the goodies of Windows 8 API and frameworks, such as using XAML to build a modern user interface and experience.

Using C++, opens the hatch for companies that have huge investments in C++ and that want to port their application to Windows 8. After all, C/C++ is one of the best cross-platform programing languages. In the few month that Windows 8 exists, we at CodeValue have helped several companies to do just that!

One of the activities that I had the honor to take part in, was the Patterns & Practices Hilo project – A XAML C++ based Windows Store Application done right. This project shows how to use best practices (many of them came from the .NET and WPF/Silverlight world), when developing Windows Store App using C++ and XAML. It contains the source code that you can reuse for your own application as well as a document which describes the dilemma, the patterns and the best practices with reference to the source code.

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>