Modules

Overview

The modules node shows all modules of active solution. Any solution can also be a module to another solution or have its own sub-modules. The modules system is used in order to organize your code, at runtime, in client, all the code and object model is flattened (merged together).

Defining a Servoy solution as a "module" enables you to:

  • Add "components" to existing solutions.

  • Add modules to other modules.

  • Develop parts of a Servoy solution separately and then combine them later.

  • Reuse GUI (graphic user interface) objects and business logic in multiple solutions.

Modules and naming

If the name of the module solution; and/or the name of the form(s) in your module; and/or the name of the global method(s) in the solution are not unique, the module will not function correctly and/or will not load when added to a solution.

When using naming criteria for/in Servoy modules, it is important to know:

  • Each Servoy module must have a unique name. (Remember that solution names are also case sensitive.)

Suggestion:

mod_<your solution name>
(Replace <your solution name> with the name of your module solution.)
  • Each Servoy module form name must also be unique.

Suggestion:

mod_<your solution name>_<your form name>
(Replace <your form name> with the name of the desired form.)
  • Each global method name in a module must be unique.

Modules behaviors

The following is a list of module behaviors to be aware of:

  • Global dataproviders with the same name and used in module solutions must have the same data type. This restriction does not apply to the global variable(s)/form variable(s) declared "on the fly" in a Servoy method (script).

  • Calculations with the same name and used in module solutions must return the same data type.

  • Value lists with the same name and used in module solutions must return the same data type.

  • Relations with the same name and used in module solutions must be assigned the same Primary key and Foreign key (the left and right side of a relation respectively).

  • Media that has been imported into a module media library can be accessed by the solution that contains the module as well as any other modules that have been added to that solution.

  • i18n values that have been added/changed in one module can be accessed by the solution that contains the module as well as any other modules that have been added to that solution if there is a common database server connection and i18n table.

  • Security groups with the same name (such as "Users") that have been configured for any solution or module that has been added to that solution will be combined.

Commands Summary

A summary of commands available on this item via right-click context menu

CommandSummary

Create new module

Add module

Opens dialog editor to choose solution modules

Commands Details

The details for each command available on this item via right-click context menu

Create new module

Opens the New Solution Wizard to create a new solution with Module type that will also be added as module.

Add module

Opens dialog editor to choose solution modules.

Last updated