I am developing a REST API using Django Rest Framework. This API deals with a high number of resources that are divided into "business areas".
I should be developing this API so that the resources from the different business areas are independent and can be used individually in contexts other than the project I am working on.
My question is: should I be using different DRF projects, or different Django apps for each business area? Ie,
|- businessarea1_api_project
|- core_app
|- api_documents
|- businessarea2_api_project
|- core_app
|- api_documents
|- big_api_project
|- businessarea1_api_app
|- businessarea2_api_app
I am assuming that using different apps helps me in the sense that I can use Django's reusable apps to create a package for each business area, and then I can install them in the projects they are required. Using different projects helps in the sense that i have an individual API running for each business area that can be called whenever needed, together with other APIs or not. Is this it? Are there other factors that I should be considering? Which one is better?
Thank you!
I would definitely go for the "big API project" way. You'll get:
INSTALLED_APPS
setting.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.