Page 1 of 1
Offline solution.
Posted: Fri Nov 04, 2016 1:41 am
by kno_dk
Hi.
I need a bit of advice for a request from one of my customers.
Scenario:
They have an offline truck application, build in visual basic. Every morning they transfer some data from IBM I to an usb stick, and then put it into a pc in the truck. During the day they type in orders and print order documents. When the day ends the truck driver take the usb stick and put it into a pc in the office and the data is uploaded into the IBM I. it works perfect.
Future:
They want to change the pcs in the truck to a tablet. It should still be an offline solution, because the poor mobile signal in the areas where the trucks drive. I was thinking about converting this solution to an offline application in LongRange. Now it should not be the usb stick they move between the truck and the office, but the tablet. When they get into the office they should automatically update the tablet/IBM I via the wireless network.
Is a LongRange application developed in RDML/RDLMX the best fit?
Can I generate the print and control the print in the truck from LongRange?
How easy is it to synchronize data from/to the tablet and IBM I?
Any input is welcome.
Thanks
Re: Offline solution.
Posted: Sun Nov 06, 2016 10:32 pm
by MarcusLancaster
Hi.
All the apps I've developed so far in LongRange have been offline (RDMLX) - it has worked very well for precisely the situation you describe, where patchy internet connections mean that storing data locally until the operator chooses an appropriate time to upload to the server is the only approach which sensibly works.
The other advantage this gives users of offline LR apps is that screen transition speeds are more predictable (because the local device manages the screens, rather than with online where you have to post back to the server to get the next screen display and are therefore reliant on the speed of the connection, server load etc).
With offline LR you get a local SQL database (allowing for multiple tables) where you can store text and binary data (photos etc). LR provides the infrastructure to upload / download data to / from the server when the operator chooses (via a button / image press for example) and if needed you can "block" the transfer of data to ensure large data transmissions do not timeout on slow connections. Block data transmissions require some additional coding, but utilize standard features provided by LR.
There's obviously a lot of stuff to consider here - I suggest the first thing to do is have a look at the shipped examples and try to build a simple app which uploads data.
If you are downloading any data to the device, from experience it is definitely worth creating a mechanism to only download data to the client device when needed - so when you "sync" with the server database, only transfer data down which has been changed or is new. I use the unique device GUID and data keys to control that. You'll need an additional file to store that information on the server. It is also sometimes worth "flattening" the data that is downloaded to the device - don't try to download a snapshot of the server database using the same table structure that resides on the server. Think about what the app needs to do and design a local database for that purpose.
With regards to driving printing from a device... I've not used that feature, but a quick search of the online doco reveals that there is a "print" operation which allows the app to route text, images or HTML to print. You should be able to drive that on the device from RDMLX or javascript - depending on the specifics of the app. I would definitely try this out in test app to confirm this feature meets your requirements.
http://www.longrangemobile.com/docs/lan ... /print.htm
Anyway - hope that helps - sorry its a bit vague. Have a play with the examples and post any followup questions you might have.
Cheers for now.
Marcus.
Re: Offline solution.
Posted: Wed Nov 16, 2016 2:10 am
by edwardtn
I would like to offer my experience as it may be pertinent. We developed an app with LongRange to support a mobile sales force in the Agriculture vertical. With most customers living in rural areas, the app was designed to work offline. Our salesmen have up to several hundred accounts and thousands of records associated with those accounts that they need readily available. We initially attempted to architect the offline database in a fashion outlined in the offline documentation, but we were just downloading too much data. We ended developing the entire app using the LongRange JavaScript API and leveraging HTML5/CSS3/JQuery and the Bootstrap framework from within LongRange Webviews. Our Lansa back-end serves data to the app via server routines which we consume via JQuery and populate the local SQLite database. We use the LongRange API to interact with the camera, scan barcodes, view images and files, execute local database operations, perform geolocation, etc.
I don't mean to suggest that this is the preferred method to use LongRange, as it requires additional coding skill-sets...but I do mean to illustrate that LongRange is a robust solution and the features offered in the application infrastructure and API would be difficult to find in another product.