Better to lump everything together under m/v/c folders or seperate module folders with m,v,c files? Better to lump everything together under m/v/c folders or seperate module folders with m,v,c files? flask flask

Better to lump everything together under m/v/c folders or seperate module folders with m,v,c files?


I'd say it depends on the app's size.

  • For small to tiny apps you can have one flat package or even a single file.
  • If your app is medium-sized, one level of grouping (models, views, forms) will do.
  • If the app is going to be larger, two levels are better. If the modules of the app are tightly interconnected, then maybe you can split first into model/view, then by module, but usually modularization is all about making them independent, so it's logical to split by module, then, for large modules, into model/view.