In a Metro Application we have three technologies to render the UI:
- JavaScript
- C#
- C++
On the first level we have DirectX for the UI. This can be used only from C++. Of course we can define libraries that can be consumed by C# and JavaScript code.
The second way to create UI is using XAML. We can use XAML in C# (VB) and C++. The big difference in comparison with DirectX is that we cannot use an XAML controller in a JavaScript application. In this moment we don’t have a JavaScript component that permits us to display a XAML (and I don’t think that we will see soon).
On the same level as XAML we have HTML5 and CSS. This can use only JavaScript and don’t permit to create WinMD libraries that can be consumed by C# and C++. We don’t have any kind of support of JavaScript in C++/C#.
What nice things we can do? We can have a DirectX library and over it an XAML as overlay. This is a very powerful for game industry that can use XAML for data binding and interface and in the same time to use DirectX for the game UI.
After 4 months working with JavaScript and C# on Metro Application on Windows 8 I can say:
- XAML can bind to everything (we have in JavaScript and HTML – but the performance is not the best)
- Dependency property – we can bind 10.000 properties to the UI without any problem (I saw a HTML/JS implementation and it took over 20 seconds to bind and render all the data)
- OOP – is nice to work with a functional programming language (but I miss OOP)
- MVVM – in this moment this pattern is well defined for XAML solutions and a lot of MVVM frameworks already support it
- Debugging – full debugging support as intellisense, code analysis and symbolic refactoring
- Vectors – can be done in HTML5, but I prefer to work with them from XAML
- Resolution independence – don’t need to say more
0 comments:
Post a Comment