LiveCode for FM Guide Ben Lui

To Extract or Not to Extract Data

Updated on

Whether you want to extract initial data during your app compiling with LCFM Native depends on what kind of app it is. Is it something that collects data from end users, stores it on the server, and provides it back on request? Does it provide data to the end user, which is administered and added to by you on the server? What do you want your end user to see, on first run of the app? How much data is there and how big and heavy will it make your app?

A form collecting data

If your app is a data collection type, you probably don't want to extract initial data. You probably want to present blank forms to your end user, which they fill in to provide you with information. Note though, there is a potential gotcha here. FileMaker does not allow entry of data into non-global fields unless there is a current record. Since LCFM Native emulates FileMaker's behaviour, If you have not extracted data, enabled syncing or there is no data to sync, then there will be no records and your user will not be able to enter data. You can work around this by including New Record in a script or start-up trigger.

An information service

If your app is providing information to the end user eg its a news collation service, or a guide to trees of the British Isles, then you may want to extract data and present it to the end user in an initial view. It can then be synced and updated from the server as and when you provide new information. An alternative approach could be not to extract any data initially, but to sync and fetch data when a particular screen is visited eg providing information on the Oak Tree only when that entry is visited. This would keep your app small and light for installation.

An offline app

You may be providing a completely offline app to your end user. In this case, you might want to extract all possible data initially, and build the complete and definitive version of your app. It's never going to connect back to the server, so everything needs to be there from the start.

An Admin app

Maybe you have an app that controls a haulage fleet, with different levels of user and various tasks. You want your drivers to see one set of data and your office staff to see something different. In this case you probably don't want to extract data to start with, you want to control syncing on different areas of the app with different user permissions.

Previous Article Edit Your Project to Add Syncing
Next Article Syncing Your Data