Scope: managed applications, mobile applications, and ordinary applications.
If behavior of forms or commands depends on the same values (parameters specified by users or other settings of the client application behavior), we recommend that you use common modules with repeated use of return values to minimize client/server interactions ("Return values reuse" property is equal to "During session"). The use of such common modules is allowed if the change in the respective value during the session is not critical, i.e. during the whole session the once received value can be used.
Functions of such common module must return all required values in one call.
For example, if during use of all forms of the employee occupation registration subsystem, user parameters "Default occupation time", "Workday start time", and "Workday end time" are required, get all these parameters within one call that returns a structure with three properties:
Settings = RegistrationSubsystemSettings();
BeginTime = Settings.WorkdayBeginTime;
EndTime = Settings.WorkdayEndTime;
Remember that the use of client common modules with reuse of return values must be reasonably limited. In particular, we recommend that you place data affecting the behavior of some forms in attributes of the form itself by receiving them when creating the form on the server. Only if behavior of commands or a large number of application forms depends on a certain value or values, use common modules with repeated use of return values.
We do not recommended that you use variables of the managed application module and the ordinary application module to minimize client/server interactions.