Naturally, the answer is "it depends". The first variable to consider is what type of app you are considering. If you are wanting to write a game, the choice is not immediately obvious. That's because there are logic apps that don't rely on an elaborate UI and immersive games that do.
Logic games
Because XAML and HTML are much simpler platforms to build simple UI, it makes most sense that you would choose from the following:
- XAML / .Net
- XAML / C++
- HTML / JavaScript
Choosing between these three is a matter of technology preference. But it is also worth noting that we now start with XAML and go to HTML when necessary. What I mean is, new Windows apps should consider XAML as their starting technology and choose others if they are necessary.
One reason you might choose HTML is if you have already created several HTML assets that you want to reuse. But, of course, you could also embed the XAML WebView control in a XAML app and use those HTML assets without requiring a full Web App. To that end, XAML remains the most viable choice.
Immersive Games
Because HTML and DirectX have considerable investments by third party companies and the community for games, it makes most sense to choose from the following:
- DirectX / .Net
- DirectX / C++
- Cordova / PhoneGap
- Hosted Web Apps
- Unity / MonoGame
It's worth reminding you that this article is about "greenfield" apps, but even so the above technologies are the technologies of choice for 99% of the games in the Windows Store.
The next category of apps are usually called productivity apps. And they have basically two sub categories: consumer and commercial. Consumer apps are public, while commercial apps are generally internal, line of business apps.
Consumer apps
Public apps have almost no technology requirements other than giving a full-fidelity, native experience to the user. For these apps, you choose the following:
- XAML / .Net
- XAML / C++
- HTML / JavaScript
- Cordova / PhoneGap
- Hosted Web Apps
The reason Cordova is included is because it is, basically, the HTML option with the added benefit of cross-platform. If cross-platform is a requirement, it's a great choice. I should point out that Xamarin can enable .Net apps to be cross-platform, too.
Sometimes cross-platform is not at the top of the list. Sometimes, it's really a greenfield Windows app. And when you are in that typical starting place, you need to start with XAML / .Net. Why? There are several reasons.
First, XAML is becoming the premium UI platform for Windows. many new aspects of the Windows 10 operating system are written in XAML (like Start, File Explorer, etc.) In addition, Office is now a XAML app, too.
Second, the bulk of samples and community support are in XAML / .Net. This means that regardless of your team's primary technical expertise, ongoing support should be incrementally easier thanks to XAML's popularity.
Third, .Net (like C#) is one of the most logical, powerful and simple programming languages you can choose. It easily supports projects from small to gargantuan. Plus, with .Net Native, .Net languages compile to the metal and perform at near-C++ levels on Windows 10.
Commercial / Line of Business
Commercial apps are a big deal and require some serious investment. Why? Because they are intended to run businesses. They need to be tested, scalable and performant. They need to be integrated and agile. All of these are sometimes part of consumer apps, but because a business can live or die based on their infrastructure, LOB apps are a more serious investment.
For commercial apps, choose XAML / C#.
Here's the reason why.
Since you are writing a Windows 10 app in the first place, I can assume your business is either Microsoft-based or Microsoft-friendly. This means your development team is likely already versed in the basic skills necessary to deliver an excellent XAML / .Net app.
In addition, as third party controls are released by our component vendors like Infragistics, you are going to see the enterprise-oriented controls written in XAML? Why? Because many of these controls have already been released for WPF and will be ported for WinRT as demand increases.
In addition, Visual Studio manages, builds, test, and analyzes .Net projects in a comprehensive and proven way. You are writing with the Microsoft UI platform and automating it with the Microsoft development platform. most companies like to have as few moving parts as possible and this is as pure as it gets.
In addition, many companies have already made significant investments in their LOB systems and have many valuable investments to reuse in their Windows app. Is the Windows app replacing their LOB? Probably not. Is it supplementing or complimenting an existing system? More than likely, yes.
Conclusion
So when should you use C++? Let me share a secret with you. Almost all of the first-party Microsoft MSN apps that ship in-box with Windows 10 are written as XAML / C++. This is because cross-device performance is critical for our apps. Does it mean your apps should be written in C++? In most cases, no.
What if my team is a web team and we have no XAML or .Net experience? First of all, that's unlikely. But let's go with it. We're developers, dang it. Technology does not care us. And, though languages vary, they are conceptually the same. Learning high-end techs like XAML and .Net are worth the investment when you look further down the calendar in terms of performance and impact.
The reality is, some people may disagree. And whatever anyone else says is likely right in some ways. This fundamental answer here is, generally speaking, how we are providing guidance to greenfield developers starting with new Windows 10 apps targeting the Universal Windows Platform. This isn't a commandment, just guidance.
If you are looking to learn more about Windows 10 app development using XAML and C#, take a look at this free, three day course on Microsoft Virtual Academy. https://channel9.msdn.com/Series/A-Developers-Guide-to-Windows-10
Finally, here are some features you should not forget:
- Size adaptability across screens
- Feature adaptability across devices
- Analytics with Application Insights
- Logging with the .Net Logging API
- Testing & automated builds on TFS/VSO
- Localizations into other languages
- Support for automation/accessibility features
- Use the Store to deploy, upgrade, and license
Best of luck!