NetTalk Central

Author Topic: Is this a good scenario for a NT disconnected App?  (Read 3499 times)

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Is this a good scenario for a NT disconnected App?
« on: September 10, 2019, 03:13:13 AM »
These are my thoughts about a special case of a disconnected app. I'm very open to comments and/or alternate ways to do the job :-)

Picture an app that only creates new transactions with no need to see already existing transactions (think stock picking or posting to a disbursement account while standing at the gas station) - is NT the right choice for this type of app?

I'm considering creating a file for new transactions only and let NT do the sync'ing to this file. Then - in an appropriate embed point after a successful insert - write some code to update the "real" data base table and remove the uploaded transaction. This way I'd get the sync'ing 'for free' with only a tiny delay in the updating of the db which is not really important in this situation.

I think it would work but since it's new ground I'm keen to hear other opinions on this. Or being told "Yes, that's the way to do it" :-)

Thanks
Peter

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Is this a good scenario for a NT disconnected App?
« Reply #1 on: September 10, 2019, 10:23:07 AM »
I think it will...

You can sync only the records belonging with each device so you keep only the records piked in each device.
And you can add code to the server sync method to do what you need with each record as its reaches the server.
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: Is this a good scenario for a NT disconnected App?
« Reply #2 on: September 10, 2019, 07:34:58 PM »
Hi Peter,

it's not really that unusual of a case.
Any "data collection" setup does this sort of thing. Collect data (offline) and push that data to the server when online.

So yes it's a good fit.

Also - although it seems like "all push" at first glance, typically it's not. Take your stock-app for example - often there's a bunch of lookup files that reside on the device. So those end up being "synv'd" in both directions.

but nothing says you _have_ to sync in both directions - as I'll show at CIDC it's possible to have tables that are read-only, write-only, both, or partial.

cheers
Bruce

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Is this a good scenario for a NT disconnected App?
« Reply #3 on: September 10, 2019, 11:56:12 PM »
Hi Bruce,

Sounds good - and leads to the next questions:

Since the infrastructure around here is pretty well developed a truly disconnected situation is rather unlikely. So although it would somehow break the principles of a disconnected app I was thinking if it would be possible to call a webservice for validation purposes - rather than having to download tens of thousands of item numbers to the device? And if so, how would I make that call?

Also, does the bar code scanning work in a disconnected app?

Peter

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: Is this a good scenario for a NT disconnected App?
« Reply #4 on: September 11, 2019, 09:20:37 PM »
Hi Peter,

>> I was thinking if it would be possible to call a webservice for validation purposes?

yes.

>> And if so, how would I make that call?

You'd have a WebService method on the server side. That's pretty trivial to do (and lots of webinars for doing that.)
On the client side it's a very simple WebClient call.
Check out the ClarionLive series starting with #300 - watch the first 4 in the series and you should have all you need.
(hint: double-speed video is your friend.)

>> Also, does the bar code scanning work in a disconnected app?

yes. (It's one of the features in the CIDC 2019 mobile app)

cheers
Bruce