I am starting with the first full-stack app, and many questions are popping in my head.
I am not very experienced with DBs so I am having some troubles trying to understand the role that Mongoose has. I used rawly Mongodb for the API project and I was very confident with it, but when starting with this one I read that most of the campers made use of Mongoose. Are my next thought right about what is Mongoose task??
“Translate between your objects in code and the document representation of the data”. Summarizing JSON into BSON, right?
It just makes things a lot easier. Mongoose documentation says “Mongoose provides a straight-forward, schema-based solution to model your application data. It includes built-in type casting, validation, query building, business logic hooks and more, out of the box.”
So you can make your first full-stack web app without mongoose, but it will probably be more time-consuming. You’ll also probably learn a lot more that way. It’s up to you. As my first full-stack app, I chose to go the easier route because it’s an already intimidating task.
@elisecode247@jenovs I read that is not recommendable to have arrays in MongoDb that could grow without limit. I was thinking about how to redesign the voters array, but I think it will be more productive to start with the app instead of thinking so much right?
Don’t overthink it There are enough moving parts to keep you busy. These arrays won’t grow too much, but I also read that such arrays should not be inside a document.