Help Wth my Meal Planning App

Hi,

I am currently developing a Meal Planning App. I
am new to MIT APP inventor (or App development). I need to store data(food items and its nutrient information like calorie,protein etc) Each user of the App should have his own data base based on his eating habits.But few common items like sugar,salt also will be there in the database when s/he install the App.

  1. If Tiny db is used, every time the user enters a new food item , the older ones will be replaced which should not happen.

  2. I want the data to come with the app, so is it possible to use csv?

What would be the best storage option for the above requirement.? I am sorry if it is a silly question

Thanks in advance.

Welcome @Soumya_Somasundaran

Silly question? No, it is a very good question.

TinyDB data is stored on the device. This will work for single or multiple users but they have to use the same device to store their data (Use a different Tag for each user or a different 'namespace' for each user. See TinyDB.

CloudDB and FirebaseDB store data 'in the cloud' where the app can access the data from multiple devices.

..the older ones are not necessarily replaced when you add new data; what happens with your data depends on how you structure the database

Yes, you can provide a comma separated value file to provide initial database information. Load the csv with a File control File
or using a Web component and data of a Google spreadsheet)

What is best depends on what you want to do. A TinyDB is simple but only works on a single device. What you do depends on what you have coded so far. Other developers will have different opinions.

Here are some resources to help you learn to use the AI2 tools. A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles

How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .

Also look here App inventor español. Offline. Tutorial. Ejemplos. Instalación. Códigos. Juegos. Curso gratis de App inventor. and here Tutorial Index | imagnity for more tutorials.

Learn about components Component Reference

and visit the Library The MIT App Inventor Library: Documentation & Support

Here is a link with a video showing how to make a shopping list and save it https://www.youtube.com/watch?v=K2mDF2txTVo . That sounds very similar to what you want to do; you would have to adapt the tutorial. The tutorial might help you get some ideas about how to organize your app which seems a little like a homework assignment. There are some other ideas post in the MIT Gallery that mostly seem to be work in progress. Also try this video https://www.youtube.com/watch?v=0g3LlYOckcA

Regards,
Steve

1 Like

Thank You so much. Will go through all those resources and choose between Tinydb and csv. WIll come back if I have more queries

Regards
Soumya