This document is a guide to see how GeneXus solved the problems described in other documents related to Offline Smart Devices applications. This is not a tutorial but a reference to other documents with more specific details on the generation of offline apps.
Note: First recomended step is to consider the Smart Devices Offline Applications Requirements.
By default a Smart Devices application is set to run as an Online application. This means that GeneXus generates the needed REST Web Services for the application to get the data from the database, as also generates the services for the procedures that the application consumes. All this processing and data gathering is done over the network on a server. See Smart Devices Online Apps Architecture.
This behavior can be changed by setting to "Offline" the Connectivity Support property of the main object of the application.
In offline applications, when an object is set to execute offline, all the processing is done on the device, and even more important, a local database is created once the application is installed in the device. All the offline panels will be fed from this local database, then none REST Web Services are needed to bring data to those panels; all data is stored in the local database instead. Smart Devices platforms native code is generated to get, update and process that data. This local database is automatically generated by GeneXus' Offline Database Object identifying automatically the tables used by that app.
In addition, as mentioned many times throughout the documentation, an offline application will be part of a bigger system. In GeneXus we can say that the objects of an offline application are a subset of a bigger Knowledge Base, which also generates the full system. See Smart Devices Offline Applications architecture.
This is important for two reasons:
- The intelligence that GeneXus uses to create the offline applications is based on this concept.
- There might be some comunicationto be handled between the device and the server, which means Data Synchronization is requiered.