Treat studio scaffolding templates as development assets


i’ve a question about the templates for studio. Currently the templates are placed in the installation directory of studio. In my opinion this has two major drawbacks:

  • template adjustments can’t be easily shared between teammates within the same project
  • templates have to be moved on every studio update (which happens quite regularly fortunately) - this is at least in the zip installation of studio the case

On the other hand it will stay the same across different CUBA projects.

To resolve this, a possible solution would be to place the templates in the sources of the project (this is actually not my idea, but i know that from the grails command line, which basically do the same, see grails install-templates). Studio would pick up the files in this case from the sources.

To resolve the drawback of not sharing it across different projects, a cool thing would be to be able to create a app-component that contains the templates and every projects that includes the app component, the templates will be picked up from the component.

I don’t really know if this is technically possible, more like a idea from a users perspective. Perhaps it would be possible to let the user decide where to put the template so it’s up to the user to decide what way to go.

What do you think?


Hi Mario,

This is exactly what we are working on now. In Studio 6.4, there will be two types of templates: built-in and custom. Built-in templates are stored in the Studio installation directory. Custom templates can be created by copying and modifying other templates and they are stored in a directory inside the project.

However, sharing templates between projects is out of scope yet - you will have to copy them manually or via some non-trivial VCS setup. Perhaps we could make a setting in Studio, for where to store custom templates. Then you could create a separate VCS project just for templates. Some organizational rules will still be needed - all developers should checkout templates project when someone makes changes in it. What do you think?

And one major limitation: this is all about screen templates only. Other projects elements will be generated by built-in templates yet.

:ticket: See the following issue in our bug tracker: