Why do I need Mongoose or Mongojs for Node.js? -


major questions

currently i'm confused, main questions are: what use of mongoose/mongojs? different if run node.js without mongoose/mongojs?

i can't find explanation of big picture of how mongoose or mongojs fits node.js.

mongoose's slogan: "elegant mongodb object modeling node.js" not helping.

minor questions

btw, think mongoose , mongojs doing same type of thing node.js (i.e. interchangeable), this page seems describing mongojs quite differently mongoose: "simple driver emulates mongodb api as possible." might wrong in putting mongoose , mongojs together. if so, please clarify well.


maybe shouldn't use mongojs since stackoverflow doesn't have tag it. if so, ignore said above mongojs.


while on topic of giving big picture of node.js mongoose , mongojs, else on this page should know?

thanks.

if you're not using mongodb, database, there no need have type of driver/odm solution. nodejs run fine without these.

if attempting connect mongodb database instance, need sort of driver. have never heard of mongojs, maybe referring mongodb driver? driver communicate database, such saving documents or retrieving them.

mongoosejs object modeling library. sits on top of mongodb driver , manages relationships , object mapping. can detect changed properties in objects, , run validation , update operations.

long story short: don't need explicitly install both, mongoose include mongodb driver when installing through npm. don't need either if not connecting mongodb database.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -