Should I organize my folders by business domain or by technical domain?
- by Florian Margaine
For example, if I'm using some MVC-like architecture, which folder structure should I use:
domain1/
controller
model
view
domain2/
controller
model
view
Or:
controllers/
domain1
domain2
models/
domain1
domain2
views/
domain1
domain2
I deliberately left out file extensions to keep this question language-agnostic.
Personally, I'd prefer to separate by business domain (gut feeling), but I see that most/many frameworks separate by technical domain. Why whould I choose one over the other?