New Package : Schema Templates for aldeed:collection2

This provides prebuilt re-usable autovalue schema templates to be used with the meteor aldeed:collection2 package.

Automatically, and very quickly, include useful values in your collection schema such as the following :

  • CreatdAt date
  • UpdatedAt date
  • CreatedBy userId
  • UpdatedBy userId
  • history

its available on atmosphere here https://atmospherejs.com/pushplaybang/schematemplates
Or find it on Github : https://github.com/Pushplaybang/Meteor-schema-templates

5 Likes

Interesting. I think it would be helpful if you also documented the schemas you’re actually creating. As the collection2 docs already contain sample code for createdAt and such, it would be interesting to know how your implementation differs from that.

Hey Waldgeist,

It is similar, but the point its includable with a single line, rather than repeating that code throughout your codebase, so to add the ‘createdAt’ or createdBy field all you need to do is the following

SchemaTemplate.createdAt

I found this really helpful in slimming down my code and making my schema a lot more readable and helping to get my schema’s done faster. I’m also planning to expand this in time