Skip to content

Catalogs, Questions and Entries

Graham Powrie edited this page Jun 18, 2014 · 2 revisions

Catalogs are a collection of Questions that, when answered, boil down to a score. An Entry are these questions and their responses tied to a particular date. Basically an Entry is the instance of a Catalog.

Usually these Catalogs reflect real world analogs, like the CDAI. https://github.com/lmerriam/CDAI/blob/master/app/catalogs/cdai_catalog.rb

Entry is a container for filled out Catalog (or many catalogs) responses and can be "performed" or calculated based on the Catalog calculation specifics. Entrys are stored as documents in a CouchDB for schema flexibility. https://github.com/lmerriam/CDAI/blob/master/app/models/entry.rb

Catalog scoring is generalized the CatalogScore module which provides a framework for different actions all Catalogs must take to save their scores, as well as summing each "score component" that are unique for each Catalog. Currently each score component is expected to produce an integer that will be summed with all other components. Any particular maths needed must be done inside those component definitions. https://github.com/lmerriam/CDAI/blob/master/app/catalogs/catalog_score.rb

Clone this wiki locally