mercredi 22 janvier 2020

Is it right to use query to database in my Business Logic Layer?

I have a music database. Suppose I need to show the user recommended songs. This will require many different SQL requests to the database. But since the recommendation search algorithm will contain business logic, it will be wrong if I implement it in Data Access Layer.

So what better way to do it? Put an algorithm in Business Logic Layer and implement it using methods from Data Access Layer? In my opinion it will be a little inconvenient.

Sorry for the possibly stupid question, I'm just trying to understand all these layers.

Aucun commentaire:

Enregistrer un commentaire