"From this we can tell that the schema is only a representation of the data structure, however it is the model which makes use of this structure to perform the actual operations on the database because it has all the necessary underlying tools for this." I feel like this is another instance of something being explained too early -- what does it mean here by tools? The whole two paragraphs are abstract unless the reader or student knows concretely what you mean by tools. I'm having a hard time following this definition. Even though they're explained further on, you should at least provide one concrete example in the sentences.
"Note: Use POST when you want to add a child resource under resources collection.)". Extra parens, I'm also not sure why this is a special case of
creating a new resource. That is, if you generally say you want to create a new
resource, it would make sense that you would POST it even for a child resource.
"as an object in the body" -> "as an object in the request body"
I find the whole usage of "Note:" strange -- most of these notes are just the main point and should be part of the main content.
I think it's confusing how the section on Update has two examples, one with a partial object and one without. You should clarify that the behavior of PUT depends on the implementation made by the API author, so it could be either. There is no guarantee what the protocol for modifying an object would be.
1.1 Model View Controller
In the project structure, you should put / after directory names, i.e., node_modules/
I feel there should be more discussion about why following a pattern is important, such as MVC. What happens if we don't use it? Developers get confused, it's hard to understand what classes have what responsibilities, makes code harder to scale/maintain, etc.
1.2 Principles of setting up your schema
Perhaps emphasize the downsides of data duplication (for example if you want to change the structure, it may become much harder to fix existing data etc, compared to relational databases), give a concrete example of when it might not be so harmful to embed
Perhaps include some concrete examples of when one choice might be better than another. The section is a bit abstract
1.3, 1.4, 1.5
Labs look fine
2 Models and Controllers in Mongoose
acheive -- typo
Section is fine
2.1 Crud with Mongoose
Assignment link is broken?
3 Building Custom Methods on Mongoose
fiew -- typo
In the first paragraph of the virtual fields section, I would say something about how these fields are often computed from existing fields, and then add a sentence that gives an example ("such as a full name field, which is computed from a stored first name and last name"). This is the example later on but it's better to give a reader a short, verbal example, so that they will immediately understand the concept before reading the example.
3.1 Building Custom Methods
I feel like the endpoint would be /api/authors/AUTHOR_ID/similar rather than similar-authors, and also I think REST endpoints are generally avoiding hyphens
1 Schema and CRUD
POST
when you want to add a child resource under resources collection.)". Extra parens, I'm also not sure why this is a special case of creating a new resource. That is, if you generally say you want to create a new resource, it would make sense that you would POST it even for a child resource.1.1 Model View Controller
/
after directory names, i.e.,node_modules/
1.2 Principles of setting up your schema
1.3, 1.4, 1.5
Labs look fine
2 Models and Controllers in Mongoose
2.1 Crud with Mongoose
Assignment link is broken?
3 Building Custom Methods on Mongoose
3.1 Building Custom Methods
/api/authors/AUTHOR_ID/similar
rather thansimilar-authors
, and also I think REST endpoints are generally avoiding hyphens