Child pages
  • Modular Development

Versions Compared

Key

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

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

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.

...

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.