Firebase vs JSON question PLEASE & THANK YOU

Hi there!

I am building an app that acts somewhat like a money-manager app or financial manager app and I need continuity of data in between application builds. I was wondering if it is better to do this with a JSON format or by utilizing Firebase.

When a user first opens the app they will be prompted with questions (i.e. what is your salary?) and I need the user’s responses to be saved so that when the app is opened again later, their information is still intact and can be manipulated later.

Which would be better to use? I originally figured Firebase but I am not sure.

Thanks for the help!

Hi Matt,

In terms of user Information if you need to save just a couple variable like userId and salary, I would use use UserDefaults.standard ad save it or retrieve it there.

Your choice of database or JSON really depends on what you want to do with the data. If you are just loading the latest data from an online JSON file, that works well. Iif a user needs to interact and change the data, you will need a database.


1 Like

Ah, gotcha!

I want my app to be able to display to the user information about their finances and budget (i.e. how much money they have left to spend on x, y, or z).

I’d like the users to be able to go in and change their own data if they need to, so I think using JSON may be good enough?

Thanks for your help!

Hi Matt,

In my experience a JSON format is great for static data, like daily weather data you would collect from a service to display in your app. For dynamic data like you describe you really need a database.

If you have not take the database course, I highly recommend it. Chris has an excellent introduction to Core Data on youtube as well. Just be sure you have a good grasp of the iOS development basics before you dive into working with a database. It is the next step in working with iOS development.

I have been a real fan of Realm, but since it was sold off, I have returned back to Core Data. Timing was great for me as Chris launched his corse right when I needed a refresher!

Lastly, google Ints and Doubles for financial calculations. There is a learning curve there, which I learned the hard way when I created a simple loan record keeping app.

Happy coding!