This document is a guide to see how GeneXus solved the problems described in other documents related to Offline Native Mobile applications. This is not a tutorial but a reference to other documents with more specific details on the generation of offline apps.
Note: First recommended step is to consider the Native Mobile Offline Applications Requirements.
By default a Native Mobile 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 Native Mobile online applications 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. Native Mobile 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 Native mobile offline applications architecture.
This is important for two reasons:
- The intelligence that GeneXus uses to create offline applications is based on this concept.
- There might be some communication to be handled between the device and the server, which means Data Synchronization is required.