meteor/guide

Inconsistency between naming collections in guide and tutorial

Closed this issue · 5 comments

When you try to follow the tutorial and use the guide as reference to get more details you will encounter inconsistencies as described below. Example is create a new collection:

Guide: https://guide.meteor.com/code-style.html#collections

// Defining a collection
Lists = new Mongo.Collection('Lists');

With explanation:

Collections should be named as a plural noun, in PascalCase. The name of the collection in the database (the first argument to the collection constructor) should be the same as the name of the JavaScript symbol.

Path where you should put it:

/imports/api/tasks.js

Tutorial: https://www.meteor.com/tutorials/blaze/collections

import { Mongo } from 'meteor/mongo';
export const Tasks = new Mongo.Collection('tasks');

Path to put it (https://guide.meteor.com/structure.html#example-app-structure):

/imports/api/tasks/tasks.js
Is there a reason why those are not consistent? To keep things simple? Or is this just not in sync?

The Guide is intended to be as in synch as possible with the full todos reference app (which it is in these cases). It might be a good idea to update simple-todos to line up as well, but I don't think anyone has considered/tackled this yet.

@hwillson yeah, now it's not consistent and it isn't a lot more work to name the files the same way. A user who starts with the tutorial will have to learn a new structure straight after finishing the tutorial which does not make things easier in my opinion.

I have also found this out. You go to the tutorial and go later through the guide. It has a totally different structure.

I think this would be a great fix. If anyone is interested in working on it, here's the repo: https://github.com/meteor/tutorials

I'm closing this issue because it's too old.

We are going to make many updates to the guide in the next weeks and it's better to focus on issues with recent activity. If you think this issue is still relevant please open a new one.