Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Non-trivial GUI-generating code can't be previewed in a GUI editor without emulating the entire environment. Styling also gets harder, and some concepts don't translate well into code (e.g. Grid.Column in XAML). Finally, retained GUI code should nearly always follow a MVC or MVVM pattern to keep logic separate from visuals, and a language barrier is one more way to do that.
-
inaba46256yI love using markup languages in gui because it makes it easier to order things around. Also in case of HTML there's all these semantic tags which are great for knowing what is supposed to be what
-
Programmatically? Well yeah, for desktop applications. But on the web, that would mean generating the entire DOM via JS. That leads to issues with performance, SEO and accessibility.
-
lxmcf204096y@Fast-Nop That's actually a good point, should probably have been a bit more specific
-
in general, i favour declarative languages, markups & co.
i'm no expert of GUI development in desktop environments, but as for web dev markups are quite a good tool
and as for web, unless you develop for intranet or you use a good server-side rendering system, normally you want standard-compliant HTML on top of everything -
In the case of XAML, it makes things more modular. There's less code and less room to fuck up.
In the case of HTML... Did you want to generate your layout with JavaScript? Didn't think so.
Others that come to mind like Quick QT, I think it's called, are useful in their own right. Writing out code to generate your layout is not only time expensive and difficult to read, but whenever I do it, I tend to make more mistakes than if I were using a markup language. And it's more difficult to modify too.
Plus some markup languages give you state modifiers like :hover so you don't need to write event listeners.
Related Rants
What's everyone's opinion on visual design languages (languages designed just for visual elements. EG, XAML and HTML)
Personally I am not a fan of them at all, much rather have everything done programmatically, maybe this is coming too much from me using GameMaker and also vala with GTK, it just seems to be easier to grasp and work with imho.
question
opinion
language