devonfw / cobigen

Code-based Incremental Generator
Apache License 2.0
36 stars 72 forks source link

Improving usability on increment selection level #772

Open jdiazgon opened 5 years ago

jdiazgon commented 5 years ago

Expected behavior

As a user of CobiGen, I want that when I select one increment, the rest of increments that does not make sense to generate with it get disabled so that usability improves and our user can make less mistakes.

Actual behavior

For instance, when a user selects the increment CRUD REST services (CTOs) it does not make sense to let the user select CRUD REST services increment too as this could lead to compilation errors or a slower generation.

I would propose to automatically disable those increments (disable the checkbox) that should not be generated in combination with that increment.

Use Case of feature request (enhancement)

  1. User selects increment related to CTOs generation.
  2. Increments related to ETOs should be disabled.
maybeec commented 5 years ago

I was already thinking of that. Maybe we should introduce one or two basic structuring increments. For example, make one increment "crud application" which contains all except test builder and cto stuff. Then create one increment "CTO service" and put the increments for CTOs + CTO logic + CTO service in there. Maybe that helps.

The general request you are making is a dependency mechanism between templates, which is rudimentarily existing by referencing one increment by another. Anyhow, this would have an impac on the UI.

We may want to discuss this at the community event. I think we definitively need some rework here to make CobiGen smarter and more useful for projects not entirely wanting to generate a devon application, but just parts of it, i.e. scaffolding is one essential part of that.

jdiazgon commented 5 years ago

For example, make one increment "crud application" which contains all except test builder and cto stuff.

That is a quick and nice solution that improves usability.

In the other case, I was thinking about a naive solution. Maybe to hard code the list of increments that shouldn't get generated in combination. The advantage is that it is not very perfoming (just looping through a list of 6 elements) but it makes the code less maintainable...