meteor / todos

The example app "Todos", written following the Meteor Guide
Other
535 stars 367 forks source link

Explaining the complex folder structure #97

Closed Domiii closed 8 years ago

Domiii commented 8 years ago

If I am not mistaken, this is supposed to be an example for learning meteor. Is there any chance, you can actually explain a few things to support the learning experience? Since I have never seen this sort of scaffolding prior to v1.3, I have a few questions (and I am sure, many others have the same). For that reason, I would love to at least see some references to reasoning and design decisions in the README. Specifically I am wondering what the design rationales and guidelines behind this app's scaffolding are?

I know that these questions do not have a standard answer, but in order to better structure my own apps, I am particularly interested in why the authors decided to go down this road (and what the bigger picture is).

I also know that this is not the place to ask these sorts of questions, but I do think that the README should at least have some reference to help find the answers and facilitate the learning.

tmeasday commented 8 years ago

http://guide.meteor.com/structure.html#javascript-structure :)

Why is client/head.html not in imports/ui even though it mostly does view- and UI-related things?

This is because the <head> tag is not evaluated in to JS (unlike <template>s and the <body> tag) and thus cannot be imported. This is a bit of a gotcha.

It seems like the (many many) server and client folders never contain sub-folders. Is this part of the rationale or just accidental?

I think we mainly just use these for making test files that just run in one context (as test files aren't imported).

Domiii commented 8 years ago

Thanks! :)