Question

In Django, the suggested software architecture is to put all business logic and data access in models.

But, some colleagues have suggested that the data access layer should be separate from the business logic (business service layer). Their justification is that the data access layer can isolate changes if a different data source is used. They also say that there is business logic that can be in more than one model.

But, when I start coding using the separate data access and business logic layers, the data access layer is simple (basically the model code that defines the db schema) and it does not seem to add much value.

Is there really value in separating out the data access from django models or does django already provide a sufficient data access layer with its ORM?

I'm looking for developers that have implemented a fair number of django apps and find out what their opinion is. This is for a small to medium sized web app.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top