Desktop version

Main > Knowledge Base > Knowledge Base > Knowledge base > Practical developer guide 8.3 > Lesson 5 (2:00). Theory > Modules > Module types > Practical developer guide 8.3 > Lesson 5 (2:00). Theory > Modules > Module types

Module types

Configuration can include various module types. The modules can belong to certain objects (such as forms), or they can exist independently (belong to a configuration as a whole).

The platform uses the script stored in the modules at predefined points of 1C:Enterprise operation. These points are referred to as events and we have discussed them earlier.

The following module types are available in 1C:Enterprise.

1. Managed application module. It is executed when 1C:Enterprise is started in a thin client or web client modes.

You can declare variables and define procedures and functions in this module, and they will be available to all configuration modules (except the external connection module). They are also available for nonglobal common modules with the Client (managed application) property enabled. Exported procedures and functions of common modules are available in the managed application module context.

To open a managed application module

2. Common modules. They store the procedures and functions that are called from other modules. A common module itself is never executed, it simply stores the procedures and functions.

To open a common module

3. Object modules. Examples of such modules are a catalog item module and a document module.

An object module is called when an object is created using 1C:Enterprise script (for example, the CreateItem() method of a catalog manager is called, or the CreateDocument() method of a document manager), or when a user creates an object (for example, a catalog item or a document).

When modified object data is recorded to the database, event handlers located in the object module are called.

For details on the event sequence during the writing of modified configuration objects, see chapter Quick developer reference.

To open an object module

4. Form modules. Each form that is defined in a configuration has its own module. This module is executed when the ManagedForm object of 1C:Enterprise script is created. The platform creates this object in 1C:Enterprise mode when a form is opened either using 1C:Enterprise script (the GetForm() or OpenForm() method) or interactively.

To open a form module

5. Session module. It is executed when the configuration is loaded during 1C:Enterprise startup. A session module is intended to initialize the session parameters and execute the session-related actions. It cannot contain exported procedures or functions. It can call procedures from the common modules.

To open a session module

6. External connection module. It is intended for storing functions and procedures that can be called in an external connection session.

To open a session module

7. Manager modules. Each application object has a manager that manages the corresponding configuration object. Using this manager, you can create objects and perform operations with their forms and templates. A manager module allows you to extend the functionality of default managers provided by the platform by writing procedures and functions in 1C:Enterprise script.

In fact, this allows you to define custom methods for a configuration object (for example, a catalog) that do not refer to a specific database object instance, but rather to the configuration object itself.

To open a manager module

8. Command modules. The entire configuration and its applied objects can have subordinate configuration objects referred to as Commands. Each command has a command module. You can use this module to create a predefined CommandProcessing() procedure, which is called when the command is executed.

To open the module of a command subordinate to a configuration object

Next page: Form module context



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.