📜 ⬆️ ⬇️

The story of one application: mobile "1C: Management of our company"

Using the example of the mobile application “1C: Management of our company” (abbreviated UNF), I want to show the evolution of a mobile business application from its inception and release of the very first version to today. Now this application has more than 220,000 downloads; The application is free, but it has paid options (implemented through in-app purchases).

image

The first version of the mobile UNF was made on one of the first versions of the 1C: Enterprise mobile platform in 2012. At that time, the client-server configuration “1C: Management of a small company” already existed (the name was then), a program for automating the activities of a small company - sales, purchases, customer and supplier base, warehouse management, manufacturing, etc.

Like most mobile applications written on the 1C: Enterprise cross-platform mobile platform, mobile UNF is available on iOS, Android and Windows.
')
The task was set as follows: to make a mobile application that supports part of the work scenarios of the “large” UNF. The application must be able to work both autonomously and synchronize data with the “big” UNF (hereinafter, the word “big” with reference to the client-server version of the UNF will be written without quotes so as not to overload the text). In the case of working with large UNFs, scenarios of “mobile” employees — sales representative, service engineer, seller should be supported.

The first version was created for 1 man-month. When creating a mobile application, a part of metadata objects (reference books, documents) was implemented based on the objects of a large UNF. But part of the functionality had to be programmed from scratch, for example, the process of data exchange with a large UNF. However, with regard to the exchange of data, it was necessary to program a little - we used standard platform mechanisms (in particular, exchange plans ), which reduce code writing to a minimum.

image

In addition to simplifying the work with data synchronization, the 1C platform significantly simplifies the work on designing a full-featured mobile application, providing the developer with interface components such as lists (tabular and hierarchical) with the ability to search by them, input fields with a search, tables for reports, a wide range of charts, Printing on WiFi and Bluetooth printers, etc.

Features of the mobile version


There are two main strategies for choosing the functionality of a mobile application. The first is “one application - one function”. For example, a mobile application for receiving goods in stock, which can only scan the barcode of the product with an integrated camera and send information about the received product to the server. The second strategy is the creation of a mobile application with broad all-in-one functionality. Both approaches have the right to life; when writing a mobile UNF, we chose the second approach - our application covers many tasks in its subject area and can work completely autonomously, serving the needs of a small organization. Another advantage of this approach is that the user can work with several interrelated functions from one application.

Mobile UNF widely uses the functionality of a mobile device, in particular:


There is an option to backup and restore the mobile UNF base on Yandex.Disk and send the base by mail.

The configuration of the mobile UNF looks quite spartan (see screenshot below):


image
The main objects of mobile UNF

But, despite such a small number of application objects, the product turned out to be quite functional.

An interesting feature of a mobile UNF is that they are often beginning to be used by people who have not heard about 1C before (yes, there are such people in our country), those who need a mobile application to keep track of their small business (for example, home). crafting). They just found it on Google Play or the AppStore, read the reviews - and started working.

Autonomous work


This scenario is designed for very small organizations, when all records are kept exclusively on a mobile device. This may be, for example, the “home” business - making jewelry at home and selling them on the VK page. Or maybe even a small store - I personally saw a case when a toy store specializing in the sale of Lego designers kept records solely on the mobile version of the UNF. Given that the mobile UNF can print on WiFi and Bluetooth printers, with its help you can solve quite a large number of tasks. Mobile UNF supports order processing, input receipt and expenditure invoices, accounting receipts and expenditure of money.

Work in server synchronization mode (first versions)


In the mode of synchronization with the server in the mobile UNF, in earlier versions, the accounting functionality became unavailable, and work in it was carried out mainly with orders (receiving and executing orders) and related activities (maintaining directories of contractors, goods and services, etc.).

Synchronized with large UNF directories of goods and services, contractors, and orders.

image
Data exchange of mobile and large UNF in the first versions

Orders entered from mobile devices fell into a large UNF, and during synchronization they fell on mobile devices responsible for orders. Documents such as cash receipts, sales of goods, etc., entered on mobile devices, went to a large UNF, but were not synchronized between mobile devices. All work in the mobile application in the synchronization mode was conducted mainly around orders - their acceptance and execution, full accounting on the mobile device was not conducted, for this it was necessary to use a large UNF on the computer.

So it was in the first versions, but later we changed the situation and expanded the list of use cases of mobile UNF to make work with it more convenient for users.

It is a little about data synchronization


Data exchange between mobile and large UNF goes through web services; The mobile UNF calls web services deployed on the side of a large UNF. The data structures in the large and mobile UNF differ; When designing the architecture, we considered 2 options for data exchange:

  1. Create a data structure in a large UNF, a duplicate data structure of the mobile UNF, and exchange data with the mobile one-to-one UNF. When changing data in a large UNF, you need to transfer new / changed data to this duplicate structure, and after data exchange with a mobile UNF, convert the data that came from the mobile device and placed in the duplicate structure into the format of a large UNF.
  2. Exchange data directly with the structures of a large UNF, converting data "on the fly" according to the rules of exchange.

We decided to stay on the second version. The first option, although it promised some advantages related to the simplicity of the actual data exchange, poorly handled the situation when the new version of the mobile UNF changed (expanded) the data structure; in order for one-to-one data exchange to continue to work, it would be necessary to update the server, large UNF. That, for many reasons, was unacceptable.

The data exchange mechanisms implemented in the platform take on the bulk of the work of creating packages to synchronize data, allowing you to keep code writing to a minimum. In the exchange process, the standard mechanism of the 1C: Enterprise platform is used — the data exchange mechanism ; A data exchange node is created for each mobile UNF in a large UNF, a change registration service is used in a large and mobile UNF to track data that has changed since the last synchronization, etc.

The mobile application initiates data exchange, forms the exchange package (containing the mobile application identifier and data updated on the mobile UNF since the last synchronization) using the platform mechanisms and forwards it to the large UNF. Based on the information in the starter pack, a large UNF prepares data for the mobile UNF that has been modified in a large UNF since the last synchronization and packs them into packets. Packages in XDTO format are 1C metadata objects serialized in XML; The size of each package is no more than 500 objects.

image

The mobile UNF collects this data package by package. After downloading the last packet, the mobile UNF begins to process the received data - to carry out documents, record reference books, etc. In the event of a disconnection, packet resuming is supported; we have written the resale mechanism for UNF ourselves (it is not on the platform), but since the mobile UNF comes in source code, developers can look at the implementation of the mechanism and borrow it for their applications.

During the initial synchronization of a mobile UNF with a large UNF, it is impossible to work in a mobile UNF - a modal window appears, showing the progress of the process. All subsequent synchronization is background, and does not block the operation of the mobile UNF.

A complete list of the objects exchanged between mobile and large UNF:


In a large UNF, goods have pictures — images of the goods themselves. In order to minimize traffic, we do not load pictures into a mobile UNF, they are loaded on demand - for example, when we open a product card in a mobile UNF.

image
Product Item Card

Application Evolution - Develop Usage Scenarios


The typical situation is that business is growing, and the functionality of a mobile UNF on one mobile device is no longer enough. In the business there is another employee (or employees), and they also need to work with orders.

In the first versions of the mobile UNF, the relocation scenario was fairly straightforward - the data entered in the mobile UNF were copied to the base of a large UNF, and the user had to keep records on the computer from now on. In this case, the mobile UNF will work in the order processing mode, and it will be impossible to keep records (as on the stand-alone version of the mobile UNF).

This, of course, was not entirely convenient for the end user - he was already used to keeping records from a mobile device, and here he was forced to change his keyboard. Not everyone will be happy with it.

Therefore, we have expanded the list of mobile UNF work scenarios. The appearance of our cloud service http://1cfresh.com , based on 1cFresh cloud technology, helped us in this . Now you can place a large UNF in the cloud. We painted three scenarios for using the mobile application as the user's business grows:

  1. Very small business. Accounting is carried out on one mobile device.

  2. Business is growing - employees have appeared. You can put mobile UNF on employees' mobile devices. At the same time, you need to be able to exchange data between mobile devices to synchronize data; for this, we decided not to use file sharing, but to use for synchronization (and, at the same time, for backup) the version of a large UNF located in the cloud http://1ffresh.com . When this scenario is enabled, an instance of a large UNF is created in the cloud http://1ffresh.com , the base of which will be used to synchronize data between mobile devices. Using one mobile device in such a scenario is free of charge, for each additional device we charge 75 rubles per month, you can use no more than three devices in this scenario. At the same time, users of mobile devices can be assigned predefined roles - a sales representative, service engineer, seller (detailed setting of roles is also possible); the functionality of the mobile application will be limited accordingly. You can also work through a web client or a thin client with a large UNF located in the cloud, but the functionality of the cloud UNF will be reduced to the functionality of a mobile UNF. But working directly in the cloud UNF is not necessary - all work can be done only from mobile devices.

  3. The business has grown to the size of an average firm. In this case, it makes sense to rent a full-fledged version of a large UNF in the cloud in order to get (via a web client or thin client) additional functionality - CRM (in the plans - inclusion of CRM in a mobile UNF, but so far only available in a large version), warehouse management, expanded pricing, the ability to work with banks and so on . In this case, the number of mobile devices working with a large UNF is not limited (for each device an additional fee is charged according to the tariff , as for one workplace; 1 license for a UNF in Fréche or for a “boxed” UNF gives the right to free use and 1 mobile application ).


image

Experience monetizing applications


The UNF mobile application, as I already wrote, is free. Some time ago we decided to monetize our application (using the functionality of embedded purchases implemented in the 1C: Enterprise mobile platform version 8.3.8 ), selling additional functionality - production, and the ability to synchronize with additional mobile devices.

image

The purchase of the “Production” functionality is a one-time, and the ability to synchronize with additional mobile devices is framed as a subscription that needs to be renewed every month. Interestingly, already 3 weeks after the addition of shopping functionality, a mobile UNF hit the top 15 of Google Play for sales of business applications.

Conclusion


The mobile UNF is a relatively small (in terms of source code size), but quite a popular product. We hope that the story of its evolution will be useful to the creators of mobile end-user products both on 1C technologies and on other development tools.

It will be useful to remind that on the mobile platform 1C you can make applications that interact not only with the 1C server backend; The protocols used for data exchange in mobile applications on the 1C platform are platform-independent (web and HTTP services, support for XML and JSON, etc.). So if you need to quickly and dynamically develop a cross-platform (Android, iOS, Windows) mobile client, and with the ability to work offline without a permanent connection to the Internet for your business application, then the 1C mobile platform may well be the best choice for you.

Source: https://habr.com/ru/post/331644/


All Articles