DEV Community

Discussion on: Mongodb-native over mongoose?

yentsun profile image
Max Korinets • Edited on

Surprisingly I'm doing some frontends right now and use React Hooks too :) I'd say Hooks is a beautiful piece of technology (rarely seen nowadays) and I'm really excited about it!

My advice will probably be:

  • if you joined an existing project - you won't have the luxury to get away from MVC in near future as employers consider it a standard and you will have to do it
  • don't forget that there is something else, try non-MVC on a pet project
  • dig CQRS + Event Sourcing (until you fully understand what it is, seriously) - this will be a revelation, also altering your mindset a bit
  • after digesting CQRS/ES, you will likely discover that MongoDB (in its initial state, no schemas) is an ideal read-only 'projection' storage rather than general data storage. It looks like being under pressure by the industry, so it tries to be a general data storage. Emerging of Mongoose is probably the result of this pressure too :)
  • Postgres (or other flavours of SQL-based storages) on the other hand, is a better general data storage - schematize your data to your heart with the variety of types
  • haven't tried Flutter but I have strong confidence in React Team, I'd probably prefer their stuff. I haven't touched mobile development yet though :)