10
My webapp has a composite structure i.e. each Category collection can contain a mixture of individual Items and other Categories as its rows/nodes/children (not sure of the correct terminology here). In actual fact, it's a little bit simpler than that as each collection is represented by a model, Category, so essentially each Category collection has both Item models and Category models as its children.
In general is this an advisable way to implement this structure using MVC? More specifically, in Backbone.js is it possible for a collection to have a model factory (taking the json and calculating which model to generate based on the json's structure) instead of a static model property?