LANSA Takes Mobile Apps Offline
December 3, 2013 Alex Woodie
Mobile applications are proving themselves to be useful tools for businesses. But they often don’t work when disconnected from the server running the ERP systems and databases. IBM i development tool maker LANSA is addressing this shortcoming with a new release of its LongRange mobile application framework that allows RPG- or COBOL-based mobile apps to continue working even when the user is outside of cell or WiFi coverage.
The new offline mode uses the SQLite database that’s embedded in all Android and iOS phones, and includes some nifty coding tricks by the folks at LANSA, according to Don Nelson, a LANSA vice president who works out of the company’s Chicago, Illinois office.
Depending on how the developer configured the application, the entire application or just parts of it will get cached on the device. With today’s 128 GB flash memory cards, a SQLite database on a mobile device could theoretically reach 100 GB, which is a lot of data to be carrying around–probably too much, in fact.
“You’re not going to take your whole ERP database and put it down there,” Nelson says. “You’re going to put down on the device the basic information you need to be able to fulfill the job you need to do.”
The new offline feature will be useful to field personnel across many industries and lines of works. A salesman, for example might choose to download information about customers, what types of products they typically order, and the latest pricing information on those products. The salesman can download that information to the device and be confident that he can complete a transaction on the mobile device if needed.
One of LANSA’s early adopters for the offline mode is a homebuilder that needed a way to do home inspections while offline. Other potential uses include conducting surveys. “A lot of that stuff will work offline because it doesn’t require a real time interface,” Nelson says. “If you’re building an inventory or order entry application, obviously the inventory balance might change as soon as you go offline. You’re able to place the order, but there are some limitations.”
LANSA provides developers with the tools to manage the syncing of the mobile database with the server database. It’s best to attempt syncs when a steady WiFi connection is available, and not while driving through spotty cell coverage.
“They would need to be aware of the initial sync, and then when they get reconnected–you can check if they’re connected or not–do a sync when you have a [solid] connection,” Nelson says. “If you’re going in and out of wireless zones, you may or may not get a full sync occurring, so you have to be careful how you build your applications.”
To prevent data from being corrupted, Nelson recommends users implement failover capability to ensure that updates to the database go through completely and cleanly. He also recommends that developers use commitment control logic in the database.
That shouldn’t be too hard for LongRange users, considering LANSA is focusing narrowly on traditional IBM i skills. “Previously you could do these things, but it required extra skills that a lot of RPG guys don’t have,” Nelson says. “They do know how to read and write to the database. That’s really the key. You connect to a remote database, read the data, and write it out to the IBM i database, and they’re off and running.”
The new offline mode is included in LongRange Rev15. This release also includes support for iOS7, including the new interface and native GUI controls for iPhones and iPads; enhanced PDF viewer integration for Android; support for additional bar code scanners and magnetic card readers; and additional RPG-code building blocks and sample apps, with source code included. For more info, see www.lansa.com.