Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it Mongo.Collection or Meteor.Collection?

In the source code in the example apps I've viewed including http://thejackalofjavascript.com/meteor-js-build-apps-lightning-fast/ and https://www.meteor.com/examples/wordplay the former used Meteor.Collection() and the latter used Mongo.Collection() to define their collections. What is the difference between the two and what is the difference in use cases?

like image 365
rashadb Avatar asked Sep 10 '14 03:09

rashadb


People also ask

What is Meteor collection?

Collections are Meteor's way of storing persistent data. The special thing about collections in Meteor is that they can be accessed from both the server and the client, making it easy to write view logic without having to write a lot of server code.

What is Meteor MongoDB?

Meteor provides a complete open source platform for building web and mobile apps in pure JavaScript. The Meteor team chose MongoDB as its datastore for its performance, scalability, and rich features for JSON. Meteor apps run using JavaScript via Node. JS on the server and JavaScript in the phone's browser.

What is Meteor database?

The Visual Meteor DataBase (VMDB) The VMDB contains about 3,000,000 meteors obtained by standardized observing methods which were collected during the last ~25 years.

What is mini Mongo?

About. minimongo is a lightweight, schemaless, Pythonic Object-Oriented interface to MongoDB. It provides a very thin, dynamicly typed (schema-less) object management layer for any data stored in any MongoDB collection. minimongo directly calls the existing pymongo query syntax.


2 Answers

Meteor.Collection was renamed Mongo.Collection in 0.9.1. The change is currently backward compatible, however you should switch to using Mongo.Collection for any new projects. It looks like the docs have mostly been updated except for the wording in the Data and security section.

like image 182
David Weldon Avatar answered Sep 21 '22 11:09

David Weldon


As per change in Meteor 0.9.1: https://github.com/meteor/meteor/blob/devel/History.md#backwards-compatible-renames

Backwards compatible renames:

Symbol renames:

Meteor.Collection -> Mongo.Collection

Meteor.Collection.Cursor -> Mongo.Cursor

Meteor.Collection.ObjectID -> Mongo.ObjectID

Deps -> Tracker

like image 23
sravanthi Avatar answered Sep 20 '22 11:09

sravanthi