Windows 8 Development Tips #1: Choosing XAML or HTML

Your journey towards building an application for the Windows Store begins as most journeys do -- with a crucial choice.  Thankfully, this choice doesn't involve casting a ring into a burning mountain or choosing the Light Side over the Dark Side.  This choice boils down more to personal preferences and strengths more than anything.  However, there are some things to consider before making this decision.

(Other tips in the series can be found here.)

Choosing XAML or HTML

Language Familiarity

This will probably be the biggest factor in your decision.  You are going to have to incur some level of learning curve regardless of which markup path you choose.  XAML developers will see a lot of familiarity to Silverlight or WPF in Windows Store development but there are plenty of difference as well.  HTML developers will be familiar with how the markup looks but will need to learn the WinJS specific classes and data attributes.  This need to learn new things in the markup itself is coupled with the fact that you will need to learn WinRT and general Windows Store app design as well.  Starting with a technology you are already familiar with certainly has some benefits.

Tooling Support

When I wrote my original post about this subject, Windows Store XAML projects were not supported in Blend.  I cited this as a major reason to consider HTML instead of XAML.  Thankfully, Blend support was later added for XAML projects and XAML developers will be familiar with the way XAML projects are treated in Blend.  That being said, the tooling support remains better for HTML/WinJS.  Blend for HTML renders elements immediately using a Live DO and includes an interactive mode that allows you to test your application without even running it.  Also, the CSS editing support in Blend is awesome.  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.  I score this as a win for HTML.

Third party library support

There are a lot of libraries written for C# and Javascript.  Many of these libraries will work just fine with no change necessary.  Others will require changes to make them compatible with WinRT.  Control libraries, such as those offered by Infragistics, will predominantly need to be built from the ground up for the new platform.  Considering there are plenty of libraries on both sides of this decision, I consider this factor a wash.

Parity

Microsoft has stated that they are intent on keeping parity between HTML and XAML.  It is nice to see that so far they are living up to that goal.  At the beginning of the Windows 8 development story it was very clear that Microsoft spent the majority of their time and attention building WinJS.  It is still possible to see the effects of that today (WinJS has easier ways to do some things than in XAML), but the number of places where this is obvious is dwindling.  I don't think you should base your decision on this factor.

Conclusion

While I can't make this decision for you, I hope you'll consider what I've offered here as you start your journey.  I believe that regardless of which choice you make, you should invest some time learning the other one as well at some point.  I have developed using both sets of technology and there are pain points in both.  For your first application, pick the UI technology that you are most comfortable with and consider using the other for your second app.  In the end, it is a bit of a personal choice.  Choose what works for you and build the best app you can!

Contact

If you have any questions or comments, please comment below or find me on Twitter @brentschooley. You can also email me at bschooley@infragistics.com.


Add a Comment

Be the first one to add a comment. Please Login or Register to add comment.