All of the code which can be generated with Generato are structured into Bundles and Templates. You can use on of our predefined bundles, duplicate them and customize them to your needs or create your own ones from scratch.
In Generato Bundles appear as a collection of Templates or other Bundles. All of the Bundles contain their name, a directory-path (which can be defined with text or placeholders) and their description (which also be defined with text or placeholders).
The Root-Bundle is the Bundle which which can be selected in the project-overview and contains all of its Sub-Bundles. The description of this Bundle will be shown as the installation-guide in the project-overview. With its selection all the containing Sub-Bundles including their Templates will be arranged into your Project and its parts.
Sub-Bundles are arranged into the root-bundle and contain some other Sub-Bundles or the Templates. Their Path will be added to their proceeded Bundle-Paths.
At Generato, Templates represent the result code files that consist of real code elements complemented by generalized placeholders for variables. The formulation with the placeholder syntax allows you to re-use your code for as many projects as you'd like - without having the struggle to write the similar code over, and over again. We provide a variety of Bundles by default, that you can easily duplicate into your own library and modify them to your own needs and requirements.
Templates can be inspected or edited in the Bundles tab, to which you can navigate using the tab in the header bar. Templates can be defined for different levels in Generato. You decide whether you want to add a project-wide Template or Templates for the different level of visual elements in the Backend or Frontend Graphs.
For creating a new Template, navigate to the Bundle-Editor using the respective Header tab. In the Navigation bar on the left side of your window you can create new bundles from scratch, import your existing code or duplicate our bundles to your private library. Just click on the blue icon next to the Stack you want to duplicate and the Stack will be copied to the "My Bundles" section and automatically open itself. We recommend to use our Bundle for an orientation in the beginning.
Now you can select a specific Template from your Bundle using the Bundle-Tree on the left of your window. New Templates can be added by navigating to the containing Bundle and clicking on the Create Template button at the bottom of the Overview tab.
In the Overview tab of your new Template you can start with selecting the supposed level of the Template. As mentioned before, Templates can be created for the entire project or the Backend or the Frontend Graph. Next you can set a name for your template, the given file-name (through the placeholder-syntax), start describing its functionality and select its programming language. If you are missing a language, please contact us.
You can specify whether your Template should be hidden or auto-added. If a Template is hidden it won't be shown in the list of available Templates when adding Templates to your project or GeneratoGraphs. If the Template is visible, you can enable the auto-add feature. Depending on the selected level, your Template will be automatically added to your project or the depend visual element.
The level selection available for the auto-add feature will differ according to the Template-level specified in the first step of creating a Template. For example, if you decided to create a Backend-Template, you could specify whether the auto-add will be triggered for any Model element or only for each Entity, Enumeration or Both of them. There is one special case: If the auto-add level Entity is selected for a Model-Template, you have the option to further specify whether the Template should only be added to Root-Entities. Root-Entities are Entities which are not embedded in other Entities, i.e. do not have any embedded relationships.
When you enable the modification of the syntax, you may also customize the Syntax used for your placeholders
Once you are done with setting up the basics, you can start working on your template code. Navigate to the Code tab.
On the left side of the Code window you can find your Template Code with the placeholder syntax. On the right side you can find the actual code result which can be generated by clicking on the Test Result button. The Code-Editor has some basic Highlighting and suggests you placeholders you could choose from to fill in the visual informations.
I want to customize my Templates
With Generato that is possible. Visit the Bundle-Section (in the the navigation-bar) and select the Bundle you want to edit. You can duplicate the rooted bundle or one of the sub-bundles to make it private accessible. After that you can go into that newly created Bundle and apply your changes to your template. When you're finished add you bundle-in the project-overview and change the related template-selection in your components.
Regenerate your code countless times
Editing your generated code result has never been that easy. With Generato you can add custom code to the generated code components or modify/ add visual elements and regenerate your result without loosing your previously added custom code.
Custom code can be added to your source code wherever you find indicators for the so called Protected Areas. We have a dedicated guide on how to add and use custom code here.
Learn more about it here