1c software interface control controlled application. Parameterizable and independent commands
When reading the previous article Managed command interface of the 1C Accounting program 8th ed. 3.0 - the first acquaintance, you probably noticed that we never talked about special interfaces for this or that user. They didn’t say it because they simply aren’t in the 1C Accounting 8 edition 3.0 program.
Most likely, this will surprise users of the 1C Accounting 8 edition 2.0 program. After all, it has such interfaces.
- Accounting.
- Personal income tax of an entrepreneur.
- Administrative.
- Full.
That's true. So what? What did these interfaces give us? Let's say that in the accounting department there are two more accountants in addition to the chief accountant. One deals only with banking and cash transactions, while the other keeps records of fixed assets. In this case, it was necessary to invite a programmer to develop specialized interfaces for each of these users. Only a specialist who knows the configuration well can create and correctly describe new roles and rights. Of course, such changes are only possible if the configuration is removed from support.
On the contrary, in the 1C Accounting program 8 ed. 3.0, the user can independently or with the help of a more trained colleague create the command interface necessary for his work. Let's look at some examples of how this is done.
1. The command interface is a managed 1C interface
Command interface in the 1C Accounting program 8 ed. 3.0 is a managed interface. This means that the user can independently manage it directly in 1C Enterprise mode. Yes, it is the user, and not just the programmer in the Configurator mode.
To do this, on the system command panel, in the main menu there is a “View” item, which provides access to commands for editing managed interface panels.
Only two commands require explanation.
- Section panel. Enables or disables the display of the partition panel on the command interface.
- Navigation and Action Bar. Enables or disables the display of the navigation bar and action bar on the command interface.
2. Create an interface for the calculator
Let's look at creating and setting up an interface using a simple example. Let’s say that our user needs only two sections to work: “Bank and cash desk” and “Employees and salary”. You can delete unnecessary sections in the form, which can be called up using the command “INFORMATION PANEL\Main Menu\View\Setting the Section Panel”.
Using the “Delete” button, delete sections that our user does not need. Leave only “Bank and cash desk” and “Employees and salaries”. After saving the changes (OK button), we get the following interface.
Pay attention to the “Show” attribute in the “Setting the section panel” form. It allows you to display sections not only as images with text. For example, they can be reflected only with text, as in the figure.
This feature can be very useful for those users who work with small screens.
3. Set up the interface for the cashier
Let's set up an interface for a cashier who deals only with cash transactions. We will assume that the administrator has already created the “Cashier” user and granted him the appropriate rights.
First, we note one important feature that must be taken into account when creating your own interfaces.
Whenever you start a program again, it always automatically opens in the “Desktop” section.
You can completely disable the section panel display mode or leave only one section in it, for example, “Bank and cash desk”. Or you could complete the work, for example, in the "Purchases and Sales" section. Doesn't matter. Whenever you start the program again, the “Desktop” is always updated. It cannot be removed.
Thus, if we need only one accounting section, for example, “Bank and Cash Office,” then it will not be possible to display only it in the sections panel. The “Desktop” section will also be displayed along with it. In our case, this is showing links that the cashier does not need.
Let's proceed as follows. Activate "Desktop". Notice that there is a command link for “Cash Documents” in its navigation bar. Let's edit the navigation and action bars for the Desktop section.
To edit the navigation bar, run the command “INFORMATION PANEL\Main Menu\View\Customize Navigation Pane”.
By manipulating the “Add”, “Add All”, “Delete” and “Delete All” buttons, leave only the “Cash Documents” navigation command in the right window.
Now let's edit the action bar of the desktop section. To do this, run the command “INFORMATION PANEL\Main Menu\View\Customize Action Bar”.
When manipulating the Add, Add All, Remove, and Remove All buttons, leave only the commands outlined in red rectangles in the right window.
We assumed that our organization is not engaged in retail sales. Therefore, the cashier does not need the “Retail Sales Report” document. We also assumed that the cashier does not need standard accounting reports. Therefore, we also removed them from the action bar.
Using the command “INFORMATION PANEL\Main Menu\View\Partition Bar”, disable the display of the section bar. Quit the program and reopen it as a cashier. This is what its interface will look like.
Nothing extra! Only the documents necessary for the cashier and two reports. If necessary, he can open a list of cash documents by clicking on the “Cash Documents” navigation command. It is located on the navigation bar.
4. Interface of the 1C Accounting 7.7 program
1C developers are well aware that no matter how good the new interface is, many of us live by the principle: the best is the enemy of the good. So, when switching from the 1C Accounting 7.7 program, you can often hear. I don’t understand anything about the new interface, I don’t have time to figure it out, I have urgent work.
Such users can install 8th edition in their 1C:Accounting program in a few clicks. 3.0 is the seven interface that he loved so much. It looks as shown in the picture.
Externally, of course, it differs from the original seven interface. But structurally everything is the same.
You can enable the seven interface only if the “Bookmarks” mode is set in the program for opening object forms. It is installed in the “Options” form, which is called by the command “System Command Panel\Main Menu\Tools\Options”.
Then, in the section panel, activate the “Administration” section and click on the “Program Settings” link in the action bar.
In the “Program Settings” form that opens in the work area, go to the “Interface” tab and activate the radio button “Interface similar to 1C: Accounting 7.7”.
All. Save the result by clicking OK. Work with the seven interface you are familiar with. At the same time, do not forget to take the time to master the original interface in the demo database. When you get used to the native interface of the 1C: Accounting 8th ed. 3.0, then you can restore it very quickly.
To do this, on the section panel, click on the “Service” link. In the navigation panel, click the “Program Settings” link. Activate the “Interface” tab and specify “Standard interface 1C: Accounting 8”. And, of course, OK.
6. Managing object shapes
Program 1C Accounting 8 ed. 3.0 provides the user with more than just the ability to control the command interface. It can also control the shapes of individual objects. These are forms of journals (lists) of documents, forms of the documents themselves and reference books. To manage these forms, there is an “All Actions” button in the upper right corner of a form opened in the workspace. And there is a command “Change shape”.
Of course, the programmer has more options when creating object forms. Nevertheless, let's look at one simple example.
Initially, the form of the document “Invoice for payment to customers” looks as shown in the figure.
Now let’s assume that our organization is engaged only in providing services. Therefore, we do not need the “Warehouse” and “Delivery Address” details. In the tabular part, we also do not need the “Products” and “Returnable items” bookmarks. To get rid of them, click on the “All actions” button and select “Change form”.
If the branch we need is not opened, then click on the cross. It's in the circle to the left of the branch. Then remove the flags from those details and pages that we do not need.
In the same way, you can modify the command panel of the documents form. Let's make the following changes. First, expand the “Command Panel” branch.
- "Swipe close" button. Now it only displays text. In the “Form Settings” form, on the “Command Panel” branch, select the “Post and Close” branch. In the window on the right, assign the “Display” attribute to the value “Picture and text”.
- “Record” and “Subordination Structure” buttons. For these buttons, also assign the “Display” attribute to “Picture and text”.
- Frame around hats. For beauty and clarity, the left and right headers can be outlined with a frame.
Ultimately, we will get the following form for the document “Invoice for payment to the buyer”.
For cautious users, I would like to note the following.
Attention. Don't be afraid to experiment with object shape settings. They do not change the accounting contents of the infobase.
Of course, it is better to train at a demonstration base. But, if you didn’t like something in the working database when setting up a form, then there is no need to consistently restore the original state of the form.
To do this, on the object form, execute the command “All actions \ Change form”. The already known “Form Settings” will open. In it, execute the command “All actions \ Set standard settings”.
7. Reporting errors
Program 1C Accounting 8 ed. 3.0 controls the completion of mandatory details. However, previous editions did this too. But unlike previous editions, diagnostic messages of 1C Accounting 8 edition 3.0 have become more informative. They show which details contain errors and which ones.
For example, novice users often make this mistake. They try to fill out document details not by selecting them from relevant directories, but by manually entering the required values. The figure shows that the user manually entered Zarya LLC in the “Counterparty” attribute. Such a counterparty is the 1C Accounting program ed. I didn’t find 2.0 in the “Counterparties” directory. Therefore, when writing the document, she reported an error as shown in the figure.
But, if the user has not been trained, if he does not know that most of the details are filled out by selection from the relevant directories, then such a message will cause him nothing but bewilderment.
And here is how the 1C Accounting ed. program reacts to the same error. 3.0.
Here the program does not just say that the entered value is incorrect. It will tell you that the value was not found. It’s easy to guess where it’s not found if you click on the “Select from list” button.
In forms with a lot of required details, there is always a chance that some of them will be missed. In this case, the program will also display informative messages. At the same time, it will show where you forgot to fill in the details.
There are two ways to move from error to error. Either by using the navigation arrows in the diagnostic message or by clicking on the links in the message bar.
That's probably all. I hope that the managed command interface of the 1C Accounting program 8th ed. 3.0 will not be a stumbling block when mastering this program. It is indeed more convenient, but you need to spend a little of your precious time to master it.
When a user logs into 1C in Enterprise mode to start working, the first thing he sees is the program interface.
In programming under the word interface may have several different meanings. We now mean “user interface”.
The user interface is all the windows, menus, buttons, etc., with which the user works directly in the program.
Interface design is the font, color, background image and other decorative elements used. Design does not affect the composition of the interface.
The 1C platform implements two different user interface mechanisms, which are used in different . The 1C thick client has its own interface, the thin client (and web client) has its own.
Let's talk today about the 1C user interface.
Interface 1C
The 1C thick client interface looks like this.
It includes:
- Main menu
- Panels.
The desktop used in some configurations (accounting, payroll) is not part of the 1C interface; it is a processing that is done separately by the programmer and which opens in 1C full screen at the time of entering the program.
In the configurator, the 1C interface is located in the General/Interfaces branch.
The programmer creates a 1C interface with a specific name and, when creating a user, specifies the default 1C interface for this user.
In the 1C interface properties there is a “Switchable” checkbox. If the 1C interface is not switchable (the checkbox is unchecked), then all users can see it, even if they are assigned a different 1C interface. In this case, the user sees both interfaces merged into one.
When adding a 1C interface, you see a list of panels. There is always a default panel; the main menu of the program is located on it.
If you add more panels, they will be displayed as panels (with buttons).
When adding a new 1C interface from scratch, a constructor opens that helps you design a menu by checking the required objects.
When editing an existing menu, items are added individually, since when the constructor is called again, it recreates the menu from scratch.
When adding a top menu item, in the properties you can select one of the standard menus - File, Operations, Tools, Windows, Help.
After adding a button or menu item, you need to select the action to perform. Action can be of two types.
If you want a 1C object to open as a result of clicking - a directory, document or report - you need to click the button with three dots and select the desired object, as well as the desired form (possible action of the object).
If you want an arbitrary command to be executed as a result of pressing, click the magnifying glass. The function can be located in . After selecting a module, a handler function will be created in it, and the module will be open for editing.
Managed command interface 1C
In the new version of 1C 8.2, new types of clients have appeared - .
The 1C thin client interface looks like this.
The 1C web client interface looks like this.
Ideally, they are the same, and, as you can see, they are very different from the 1C thick client interface.
It now consists not only of menus and panels, but of:
1) List of accounting sections
2) Navigation through the selected section
3) Commands to execute in the current section
4) Forms for performing the current operation.
To create the 1C managed client interface, “Interfaces” are no longer used; it is formed in a complex manner, based on many settings made in the configuration.
The fact is that now the 1C interface is the same for all users and at the same time dynamic, working depending on the set of user rights and the commands available to him to execute.
We can also say that it is formed on the basis, therefore it is also called the 1C command interface.
1C subsystems
The basis of the 1C managed command interface is the list of accounting sections. For example - money and goods, two sections of accounting.
In the configuration, the 1C Subsystems object, which is located in the General/1C Subsystems branch, is responsible for the accounting sections.
Having created a 1C subsystem, in the necessary reference books and documents, on the 1C Subsystems tab in the object designer, you can include them in this 1C subsystem. This means that they belong to this section of accounting. Objects can be included in several 1C subsystems.
21. Managed interface.
Although the managed command interface in 1C appeared quite a long time ago, and there is plenty of information about it on the Internet, I will take the liberty of writing about it again. In the concept of a managed interface, 1c tried to move away from the fact that the programmer visually draws screen forms of documents, reference books and reports. Now this is done declaratively: you describe what, in what order, in how many columns should be displayed on the screen, and the system itself decides how to draw this or that shape. It should be noted that this applies not only to forms, but to the entire interface as a whole. This declarative interface is intended to facilitate the portability of the system; indeed, a configuration written in managed forms can be launched both in a thin client and in a web browser - a web client, so we have a cross-platform environment where clients on different operating systems can work with the same database Windows, Linux, MacOS systems... In addition, this approach is used in version 8.3, where mobile systems based on Android from Google and iOS from Apple were added to desktop systems. Despite some restrictions on the objects available when programming for mobile clients, the concept remains the same. By programming for the mobile platform in this manner, we can use the same code for desktop systems. The program looks like this:
As you can see, the interface now consists of 4 main parts:
- list of accounting sections
- commands available for execution in the selected section
- Navigating the section you have selected
- current form (for example, a list of documents, or a list of directory elements)
There are also pop-up messages of this type or something like that My interface is Ukrainian, so don’t be surprised by unfamiliar words :-).
Now the program interface is formed dynamically, depending on the context, user rights, and available commands.
Subsystems 1s
1c subsystems are the basis of the command interface. You need to remember this and build the logic of the configuration around the subsystems. Configuration objects can belong to several subsystems at once. However, some subsystems may be service subsystems and not be displayed in the user interface. For example, the “Counterparties” directory may belong to both the “Purchasing” subsystem and the “Sales” subsystem.
The article continues the series of articles “First steps in development on 1C”.
Starting with version 8.2 in the 1C platform, in parallel to the classic conventional multi-window interface, a completely new interface was developed, which was called the Managed Interface. It was he who made it possible to organize work with the information base in a web browser.
This article provides an introduction to the managed interface from the user's side.
Applicability
This article discusses the Managed Configuration Interface developed on the 1C 8.3.4.482 platform. It should be noted that today the Managed Interface, developed on the 1C:Enterprise platform version 8.2, is considered obsolete and it is recommended to use its next version, which is called “Taxi”. But the old version of the managed interface has not gone away, and to avoid confusion with terminology in the future, the 8.3 edition platform began to classify interfaces into options: the “Version 8.2” option (old) and the “Taxi” option (new).
The Taxi interface is more convenient and ergonomic, it is much easier for novice users to learn. From the point of view of developing application solutions, the managed interface “Version 8.2” and “Taxi” are practically no different from each other. The main difference is observed in the user mode, but it is not as dramatic as it might seem at first glance. Therefore, we recommend that you familiarize yourself with this information.
Managed Interface
First, let's describe what the configuration looks like in general using a managed interface:
- access to the main menu and a number of service commands are displayed in the Upper command panel and are located in the same place where the application title is displayed;
- located a little lower Section panel, which has different display options (pictures, inscriptions or pictures and inscriptions). Each section in the configuration has its own object Subsystem and, in addition, a mandatory element in the section panel is Desk;
- On the left in each section there can be a Navigation Panel with links for opening certain windows (including forms of lists of various documents and reference books). Navigation bar commands can be sorted into groups;
- under Section panel located Action bar, which contains commands for creating objects (elements of directories, documents), as well as launching reports, processing, opening some service windows (for example, for writing constants);
- in the main part of the application, which is called Work area, the currently selected item window is displayed. The called window occupies this entire area. When changing windows, they replace each other. Opening separate independent windows (which can be moved as desired) is possible by holding down the Shift key. Such windows open as another element of the operating system taskbar.
Creating new elements of directories and documents is recommended without using lists (from Action bars).
This is due to the fact that when working on thin communication channels, opening the list will require some additional time.
To optimize the transmitted data, any editing of an object (directory element) is also carried out in a separate dialog box.
When new objects are created, a corresponding notification appears ( Alert area– in the lower right corner of the screen).
Below there is History panel, which displays the most recently created items. If necessary, you can use the mouse to return to any of these elements and make changes.
The main menu in the command interface is not horizontal, but vertical. It is called up by clicking the special button on the left in the Top panel. There is also a menu All functions.
Menu All functions displayed if a special checkbox is checked Show all functions command in Options window.
In the same window you can change the appearance of the interface by selecting appearance Forms in bookmarks or Forms in separate windows.
Window Options called from the main menu. To do this, you should sequentially select the item Service, and then Options.
On the menu All functions you can select any object to which the user has viewing rights, and also has access to a set of standard functions.
Although the list of objects that can be displayed on the desktop is determined in the configurator, there are some possibilities for individualization Desktop in user mode:
- firstly, displayed on Desktop forms depend on the availability of access rights to them;
- secondly, there are some customization options Desktop.
Switch to Desk and in the context menu of the section panel, select .
The settings window will appear Desktop. The available forms defined in the configurator can be distributed into columns (two columns in total), or some forms may not be displayed.
Settings Desktop are stored individually for each user.
Similar configuration options are available for Section panels, Navigation Bars And Action bars. The required configuration windows are called up by selecting the corresponding context menu item. The context menu itself is called up in any of the listed panels.
In the settings window Section panels you can change the order of sections, enable or disable the visibility of these sections (using the add and remove buttons) and control the display mode ( Picture, Text or Picture and text).
In the settings window Navigation Bars the user can move elements between groups and within groups, delete and add elements to Navigation Bars. All settings made are also remembered for the current user.
Settings Action bars produced in the same way. It should be noted again that the user can only display in a particular panel those configuration elements to which he has access.
We have already talked about the existence Alert Areas(when creating new objects) and History panels(the sizes of which are limited).
In addition, the history of actions with objects can be viewed in a special window, which is called up by clicking the button of the same name at the bottom left.
History is also saved between sessions, but the number of stored records is no more than 200. New records replace old ones.
Another interesting interface feature is navigation through the actions that were performed in the workspace. There are special buttons that allow you to move forward and backward, similar to a browser.
This navigation works not only within one section. On the right is a button with which you can return to various actions that were performed previously.
This navigation only works for forms that were opened in the work area.
In addition, it is possible to pass references to specific elements. The user who accepts the link (for example, by mail) can open it.
And Data Transfer Object to code structuring, controlled form in the 1C 8.2 environment.
Introduction
Let's start with a short description of the concept of “managed form” and related concepts of the 1C platform. Platform connoisseurs may want to skip this section.In 2008, a new version of the 1C platform: Enterprise 8.2 (hereinafter referred to as the Managed Application) became available, which completely changes the entire layer of work with the interface. This includes the command interface, forms, and the window system. At the same time, not only does the model for developing the user interface in the configuration change, but also a new architecture for separating functionality between the client application and the server is proposed.
The managed application supports the following types of clients:
- Thick client (normal and managed launch mode)
- Thin client
- Web client
The main differences of managed forms for a developer:
- Declarative, not “pixel by pixel” description of the structure. The specific placement of elements is performed automatically by the system when the form is displayed.
- All functionality of the form is described as details And teams. Details are the data that the form works with, and commands are the actions to be performed.
- The form runs on both the server and the client.
- In the client context, almost all application types are unavailable, and accordingly it is impossible to change the data in the infobase.
- For each method or form variable, it must be specified compilation directive, defining the execution location (client or server) and access to the form context.
- &OnClient
- &OnServer
- &OnServerWithout Context
- &OnClientOnServerWithout Context
All further discussions will be about the right side of the illustration, about how to structure the module code and what principles will allow you to implement effective client-server interaction.
Let's define the problem
Several years have passed since the new version of the 1C platform is actively used and many solutions (configurations) have been released by both 1C and its many partners.During this time, have developers developed a common understanding of the principles of client-server interaction when creating forms, and has the approach to implementing software modules changed in the new architectural realities?
Let's look at the code structure (form module) in several forms of the same standard configuration and try to find patterns.
By structure we mean sections of code (most often these are comment blocks) allocated by the developer to group methods and compilation directives for these methods.
Example 1:
Section of event handlers Method - on the client Method - on the server Method - on the client Section of service procedures and functions Auxiliary input control functions
Example 2:
Service procedures and functions Payment documents Values Event handlers
Example 3:
Service procedures on the server Service procedures on the client Service procedures on the server without context Header event handlers Command event handlers
Example 4:
General-purpose procedures Form event handlers Procedures of the “contact information” subsystem
Essentially, the code structure is missing, or to put it mildly, it is similar to what was in Forms 8.1:
- Non-informative words “General, Service, Auxiliary”.
- Timid attempts to separate client and server methods.
- Methods are often grouped by interface elements “Working with the tabular part Products, Contact information”.
- Arbitrary arrangement of methods and code groups. For example, Event Handlers may be at the top in one form, at the bottom in another, not highlighted at all in a third, etc.
- And let's not forget that this is all within one configuration.
- Yes, there are configurations in which the words “General, Service, Auxiliary” are always in the same places but...
Why do you need code structure?
- Simplification of maintenance.
- Simplify learning.
- Recording general/important/successful principles.
- ...your option
Why doesn't the existing development standard from 1C help?
Let's look at the principles published on ITS disks and in various “Developer's Guides...” that are recommended when writing a managed form.- Minimize the number of server calls.
- Maximum computing on the server.
- Non-contextual server calls are faster than contextual ones.
- Program with client-server communication in mind.
- etc.
Design patterns or generational wisdom
Client-server interaction has been used in various software technologies for decades. The answer to the questions outlined in the previous section has long been known and is summarized in two basic principles.- Remote Facade(hereinafter referred to as Remote Access Interface)
- Data Transfer Object(hereinafter referred to as Data Transfer Object)
- … Each object potentially intended for remote access must have low granularity interface, which will minimize the number of calls required to perform a certain procedure. ... Instead of requesting an invoice and all its items separately, you need to read and update all invoice items in one request. This affects the entire structure of the object...Remember: remote access interface does not contain domain logic.
- ...if I were a caring mother, I would definitely tell my child: “Never write data transfer objects!” In most cases, data transfer objects are nothing more than bloated field set... The value of this disgusting monster lies solely in the possibility transmit multiple pieces of information over the network in one call- a technique that is of great importance for distributed systems.
Examples of templates in the 1C platform
The application programming interface available to the developer when developing a managed form contains many examples of these principles.For example, the OpenForm() method, a typical “rough” interface.
OpeningParameters = New Structure("Parameter1, Parameter2, Parameter3", Value1, Value2, Value3); Form = OpenForm(FormName, OpeningParameters);
Compare with the style adopted in v8.1.
Form = GetForm(FormName); Form.Parameter1 = Value1; Form.Parameter2 = Value2; Form.Open();
In the context of a managed form, there are many “Data Transfer Objects”. You can select systemic And developer-defined.
System ones model an application object on the client, in the form of one or more form data elements. It is impossible to create them outside of the connection to the form details.
- DataFormsStructure
- DataFormsCollection
- DataFormStructureWithCollection
- DataShapesTree
- ValueInFormData()
- FormDataValue()
- CopyFormData()
- ValueInFormAttributes()
- FormAttributesValue()
Example 1C v8.1:
// on the client in the context of the form FillUserCache(DepartmentLink)
Example 1C v8.2:
// on the server in the context of the form ProcessingObject = Form AttributesValue("Object"); ProcessingObject.FillUserCache(DepartmentRef); ValueВFormAttributes(ProcessingObject, "Object");
Data transfer objects, the structure of which is determined by the developer, are a small subset of the types available on both the client and the server. Most often, the following are used as parameters and results of methods of a “coarsened” interface:
- Primitive types (string, number, boolean)
- Structure
- Correspondence
- Array
- Links to application objects (unique identifier and text representation)
&OnServerWithoutContext Function ServerChangeOrderStatus(Orders, NewStatus) Errors = New Match(); // [order][error description] For Each Order From Orders Cycle StartTransaction(); Try DocOb = Order.GetObject(); …. other actions, possible not only with the order... Exception CancelTransaction(); Errors.Insert(Order, ErrorDescription()); EndAttempt; EndCycle; Return Error; EndFunction // ServerChangeOrderStatus()
Structuring the code
The main goals that the managed form module should reflect and approaches to the solution.- Clear separation of client and server code. Let’s not forget that at the time of execution these are two interacting processes, each of which has significantly different available functionality.
- Clear identification of the remote access interface, which server methods can be called from the client and which cannot? The names of remote interface methods begin with the prefix "Server". This allows you to immediately see the transfer of control to the server while reading the code, and simplifies the use of contextual help. Note that the official recommendation (ITS) suggests naming methods with postfixes, for example, ChangeOrderStatusOnServer(). However, let us repeat, not all server methods can be called from the client, and therefore logical accessibility is more important, rather than compilation location. Therefore, with the prefix “Server” we mark only methods available to the client; let’s call the example method ServerChangeOrderStatus().
- Readability. A matter of taste, we accept the order when the module begins with procedures for creating a form on the server and remote access methods.
- Maintainability. There must be a clear location for adding new code. An important point is that method templates automatically created by the configurator are added to the end of the module. Since event handlers for form elements are most often automatically created, the corresponding block is located last, so as not to drag each handler to another place in the module.
- Graphical version – clearly shows the main flow of execution.
- The text option is an example of a template design for quickly inserting a structure into a new form module.
//////////////////////////////////////////////////////////////////////////////// // <(c) Автор=""", ИмяПользователя>"Date=""", ДатаВремя,"ДФ=dd.MM.yyyy">"/> // <Описание> // > // Описание>//////////////////////////////////////////////// ///////////////////////////// // MODULE VARIABLES ///////////////// //////////////////////////////////////////////// ////////////// // ON THE SERVER //******* EVENTS ON THE SERVER ******* &On the Server Procedure When Created on the Server (Failure, StandardProcessing) //Insert the contents of the handler End of Procedure //******* REMOTE ACCESS INTERFACE ******* //******* BUSINESS LOGIC ON THE SERVER ******* ///////// //////////////////////////////////////////////// //////////////////// // COMMON METHODS OF CLIENT AND SERVER ////////////////////// //////////////////////////////////////////////// //////// // ON THE CLIENT //******* BUSINESS LOGIC ON THE CLIENT ******* //******* TEAM ******* //******* CLIENT EVENTS ******* /////////////////////////////// /////////////////////////////////////////////// / / MAIN PROGRAM OPERATORS
Related questions
In conclusion, we will outline several areas that are useful to think about when programming client-server interaction.- Remote access interface implementation options. Asynchrony, level of detail...
- Caching. 1C made an unsuccessful architectural decision, introducing caching only at the level of calling methods of common modules and not providing control capabilities (relevance time, reset on demand).
- Implicit server calls. Do not forget about technological features; many “harmless” operations on the client provoke the platform to contact the server.