5 ms·
> After all in every native UI framework you have instructions to draw the widget IN your code -- not as some external additional technology. A widget's C/C++/O
by Aleman360 11y ago
> After all in every native UI framework you have instructions to draw the widget IN your code -- not as some external additional technology. A widget's C/C++/Obj-C/Swift/Java/C# etc code encapsulates everything about creating it and showing it.
With the notable exception of Windows. XAML strictly enforces code and markup separation. It makes the View layer more toolable and easier to edit by designers who usually don't program.
- douche 11y agoThat is just inside of WPF-land, though. WinForms (which is still pretty excellent for quick-and-dirty GUIs) and other GUI frameworks are more on the classical model.
- coldtea 11y agoXAML is a properly parsed language defined just for this purpose though, whereas HTML + framework annotations inside element attributes is way more brittle.
- _pmf_ 11y agoI agree that XAML has the most mature concept, but it cheats by introducing the MVVM pattern, which performs some data mangling that would otherwise be part of the view. Not doing this, you'll end up with custom converters etc. MVVM is nice regarding testability, but I find it to be overkill for most applications.
- tomjen3 11y agoThats not really true - you can use some pretty convoluted converters directly into the XAML and you can have those trigger arbitrary functions in your program through one-way binding.