0

I'm new to the noSQL-Thing (I use firebase Realtime-Database for starters) and I'm writing a react-js app to manage Meetings and their Agenda Points.

The meeting has some attributes(name, planed duration, Start time, ... ) and the Agendaitems as well (name, planed duration, ... ).

So, my first intuition was to make a class Meeting with a Map of AgendaItems - but the Map doesn't get save in the firebase.

Then I tried a simple array - this works but I read "Arrays are bad in firebase"

So, whats the best strategy here? (I know that is probably a very Basic question)

And, would you put more "advanced" functions in the same Class? - e.g.: "nextAgendaItem", "addAgentaItem" to capsulate these implementation or would you build a own "HandlerClass" witch has a Meeting as member

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Mike Zwgr
  • 1
  • 2
  • 1. You should store your data in a simple Object. Because firebase stores data in objects, it will be easy for you to parse data. And it also creates consistency for storing data. 2. There is a simple strategy for storing data in firebase. You will have to first think of the way you want to retrieve the data. That means if you will be having requirements to fetch "Meeting & AgendaItems" both at each time, then you should store them in a single node. – Tushar Sheth Mar 23 '18 at 12:10
  • Thanks for the advice - i think i start to get it ;-) any good links on that subject ? i would like to see a more real world implementation - on the fire-base a just small examples .. – Mike Zwgr Mar 24 '18 at 17:22

0 Answers0