3 ms·
Django apps can be the modular part of a modular monolith, but it requires some discipline. Django apps do not have strong boundaries within a Django project.
by halfcat 2y ago
Django apps can be the modular part of a modular monolith, but it requires some discipline. Django apps do not have strong boundaries within a Django project.
Often there will be foreign keys crossing app boundaries which makes one wonder why there are multiple apps at all.
In fact some people opt for putting everything into a single app [0]. Others opt for no app [1].
Django apps are good for installing Django packages into Django projects. But there’s no firm mechanism that enforced any real separation. It’s just other Python modules in a different folder (that you can just import into your other app).
The rule would be something like, if you can’t pip install your Django app into a project, it’s probably too weak of a boundary (that might be a bit too extreme, but if it is, it’s not too far off).
[0] https://careers.doordash.com/blog/tips-for-building-high-quality-django-apps-at-scale/ https://careers.doordash.com/blog/tips-for-building-high-qua...
[1] https://noumenal.es/notes/django/single-folder-layout/ https://noumenal.es/notes/django/single-folder-layout/