The Octyx 2016 story – 7 – The preparation of the mobile application in my Windows application

firebrickred - 64-64 roundedHello, this blog is part 7 of the series ‘The Octyx 2016 Story’. See for the overview (part 1), full background and a list all related blogs the link here.

This specific blog describes in more detail the preparation of the Octyx Windows application, and Delphi, for my mobile application.

As said in the previous blog, I use now Kinvey as BAAS solution provider. This means I had to implement in my classic Delphi VCL environment all kind of BAAS functionalities to be able to communicate with REST and JSON (see also my previous blogs).

So how did I proceed:

  • I started with a ‘contract’ screen that every future mobile user has to agree upon (via settings, mobile cloud). On this screen the user has to agree on the Octyx Cloud conditions. The contract can be printed out if wished.
  • On the contract screen, the user has to indicate which information is allowed to be shared in the cloud. Next to that, the user has to indicate his user-id, password and some further details, such as his e-mail address.
  • After agreeing and saving, I built a fully automated procedure (see below) to transfer the agreed data to the Cloud. The user is informed by the usual Octyx information process.

The update procedure, but fully with standard Delphi controls, is checking via arrays all existing local data with the existing Cloud data. A second process then compares all data, and only updates the changed records. Logging is taking place automatically.

I use the standard Kinvey controls in Delphi 10 Seattle, and based myself for a large part on the various BAAS tutorials well-written by Sarina Dupont from Embarcadero. These tutorials helped me a lot to advance, and to implement some specific functions where the standard did not fit.

The overall implementation in the Windows application took me quite some weeks to define, and to ensure that all situations are handled. This could be a one-line change, a language change, dropping of the contract, or any other issue. The final outcome is that it works, and it is very fast.

On starting Octyx, the program automatically logs-in into Kinvey, based on saved credentials, and checks all kind of updates. Automatically, quiet and fast. At any time, the user can decide to stop using the mobile application, and all his data will then be deleted from Octyx Cloud at Kinvey.

One important element is that Kinvey requires all fields to be uploaded at any change, while Parse accepted only the changed fields. This was an important change I had to implement when changing from Parse to Kinvey.

For the 2016 version, currently only ‘medications’ are shared with Kinvey data in the cloud. Further Octyx elements, such as several collections, todo or documents, are scheduled for later in 2016 and 2017.

Enjoy the Octyx blogs, and take care. Go back here to the overview. Octyx manages your life!

Bas Eshuis, Belgium.

April 30, 2016

Advertisements

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: