If you are novice in windows store app development then it is obvious to get stuck on the question which platform is best for metro apps development or which one is suitable for you to code and build metro apps ? As developers new to Windows 8, we’re having a hard time choosing between C#/XAML and JS/HTML for our upcoming app development.
The Landscape of Modern App Languages
You can use many languages to create Windows 8 apps and to interact with WinRT. Here are the available language sets for Windows Store app development:
- XAML and C#, or XAML and Visual Basic .NET
- XAML and C++, or DirectX and C++
To develop Windows Store apps, language will probably be the biggest factor in decision. If you have no experience with web development then C#/XAML will be easier for you. XAML developers will see a lot of familiarity to Silverlight or WPF in Windows Store development but there are plenty of difference as well.
If you want to port Win 8 Application to any other Operation System, you have to review your code and need to write extra codes in order to target the desired platform.
Concept of XAML and C# in Windows Store apps.
XAML( Extensible Application Markup Language) is an XML-based markup language developed by Microsoft. XAML is the language behind the visual presentation of an application that you develop in Microsoft Expression Blend, just as HTML is the language behind the visual presentation of a Web page. Creating an application in Expression Blend means writing XAML code, either by hand or visually by working in the Design view of Expression Blend. XAML is .NET and so it is fixed to this Framework. You cannot easily port a XAML Application to a other platform. Therefore, XAML and C# is very good implemented into Visual Studio (Intellisense,Blend and Design-Views) and has some nice features like LINQ(Language-Integrated Query), DataBinding, Resolution Independence, Debugging. whereas C# is nothing more than a language which is used to write code behind file to manipulate and make UI(User Interface) in actions.
Personal Experience and your Interest
Blend for XAML offers a lot of the standard XAML editing features XAML developers/designers have come to expect but doesn’t offer much beyond that. Since WPF, designers and developers have enjoyed Expression Blend. Expression Blend provides a visual and designer interface to accomplish complex actions and interactions in XAML UIs.
Note : Blend for Visual Studio 2012/2013 provides visual authoring for Windows Store apps, with support for both XAML and HTML.
The XAML functionality is similar to previous versions of Blend, so if you’ve used previous versions you’ll feel right at home. In addition to rich support for Windows Store app development, Blend for Visual Studio 2012/2013 also supports enhanced compatibility with the XAML Designer in Blend.
whereas, Blend support for HTML represents a new and innovative kind of authoring environment for HTML, So If you are new to blend then it would be tedious task to work.
For more details and differences : Design Windows Store apps using Blend for Microsoft Visual Studio 2013
Third party library support
Read more : Code libraries, toolkits and other sources of help
If your app target OOP(Object Oriented Programming)
XAML is cool because XAML’s resolution independency, it looks completely the same – just clearer, sharper. Size values in XAML are not pixels, they are device-independent units.
Read for more details : Building Cross-Platform Apps with HTML5
Functionality of Bind to anything
Data Binding is one of the greatest and most powerful features of XAML (WPF, Silverlight, Windows Phone or Windows 8) compared to other traditional web and Windows app technology in .Net. The power of XAML really starts at its native ability to data bind. Nothing data binds like XAML – one way, two way, one time, and to almost any property. Not only is it built-in, not only is it powerful, not only is it fast, but it’s simple.
If raw graphics performance is a concern for your app, then going C++/DirectX ends up being your only real choice.
still have doubt ? If yes read below the feedback from www.wirestone.com Labs
We’ve been developing highly interactive graphical applications using markup languages like XAML and HTML for some time. But when there’s a demand for high performance, we turn to DirectX. And to test the limits, we developed a proof of concept shown in this video under Windows 8 as a DirectX app.
Read more-Gain maximum graphics performance with DirectX.
Which is good between C#/XAMl and C++/XAML ?
First let be clear that the XAML rendering engine is pure C++ / COM whether you’re using C++ or C#. Since .NET and C++ use the same WinRT framework, there probably won’t be too much difference in interacting with the XAML/WinRT platform.
From a XAML perspective it becomes a language choice. The XAML UI stack is the same regardless of which code language you choose here. Depending on your goal of the app it might make more sense to use C++ or C#.
The great advantage of using C++/XAML is if speed is important to your project. The advantage of C#/XAML is that is much more easier to code.
What Should I do ?
I should first ask: “What are my needs?”
Target – Multi-Platform
Choice – HTML5/JS
Target – Windows Ecosystem
Choice – XAML/.Net
if your app is only targeting windows platform. I would suggest XAML. XAML gives you full access to what Microsoft has to offer. HTML5 has some limitations that XAML does not have. XAML does have a learning curve, but its worth it, if your target is windows.
Tatget – High Performance
Choice – Native (XAML/WinRT)
if your app target 2d,3d graphics and need great performance. I would suggest You should go native. Which in this case is XAML + C++/Cx (though you may be able to get away with mixture .Net managed code depending on need). Even if you were to look at porting your app to other devices in the future, you’d probably go native on each of those platforms, for performance.
Some Feedback to give more ideas to make better decision
Windows 8: Top 10 Reasons Why I Choose HTML5 Over XAML
Windows 8: 15 More Reasons why I choose XAML over HTML5
Why I Prefer to Build My Windows Store Apps in HTML
Windows 8: Top 10 Reasons why I choose XAML over HTML5