To make the navigation a bit easier, It would be helpful if links to Previous and Next sections of the tutorial can also be added to the top of the page as well.
So how about the aldeed:collection2
package? I see you’re making use of aldeed:simple-schema
, but then show only how to validate manually.
Does the collection2 package still work with Meteor 1.3? Is its use recommended? Any disadvantages to validating automatically rather than manually?
Is it still considered best practice to load the collection as a global variable?
Negative - you’d want to import it wherever you use it. Like in the todos example app:
Exporting:
Importing:
@sashko I’ve been doing this recently, but now I can’t access that collection on the browser console. Is that supposed to be the case? Also, it seems slower which makes me feel like minimongo isn’t being used.
It’s definitely not slower, it’s exactly identical to before.
If you want to access from the console I’d suggest putting a:
global.Lists = Lists
near where you export it.
Interesting. I must be doing something else wrong, because it seems to be making the round trip call to the server db before updating my view. Thanks!
Did you import your methods on the client?
Yes, and tested that both the client and the server methods are being called. Can’t figure out where the latency is coming from, but only started happening today after I moved to modules.
Why is there no mention of Astronomy in the guide?
See the discussion here: https://github.com/meteor/guide/issues/10
At the end of the day we felt we had to make a decision so we picked simple schema.
You could at least mention that there is an alternative, since Astronomy is in some peoples (plural since I think there are more than me ) view preferrable?
Yeah, we should mention it. I’m not sure what the best format is.
Is the Lists.deny
lines in the code above from Todos necessary? I thought all collections were deny by default as long as the insecure package is not installed.
Yes - if you read the text right next to it, it says that we add that so that nobody else can ever accidentally call allow
on that collection.
Thanks for clarifying, but I must be blind because I don’t see the “accidentally” quote.
Ohhhhhhhhhh wait I got totally confused. You were referring to the code snippet above from Todos. I was thinking of this section: http://guide.meteor.com/security.html#allow-deny
My mistake.