The Battle Continues: XAML vs. HTML5
[Let me preface this post by stating that I am a very open minded person, and I truly believe that I have something to learn from everyone’s opinion. This post is meant to generate discussion, so please share your opinion and participate!]
Last night, I saw a message on Twitter that I completely disagreed with.
I think the "Why XAML is better than JS/HTML5/CSS" posts should be more accurately named "I like XAML and don't know the other stuff”.
The first time I read this, I agreed with the author. I’ve read plenty of articles that sing the praises of a technology, but offer no substantial argument for the other side, primarily because the author hasn’t used it, or just didn’t understand it. The second time I read it, however, I got the vibe that he actually felt that the HTML5 “stack” was better than the XAML “stack.” I even received another comment that piled on:
I disagree that XAML is better for layouts than html – HTML provides flexibility, XAML too rigid.
Let me set some ground rules for this discussion:
- I’m not arguing that XAML should be used in all instances. Clearly, HTML/CSS/JS is more universally accessible to the broad public.
- With point #1 in mind, I AM arguing that XAML for layout and manipulation IS better than HTML, hands down, but only in those cases where XAML can be used.
- To make all things equal, let’s use Windows 8 as the platform we’re comparing these technologies.
- Finally, everything everyone shares here is an opinion. Opinions can’t be wrong. Including mine. You just have a different opinion.
In Windows 8 development, you have several options for building your applications. XAML is one. HTML5 is one. Platforms, distribution, and everything else being equal, I would pick XAML/C# every time over HTML/CSS/JS, and I’ve been a web developer for 14 years.
Here’s my problem: I think everyone is going to disagree with me, and I completely respect that. What I want from you, my dear reader, is an explanation. Are you arguing for HTML because you haven’t used XAML? Or do you truly have examples that make the case for me to consider HTML over XAML?
Like I said at the beginning of this post…I’m open minded. I’m not here to sneer or judge anyone. I am legitimately curious why someone would argue for using the HTML stack when XAML is a perfectly available alternative for the situation.
You can leave comments here, you can hit me on Twitter, or you can email me if you’d rather keep your opinion private. It’s XAMLvsHTML@jeffblankenburg.com. I’m looking forward to what you have to say.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)






Comments
Johnathan Hebert replied on Sat, 2012/05/26 - 1:55pm
I think you are asking a good question, and it is a hard one to answer in some ways. I have also been a web developer for a long time, and I actually have written an app for Windows 8 with HTML, JavaScript and CSS and it is currently in the Windows Store and available on the Consumer Preview.
I can say that both technologies have advantages, but if you are asking for a comparison of the markup languages, then you are probably right that XAML has an advantage. HTML was a markup language for documents, and even the advancements of HTML5 have to be done in a non-breaking way to preserve the document-centric nature of HTML.
XAML has the advantage of being an application layout markup language, with the idea of "controls" in mind during its creation. Although I have not built an app with XAML, I think it would be pretty shocking if a markup language that was purpose-built for native Microsoft applications was less suited for the task than a markup language built as a general purpose document abstraction with app-like markup bolted on top.
With that said, the advantages of XAML have not been demonstrated strongly enough to me to make me believe it can do allow me to accomplish something I can not with HTML. So my argument is that while yes, it probably has advantages, I cannot think of something that it will allow me to do that I can not already do with HTML / JavaScript / CSS and WinRT on Windows 8.
Pedro Worcel replied on Mon, 2012/05/28 - 8:21pm
Francis Perreault replied on Tue, 2012/05/29 - 12:49pm
in response to:
Johnathan Hebert