• +381641430769
  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Bring Idea into Life
with No Limits

Easily build modern web applications with highly flexible Visual Tools 

Image

 Setup Configuration

 

 

 

What’s this for?

 

Imagine that you are developing some application on the PostgreSQL database and you found a potential customer that wants to buy your application but only if you make it on the Oracle database. You would like to control which applications/modules/resources and what data in tables should be available on the customer's new database.

 

How would you do this?

 

You have a specialized tool that will transfer data from PostgreSQL to Oracle”

 

What about other databases, if your other customer wants IBM DB2 instead?

 

You are using Hibernate to auto-create tables, then you export each table to SQL insert statements and finally adjust nonstandard SQL (date, time etc. types) manually”

 

Hibernate is not easy to configure to create exactly what you want and the manual process can be very slow and error-prone especially when you have a lot of tables.

 

You are writing DDL and SQL insert statements manually”

 

You know it should be a better way to do it.

 

Codeless Platform offers an alternative approach. It is simple, powerful and technology (database vendor) independent as to everything else in the platform. Instead of exporting and importing SQL statements that are vendor-specific for specific data types like date and time, we are using YAML format: https://en.wikipedia.org/wiki/YAML

 

We will present you with a simple and powerful approach that we are using in Codeless Platform. 

The process of setting up your application on an empty database is explained in the following image:

 

 

 

 

Codeless Platform has the ability to start itself on completely empty database without any table in it.

The Platform will in the base step recognize the database vendor and create all tables automatically. 

Once the tables are present, the platform will populate the system tables needed to show the installation screen. 

After entering required data on the installation screen like license file, workspace and resource path, the platform will go to the second step called setup. 

the Setup step will populate all tables needed for the SECURITY application including meta forms, translations, menus etc. and will create an initial user login. 

When the setup step is done, the user will be presented with login screen. 

Once logged in the platform, the user can import any application as a single zip file that contains everything you need from the model, application, forms, menus, form data, predefined security, images, reports etc. 

 

You can find Setup Configuration Tool in Security > Setup > Setup configuration.

 

 

Base configuration

 

 

   

The base setup is configured to import only the minimum data to system tables in order to run setup dialog – Installation step. 

Each time the “Build” command is clicked, the system will export all necessary data to YAML files that the system will read to populate the database table when the platform starts on an empty database. Also, DDL creates statements will be created according to the latest state of models.

 

 

Setup configuration

 

 

  

 

This step will do the same as the base step but with additional forms and other data so that your system can start normally. In this step initial user login will be created according to the data entered in the Installation setup dialog. 

After this step, the platform will have a login screen and SYSTEM application where you can administrate users, create menus, set permissions and most importantly you will be able to import applications. 

As with the base configuration, you need to “Build” your setup configuration.

 

 

Exporting applications

 

Let’s explain this with a concrete example. We want to export the PetClinic application.

 

  

From the image above, you can see that this “configuration” is created for the application: PetClinic. 

On the right side you can see the tab “Forms” where all forms you want to export with this application are listed like: 

  • PetType, Speciality, Vet, Owner and Pet. 

This means that all data for these forms will be exported because there are no filters present. For example for PetTypes form, table PET_TYPE will be exported with data like: cat, dog, horse etc.

 

Note that for Vet all VetSpecialties will be exported as well, you do not need to export VetSpecialties separately.

 

  • Application with filter: name = “PetClinic”

 

This will export one record from table APPLICATION where the name is “PetClinic”.

 

  • Message with filter: “application.name = ‘PetClinic”.

 

This will export all translations from table MESSAGES for all forms used in the PetClinic application.

 

  • MetaForm with filter: application.name = “PetClinic”

 

This will export all meta forms that belong to the application “PetClinic”.

 

  • Model with filter: name = “demo”

 

This will export all models, packages, entities that belong to model “demo”.

 

Note that you do not need to specify all children of the entity Model, you just need to specify the master form and the system will do the rest automatically. It will export all children that are present in the Model form hierarchy.

 

Next to the “Forms” is the “Resources” tab: 

 

 

  

As you can see, the only thing to do here is to specify the name of the directory relative to the root of RESOURCE_ABS_PATH with resources. 

images/PetClinic” means that everything inside this directory and all subdirectories recursively will be exported. 

We can for example add the following:

 

reports/PetClinic”

 

That would export all report templates (word, jasper, etc.) for all forms in the PetClinic application. 

If you do not want to export all reports for PetClinic but only for Vet form, you can add the following instead of the previous entry:

 

reports/PetClinic/Vet”

 

Everything you add as a resource will be zipped in the resources_setup.zip file. 

When you are finished with the configuration, you can save it and click “Export”. 

The export command will create a YAML file for each form you specified and together with resources_setup.zip that contains all resources (images, templates, etc.), pack everything together in a zip file. 

Wait a couple of seconds for processing to finish and you will be able to download the resulting zip file: 

 

 

  

If you now take this zip file and import it to some other server that runs on the different database you will be able to import a complete application with all the data and resources in less than a minute.

 

  

Importing applications

 

To import applications you are using the same tool. Open Setup Configuration, click on the button “Import” 

 

 

 

Drop zip file from desktop or click browse and select it. Wait for the import process to finish and you are ready to use a new application. 

Note that, the configuration process will not export/import any controller or business logic code. 

 

 

 

Learn How to use
Setup Configuration Tool

Watch how easy is to import the PetClinic application on a server where this application did not exist before

Bring Ideas into life with CodeLess Platform

Please publish modules in offcanvas position.