13
Some time ago declarative languages took over the development of software for creating graphical user interfaces. The most obvious examples are the framework WPF that uses XAML (Extensible Application Markup Language) as the declarative language and the library Qt framework with its QML (Qt Markup Language).
Unlike Qt that does not publicly expose the code (classes) responsible for the effective execution of the interface, requiring the use of QML in the new GUI style (Qtwidgets is the opposite) and does not allow an imperative programming mode instead of declarative (at least does not allow to do 100% in code), the WPF allows two programming modes: 1) declaratively through the XAML, which is the most used mode and 2) imperative/object oriented programming with code through the exposed classes, After all, XAML is all built on top of existing classes, even counting on auxiliary classes to convert values from XAML to code. Roughly there is a 1:1 relationship between classes and their members and the markings of the XAML code and its attributes.
Although ostensibly demonstrated that XAML should be used primarily - this has several advantages - and even some people believe it is the only way, the documentation, books on WPF, and some websites even specific on the subject (also here and in the ONLY ORIGINAL) clearly indicate the possibility to use only nondeclarative programming.
I have a software that generates all the screens on-the-fly, through code. Adapting this software to Windows 8, it would be absurd at runtime I generate the XAML to then the framework "convert to code" to run.
I do not know the technology well and I do not know if it would be worth learning for much later to find out if it will not meet my need.
I have already searched extensively on the internet in general and on specific websites if that is also possible and found nothing. I couldn’t find anything that indicated that it is possible or even that it is not. I couldn’t find an example even showing only code. I certainly found a lot of code that helps Winrt’s XAML but nothing that indicates that 100% of the interface can be done without XAML.
My question is whether there is a possibility of using Winrt for GUI construction without using anything XAML, only with code, and of course, where I can find information/documentation about it, if possible with examples. In other words, is 100% of the code responsible for the construction and interaction of the GUI exposed to the programmer? Some example here would be very welcome.
The usefulness of XAML is not under discussion. For this specific case would be an exaggeration.
For me it’s the same for Winui.
For Winrt it is possible to use HTML instead of XAML. If you only create objects via javascript, I believe this answers your question (no XAML and only via code). But I believe that is not the answer you are looking for, if it is, I will transfer to the answers section.
– Marcos Zolnowski
@Marcoszolnowski You’re right that’s not quite what I’m looking for, but it’s still an answer that can help those who can use it this way and that’s important too. I wouldn’t accept how To answer, but it is a possible one. You have knowledge whether this is the only way, or would not risk saying this?
– Maniero
Here is the url of a video, which although old, deals with what would be the past, present and future of XAML: http://channel9.msdn.com/Shows/Going+Deep/Rob-Relyea-Theres-Something-About-XAML
– iuristona