When to create a new app (with startapp) in Django?
James Bennett has a wonderful set of slides on how to organize reusable apps in Django.
I prefer to think of Django applications as reusable modules or components than as "applications".
This helps me encapsulate and decouple certain features from one another, improving re-usability should I decide to share a particular "app" with the community at large, and maintainability.
My general approach is to bucket up specific features or feature sets into "apps" as though I were going to release them publicly. The hard part here is figuring out how big each bucket is.
A good trick I use is to imagine how my apps would be used if they were released publicly. This often encourages me to shrink the buckets and more clearly define its "purpose".
Here is the updated presentation on 6 September 2008.
DjangoCon 2008: Reusable Apps @7:53
Slide: Reusable_apps.pdf
Taken from the slide
Should this be its own application?
- Is it completely unrelated to the app’s focus?
- Is it orthogonal to whatever else I’m doing?
- Will I need similar functionality on other sites?
If any of them is "Yes"? Then best to break it into a separate application.