App components and gui module - should we continue using it?

First of all, I’m not sure if this is the correct category to post in (maybe Add-ons, even if it’s a general Q and not tied to any specific add-on?).

Now the real question:

I have just completed a component/add-on (OT: we should definitely stick with ONE name here…) that is 95% developed in the gui module.
Now today, to my surprise, I realised that Studio will stop adding the gui module to new projects, and one should add it if required.
To my understanding the gui module is, more or less, there to support projects that target (or wish to) both web and desktop environments. So, in the end, is pretty much useless for those willing to target only web (the 99% of CUBA users?)

Now the dilemma of a component developer:
Should I stop putting generic code in the gui module, and use only the web one, because:

  • this is your first step towards the deprecation of the desktop module
  • desktop user’s base is so tiny that I shouldn’t bother giving them my components

OR

I continue as before putting as much code as I can in the gui module (that is, when I see something that can be generalised, I usually put it in the less specific module, the gui one), and force the consumers to add the module if missing in their project, only to be able to use my component(s)?

Thanks (and move this to another category if you see fit)
Paolo F.

Hi Paolo,

First of all, thank you for your great contribution and for raising these concerns.

I would recommend putting your add-on UI code into gui module as long as it takes no additional efforts from you. This will enable the add-on for both Web and Desktop UI users. You are not quite correct in that it will require adding gui module in the target projects: your add-on’s web and desktop modules depend on gui, and project’s web module will depend on it transitively. So the gui module in the project is not strictly needed.

We decided to not create GUI module for new projects by default just to declutter the project for the majority of users. Also removed useless extra.gradle by the way.

As for the terminology, we have decided to name these things “add-ons”, while “app component” is a more technical or architectural term - cuba itself is also an app component in this sense.

Moved to Add-ons category - probably it’s a better place for this topic.

Hi, thanks for you response

Unfortunately I’ve just migrated it from gui to web module :persevere:
For some strange reason it stopped working when migrating a container project to 6.9, but then I realised that re-creating the projects from scratch resolved my issue… but in the meantime I migrated everything into the web module!

I just submitted the add-on (dynamic-columns) to the marketplace, but I can revert it back to the gui module and re-publish everything. I’m a bit short of time now, so I don’t know when I’ll have some time to do it.

Bye
Paolo

I think it’s not a big deal - the percentage of desktop users is really tiny and they will probably let you know if they are interested in the add-on.