mardi 3 novembre 2020

Service vs Repository in js to request API

I am developing multiple classes that are able to request a backend API at different endpoint, to retrieve model information (as articles, comments etc..).

The common used pattern is called "Repository", but I've often read that this pattern is more related to "persistence in data". The problem here is that I don't store the data, I just request it and use it. And if I want to store it, I use Vuex.

My question is : should it be considered as repositories classes ? Or is it more like "services" classes ? How would you name it ?

Thanks

Aucun commentaire:

Enregistrer un commentaire