Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
styleupper-roman

Stoc

Introduction

With Servoy you can develop your application by using a modular design. This means that you can separate objects from eachother by storing them into different solutions and attaching them to one another. Basically, the idea and advantage of this concept is that it allows you to reuse resources instead of having to define and maintain them more than once. Servoy allows you to reuse:

  • Forms
  • Variables
  • Methods
  • Relations
  • Value lists
  • Media

Solution Types
Anchor
solution_types
solution_types

Servoy distinguishes several solutions types of which solution and module are the most important terms. However, not all of them allow sharing of resources and are meant to be executed standalone.

Type

Meaning

Allows resource sharing

Normal

Can be used and started as a regular solution or attached to another solution and/or module as a module.

Yes

Module

Can only be used as an attached module to a solution and/or module.

Yes

NG ModuleCan only be used as an attached module to a NG Solution and/or module.Yes
Mobile ModuleCan only be used as an attached module to a Mobile Solution and/or module.Yes
NG ClientCan be used as a regular solution, but can only be deployed into the NG Client or attached to another solution and/or module.Yes

Web client only

Can be used as a regular solution, but can only be deployed into the Web Client or attached to another solution and/or module.

Yes

Smart client only

Can be used as a regular solution, but can only be deployed into the Smart Client or attached to another solution and/or module.

Yes

MobileCan only be deployed into the Mobile Client Yes
ServiceCan only be deployed into the Headless Client (batch processor, rest service provider)Yes

Login

Can only be as an attached module specifically for the login UI.

Yes

Authenticator

Can only be used as a standalone module which executes security logic server-side.

No

Pre-import hook module

Can only be used for automatically executing business logic before the top solution is imported into the Application Server.

Yes

Post-import hook module

Can only be used for automatically executing business logic after the top solution is imported into the Application Server.

Yes

...

Note
titleNote

For information about the solution types login and authenticator, check out the Enhanced Security section.

For information about the solution types pre-import hook module and post-import hook module see the maintenance plugin page.

You can define the solution type by selecting one at property solutionType at the property sheet of the active solution.

Solutions and

...

Modules

To attach modules to a solution, you can select all applicable modules at property moduleNames at the property sheet of the active solution. By doing so you can now expand the Module node of the active solution in the Solution Explorer and access all objects of each attached object. You can also maintain objects from modules and copy and move objects between solutions and modules.

...

Note
titleNote

The way how your application has been designed by using modules is not relevant anymore during deployment. At this point the collection of solutions and modules have become one flat solution.

Form

...

Inheritance

Another way of reusing objects is by form inheritance. Servoy allows you to extend forms by other forms. As forms contain UI as well as variables and methods, all of this can be inherited and thus reused.

Note
titleNote

For more information about inheritance, check out the Inheritance section.

Best

...

Practices

Servoy allows you to use its modular design in any way that you want. However, there are some best practices which can help you as a guideline to make better use of it.

Basic

...

Core

When you develop multiple projects then there is most likely some functionality you want to use for all your projects which does not depend on any database connection. Think of logic like e.g. math function, date calculations, procedures for sending notifications and perhaps some general icons. This kind of logic is very suitable to store in a core module. Whenever a new project is started, this module will be the main building block on which the rest of your solutions and modules which be based upon.

Project

...

Core

Bigger projects are usually developed by using multiple solutions which are executed independently and/or connected by a main solution. It's most likely that these solutions share certain objects like e.g. relations, calculations and project-specific media. These objects can be stored in a project core module and can be attached to all the other project solutions.