0

I see that userData and datastore are 2 somewhat similar frameworks provided by BuildFire to help developers build robust mobile apps. In their respective documentation (listed below), they have similar wording. I get that they are both ways of storing data, but I would like to know what each framework's intended use is? What are the optimal use cases for each, and what is the criteria for choosing one over the other?

datastore: https://github.com/BuildFire/sdk/wiki/How-to-use-Datastore

userData: https://github.com/BuildFire/sdk/wiki/User-Data:-Save-user-data-from-the-widget

My "guess" would be that userData is for saving information that is user-specific, but can't this information also be stored in the datastore as well? I would love a clarification.

Yoon
  • 1
  • 1

1 Answers1

2

So there are 3 data storage services in BuildFire.

  • DataStore: Think of this as a CMS. Read and Write on the control panel and Read-Only on the widget/app side. It also has draft and live mode. Basically as you change the data in the control panel the app doesnt see any of it until you hit publush

  • UserData: This is read/write on both the control and the widget side. However, this is tied to a particular user. Meaning, all data is under the scope the currently logged in user

  • PublicData: Is similar to UserData -read/write everywhere- however, its scope is across all users. Meaning, all users can access and change data in public data.

It is worth mentioning that all these methods are automatically scoped to a plugin instance. Which means that data changed in one plugin instance will be completely independent of all other plugins

I hope this helps

Daniel_Madain
  • 491
  • 4
  • 9