Top Three MongoDB Tools in 2020 (1/3)
Back

Top Three MongoDB Tools in 2020 (1/3)

Our main product is a MongoDB GUI, and all of our internal tools and databases are MongoDB based. We live and breathe MongoDB, and because of that, we see all sorts of MongoDB tools and services released all year round.

This year, we’ve decided to share with you our 2020 pick of the top 3 MongoDB tools and services we use the most.

This is the part one of a three posts series.

Mongoose

Mongoose is an open source MongoDB ODM (Object Document Mapping) based on the native MongoDB nodejs API. It’s a complete framework that handles the entire lifecycle of your objects, from schema definition, to objects validation, to documents versioning.

Here's a list of the features we like the most :

Schema definition

Schema definition is probably our favorite feature of Mongoose. It lets you model your objects with type requirements, validations and default values.

Our code source is version controlled and we define our models in a single place. This combination makes it very trivial to have a bird eye view of our entire database at any given time.

We used to rely heavily on the validation feature up until recently, but we moved to an internal validation framework that does a multi-step validation from the entrypoint of all of our controllers to the end of the request pipeline.

Plugins

The Mongoose Plugin system is a way to share logic and capabilities between schemas. We use it extensively throughout our codebase. One trivial example is the use the timestamp plugin which adds a created_at and an updated_at fields to every models. Another example is an internal ACL plugin we use to handle access and permissions on all resources created through Mongoose.

Populate

joins across collections in MongoDB do not feel as natural as they do in relational databases. MongoDB introduced $lookup a few years ago, but it's not intuitive and still very limited.

Mongoose overcome those shortcomings with a concept called Populate.

Populate automatically replaces the specified paths in a document with documents from other collections.

Mongoose has a lot more to offer. Check out the documentation and especially don’t hesitate to sponsor if you like it.

This is it for part one of our top picks of MongoDB tools. If you liked it, follow us on Twitter @humongousio.