Embedded Model Designing -- top down or bottom up?

Posted by Jeff on Programmers See other posts from Programmers or by Jeff
Published on 2014-06-11T15:41:28Z Indexed on 2014/06/12 21:38 UTC
Read the original article Hit count: 307

Filed under:
|
|

I am trying to learn RoR and develop a webapp.

I have a few models I have thought of for this app, and they are fairly embedded. For example (please excuse my lack of RoR syntax):

Model: textbook
    title:string
    type:string
    has_many: chapters

Model: chapter
    content:text
    has_one: review_section

Model: review_section
    title:string
    has_many: questions
    has_many: answers , through :questions

Model: questions
   ...

Model: answers

   ...

My question is, with the example I gave, should I start at the top model (textbook) or the bottom most (answers)?

© Programmers or respective owner

Related posts about mvc

Related posts about ruby-on-rails