Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I was just wondering if there are any major advantages or disadvantages to using either XAML/C# or HTML5/JavaScript for Metro Apps.

share|improve this question
add comment

closed as not constructive by maple_shaft Dec 5 '12 at 18:30

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

6 Answers

up vote 14 down vote accepted

As a little background, I built the American Airlines Windows 8 app in html5. I have to say it was a fantastic.

First, drop all your ideas of HTML5 as it relates to mobile apps. In Windows 8, javaScript is a first class native language. You have access to all the hardware features that a XAML app would. There are also fantastic templates built into Visual Studio 2012 for WinJs applications.

WinJs is not just some half thought webview implementation. Microsoft is finally showing JS the respect it deserves.

I would suggest getting up to speed with the latest and greatest in IE10. Honestly that is the core framework for all of the WinJs stuff. It is powerful and fast! Here's an example of what you can do with it: http://www.cuttherope.ie/.

Also, here's a great place to get started with WinJs: http://msdn.microsoft.com/en-us/library/windows/apps/br211385.aspx

The future looks bright for JS as a native language for Windows.

share|improve this answer
    
Good comment. Would you class yourself as stronger in JS or C#? I'm stronger in C# by some margin, so would be interested to hear any thoughts on reasons for me to pick up on the JS stuff besides my own curiosity :) –  Ian Jul 12 '12 at 5:04
2  
Firstly JavaScript is a script language not a native language. (Unless I missed something and it is now directly compiled into machine code). Secondly it is not a first class language in Win8, since it is meant to be used to develop Metro apps, not any apps (desktop apps, DirectX 11 games etc.). –  Den Jul 12 '12 at 8:06
2  
'Cut the Rope' is a carefully picked poster child. Notice it has relatively small amount of things happening at the same time. If it had hundreds of sprites as modern desktop games tend to it would struggle to show decent FPS running on JS. –  Den Jul 12 '12 at 8:10
    
Ian, I consider myself stronger at javascript, but I use C# everyday so I'm an far from a novice with C#. I chose javascript because it felt more flexible, and also my own curiousity :) –  Phillip Burch Jul 12 '12 at 12:40
1  
@PhillipBurch: my point is that "native", "first class", "powerful and fast" is a misleading choice of words. And I would most certainly consider using C# + SharpDX/MonoGame (not XAML of course) for developing high-performance games for Metro (ARM is a different story though). –  Den Jul 12 '12 at 21:26
show 3 more comments

Both. Because both are being adopted by developers (though not at the same time, what I mean is while some devs are using XAML/C#, some others are using HTML/JS). For those coming from a Web app dev background, it's easier to transition to HTML/JS. And for those aleady familiar with XAML through WPF and Silverlight, it would make sense to carry over the skills to XAML+C#. And as far as results are concerned, both technologies are showing good results. So my guess is both would be equally good in the years to come.

share|improve this answer
add comment

Both are going to run on WinRT (aka trimmed down version of Windows 8 which is used on MS Surface device).

It will totally depend on developers preference . Thus, developers with HTML5/JS experience will be equally powered to develop for Window 8.

share|improve this answer
    
WinRT is NOT "Also Known As" Windows 8. It's a stripped down version of the full-fledged Windows 8 OS that runs only the metro ui/apps and works on ARM based tablets. –  good_computer Dec 5 '12 at 18:02
    
Yes, windows 8 is not a Win RT. However, if that was the meaning that you get from reading my answer, i have made that statement more explicit. –  Yusubov Dec 5 '12 at 18:33
add comment

Metro Apps built using the HTML5/JS APIs will probably be classified as "simpler", compared to their C#/XAML counterparts. While the former will certainly be capable of creating functional, well designed apps, there will undoubtedly be a limit to the capabilities of an app built in HTML5. On the flip side, while C# might be more capable, it's also more complicated. An HTML5 app will be very easy to design and maintain, comparatively.

At least, that's my best estimated guess. I don't have experience developing Win8 apps (yet).

share|improve this answer
3  
I don't think this is the case. They both have access to exactly the same APIs in WinRT. –  Ian Jul 12 '12 at 5:01
add comment

Not a MS programmer - From a programmers standpoint, it would be worth investing your time and effort in a platform agnostic, open standard like JS + HTML 5. The knowledge you gain can be re-used elsewhere.

Win 8 supports JS natively, so there wouldn't be much you cannot accomplish using it.

share|improve this answer
add comment

Yes, in most cases, JavaScript is a native language. Depending on where it's running, its compiled (JIT Style) into machine code.

For example, if you're running the Chrome browser, the V8 engine does just that which is mentioned above. It's my understanding that IE 10 is doing the same, as with the other prevalent browsers which support the ECMAScript 262 standard.

Entou, in most cases JavaScript is no longer an interpreted language. It's a full-fledged, Object-Oriented, Prototypal-based, client/ server-side, ubiquitous programming language.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.