The stack is rails 3, mongoid, cancan, & jquery hosted via Heroku, mongolab, S3 (for attachments).
Any CMS will have User, Article, Link, & Attachment classes--in our case, Activity takes the place of Article. Our schema adds:
- Standard: A curriculum standard which the activity cross-references. So far we include the California K-5 standards.
- Material: An activity includes materials. The list is crowdsourced.
- Term: An activity includes vocabulary terms. The vocab is crowdsourced.
The most interesting tradeoff is the Activity/Material relationship. There must be enough material for each activity. The quantities are classroom, small group, student. Instead of creating a join class ActivityMaterialQty, there are three many-many relationships.
Another tradeoff is object creator fields are string-valued instead of many-many-User relationships. I should probably switch to BSON::ObjectId.
It would be nice if mongodb supported case-insensitive sorting. I'm working around this by sorting in memory. I should switch to denormalized, lowercase fields.
No comments:
Post a Comment