Offline mobile client

29.05.2019

This text is an announcement of recent performance.
It’s not beneficial to make use of the content material of this text to grasp the brand new performance.
A full description of the brand new performance shall be supplied within the documentation for the corresponding model.
An entire record of modifications within the new model is supplied within the v8Update.htm file.
Carried out in model 8.3.16.1030

Offline performance shall be added to the cellular consumer to make it extra user-friendly. Beforehand, when working with a cellular consumer, if the reference to the server was misplaced, the appliance stopped working, and if the consumer left the appliance earlier than the connection was restored, information loss might happen. Within the case of a gradual communication channel, queries to the infobase might take a very long time, which negatively affected the usability. The offline cellular consumer is designed to handle these points.

An offline cellular consumer can:

  1. Work straight with the primary infobase with a superb connection

  2. Work offline when there is no such thing as a reference to the data base

  3. Present a alternative (on-line or offline) in case of poor connection

Drawback # 1 is now being solved by a cellular consumer. Adaptation of the configuration for work by way of a cellular consumer might be carried out relatively shortly.

Drawback # 2 is solved by a cellular platform. However this method requires constructing a separate cellular app, which might be fairly a cumbersome job.

The offline cellular consumer combines these two applied sciences. Along with the standard cellular consumer, it accommodates a neighborhood server with a file database. As a part of customizing the configuration for a cellular consumer with offline mode, a part of the configuration performance might be transferred to a cellular machine. This, in fact, would require some labor, however it might be simpler than creating an utility from scratch on a cellular platform. In a cellular consumer with offline mode, you possibly can implement solely that offline performance that’s crucial to have offline, and implement it not all of sudden, however steadily, as wanted and the supply of sources (builders). We anticipate that, in observe, the prices of fixing the issue of a cellular consumer with a nasty connection / no connection utilizing a cellular consumer with an offline mode shall be considerably much less in comparison with creating an utility on a cellular platform. On the identical time, a cellular consumer with an offline mode will be capable of work each offline (with entry solely to the performance carried out for offline) and on-line (with full performance).

The transition to offline mode is carried out robotically when WiFi and cellular Web disappear; the consumer may flip it on manually in case of unstable connection.

As a part of customizing the configuration for the offline cellular consumer, you possibly can specify which configuration information shall be required offline:

The composition of the offline mode might be set as much as the attributes of objects. For instance, in some reference ebook in a sure requisite there could also be a considerable amount of information that’s impractical to obtain to a cellular machine.

As a part of the offline mode, the precedence of opening kinds can be indicated. In accordance with the precedence, when the shape is opened, the information shall be loaded into it from the primary or from the stand-alone server.

To deal with the scenario of lack of reference to the primary server, the OnChange of the PrimaryServer availability occasion appeared on the consumer.

Utilizing the PrimaryServerAvailable technique, you possibly can verify at any time whether or not there’s a connection to the first server.

If there’s a connection, server-to-server calls are potential; the cellular server calls the primary server in the identical manner as a cellular consumer would. All server modules that may be referred to as from the consumer can be found via the PrimaryServer context.

Added directions for the MobileApplicationServer preprocessor. With constructs like “#If MobileAppServer”, you possibly can execute code on a stand-alone cellular consumer server.

Primarily based on the composition of the offline mode, a cellular utility is created with the corresponding construction of the native database. This cellular utility can function in one in every of three modes (selectable by the consumer for basic configuration):

  1. Regular: Objects run on the precedence set by the developer as a part of offline mode.
  2. Standalone (offline): The app solely works with a neighborhood server. The work is carried out solely with domestically accessible objects, the remainder of the objects are inaccessible. Commonplace interface instructions robotically alter to offline mode (the corresponding menu gadgets turn into unavailable).

  3. Unhealthy connection: the priorities set by the developer as a part of the offline mode are ignored and all objects accessible domestically work with the native server. For instance, within the above instance, the Accounts listing will open domestically, even when there’s a hyperlink.

Contemplate a scenario after we opened a type from the primary server, and after that the connection to the server was misplaced. This type will turn into inaccessible till the hyperlink is restored, however you possibly can work with different kinds which are obtainable domestically. And if an analogue of the shape open on the primary server is out there domestically, this kind might be reopened from the native server and proceed to work with it.

The other scenario happens after we are working with a neighborhood type, and the connection to the server is restored. We wish to open the shape from the server, as a result of extra particulars can be found on it. For this, we’ve made a mechanism for reopening kinds.

You’ll be able to programmatically reopen the shape by calling the Reopen technique within the type’s occasion handler OnMainServerAvailabilityChanges. For an already open type, the BeforeReopening handler known as, for a brand new opened type, the developer OnReopening known as. Within the handlers of those occasions, you possibly can initialize a newly opened type making an allowance for the information entered (however not saved) on the closed type. You’ll be able to switch information manually by code or robotically utilizing the FillOnReopening technique. The FillOnReopening technique known as robotically afterOnReopening if the StandardProcessing parameter is True. The FillOnReopen technique has limitations; if the attributes are of advanced sorts (for instance, a spreadsheet doc or a diagram), they can’t be copied (as a result of, particularly, the state of the spreadsheet doc on the consumer will not be absolutely obtainable). On this case, the strategy won’t copy something and can throw an exception.

The method of information alternate between the primary and native servers within the present implementation is fully the duty of the developer, who adapts the configuration for a cellular consumer with offline mode. With the assistance of alternate plans, the developer can maintain a file of information modifications, and synchronize modifications, for instance, utilizing background jobs. That is just like creating an utility on a cellular platform with information alternate with a 1C utility on the server.

Demo of the cellular consumer with offline mode:

Tags: cellular consumer 8.3.16

Inform associates:

Facebook
Twitter
Pinterest
WhatsApp

Related Articles

Latest Articles