Django apps - using multiple apps

Yesterday we considered a single app. Today it is multiple apps. The approach here is to list different parts of the project as separate apps in the INSTALLED_APPS setting.

The main question when it comes to multiple apps is what criteria should be used to create a new app? When a single app has gotten too big? or covering too many concerns? There is no single right answer here and it it down to the architecture of the overall project. My personal stance is that each app should be a logical unit of functionality, that could potentially be moved out of the Django project if required. I tend to think of apps as an abstraction to enable thinking or grocking the codebase at a higher level of thought, especially when it comes to dependencies. A well architected Django project at the 'app' level should have a single directional dependency graph.

The other main benefit is the separation of concerns when working on a codebase, the migration dependencies will be more complex, but this allows for more changes at a single point in time. Two developers can work on separate apps without a concern for clashes in the dependency graph of the migrations.

The obvious drawback is the increased complexity in the project structure and moving models between apps is doable but a not trivial task. You need to know what you are doing. This can happen when the logical dependencies are not thought about upfront, but are often thought about when the codebase is a mess.