Getting started
Last updated
Last updated
To start using Telosys, simply follow these 4 steps:
When Telosys-CLI starts nothing is defined ( no "home directory", no "model", no "bundle", etc...)
You can use the env
command to see the current Telosys environment.
With the command h
you can see that the "home directory" is not yet defined.
When Telosys-CLI starts its current directory is the directory where it has been launched
Use pwd
to print the current working directory
Use cd
to change the current directory
Once your are in the correct directory (the directory where you want to work with Telosys) you can use the h
command to set the project's home
Example 1 : use the current directory "." as HOME
Example 2 : use the "foo" subdirectory as HOME
Once Telosys HOME is defined the prompt contains a "#"
Once the "home directory" is defined, you can initialize the Telosys projet.
For that just run the init
command
This command creates the "TelosysTools" folder containing all the Telosys files and subfolders.
Each project can be configured, for example, to define project-specific variables or to define the directory where the generated files must be created.
All the configuration of a Telosys project is defined in the "TelosysTools/telosys-tools.cfg" file. You can edit the "telosys-tools.cfg" file with your favorite text editor.
To print the current configuration, use the cfg
command.
To edit the configuration file with the Telosys-CLI default editor use ecfg
command.
If you want to try Telosys quickly you can continue with the default configuration.
To generate application code, you need a model containing the entities of your business domain.
There are 3 ways to set up a Telosys model :
create a new model from scratch an empty model in which you can then create the entities you need
create a new model from an existing relational database : a model created from the database schema (1 entity for each table)
install an existing model from a depot download and install a Git repository containing the model
Once you have a model you need at least one bundle of templates to generate your code.
The templates are organized in "bundles". A "bundle" is a set of templates designed to generate a particular kind of targets.
Once you have a valid model and a least one bundle of templates, you are ready to generate your code.
To generate your code you can use the following commands:
gen
to generate code with the current model and the current bundle
genb
to generate code in "batch mode" (since ver 4.1.0) with multiple models and/or bundles
For more information about project configuration see .
For more information, see pages "" and ""
To manage your model and its entities you can use "Model commands" and "Entity commands". See "".
Of course you can create your own templates from scatch, but the simplest way to start is to use existing templates. To do so, see ""
To manage your bundles of templates you can "Bundle commands" and "Template commands". See "".
See "".