Easier way of developing

Hey,

I recently tried to build a small app for GNOME. In my experience, it was very confusing and hard to find the right information.

In my experience the XML based UI is very verbose and hard to understand. I think a more modular, component based approach would be easier to understand and use. I would really enjoy a way to build a GNOME app with a framework like Vue or maybe React. This could also allow sharing code between the platforms.

What are your thoughts on this? Is there already something like this?

Thanks for your time!
Jak2k

1 Like

You dont have to define the whole app in one template, so im not exactly sure what is stopping you from writing your app in a modular way.

Either way, Owlkettle or Relm4 might be of interest.

https://relm4.org/

Oh and blueprint aswell for a different way to define ui.

https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/

All this is still very confusing for me as someone who is more familiar with the web. :face_with_spiral_eyes:

My suggestion is to stop trying to compare native/desktop development tools with web development ones: it’s only going to lead to frustration.

You’re strongly encouraged to start from the getting started tutorial on the GNOME developers documentation website; while it does not have examples in JavaScript—yet—you should already be able to understand how GNOME applications are put together.

That isn’t really possible, because those frameworks do not target GNOME. Even React Native does not really work that way.

While that’s the usual “holy grail” of application development—“write once, run anywhere” was the original Java motto—the history of the past 30 years has pretty much proven that it’s not a sustainable solution; it usually only works for two cases:

  • simple applications that are never updated
  • complex applications that look and behave nothing like the platform they run on
3 Likes

Rest assured you aren’t the only user who has said that, and there are some vague ideas about defining a new and simpler format to supplant XML, but as of yet no one has stepped up to do the work. Hopefully one day it’ll happen!

1 Like

Blueprint remains ostensibly experimental but is used by a number of apps as an alternative to writing GtkBuilder XML. Check out Workbench for many examples.

4 Likes

Currently there are extra tags for childs and properties. Only using xml childs and properties instead could already be a part solution.

Although I don’t mind handwriting XML UI files and do so regularly, I think the solution here is to develop tools to make it easier for human beings to generate this XML, which has traditionally been a format that is best suited to being read and written by computers.

Previously we had glade which is no longer continued for gtk4.

But we do have Cambalache which looks promising, though I’ve never used it.

Once you have the UI laid out, writing the callbacks is then pretty straightforward especially for simple apps and can be done in a plethora of languages.

Cambalache looks good.

And what when it’s not a simple app? Than you have a problem.

And yes, there are many languages, but for example for typescript I found nothing and for JavaScript it’s very weird.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.