I start with a small Rails3: MongoDB: Mongoid project and come up with some questions about the nature of architecture.
When to use the invested resources and how deep is the nest?
I am not a friend of nested routes in general, but they become convenient if they do not fit deeper than 2 resources, and document-oriented databases such as MongoDB seem to be an ideal target for nesting in general, since the documents themselves are nested.
So my first question is: should I use nested routes in case of reference_many <=> referenced_in?
I tried, and since ActiveRecord "build" does not exist, all the controller material slows down to something that looked much nicer, not nested at all, and all this was done manually.
Am I really wrong? Should I also set up routes for such associations?
After that, I came to my first attached documents and argued: Hey, this requires nesting routes. A few iterations later I ended up with 4 instead of 2 documents, each of which was embedded in one of the others. Therefore, the nesting of the routes led to a URL that I really didn't like.
So, the question is already the MongoDB user experience: should I socket? And if so, then under what circumstances and how deep?
hello J.