K
K
Kirill2021-06-05 00:14:16
Django
Kirill, 2021-06-05 00:14:16

Should I use DRF?

Now I'm making a web application. The entire frontend will be implemented through JS on the client, the server will not affect it. The client will essentially send ajax requests to get a JSON object with info, and then everything itself.
So I’m thinking, should I immediately do the logic through DRF or rivet functions in views.py? I am at the beginning of development, so I want to decide in advance so as not to edit half the project later.
Then I would like to try to make a mobile application.
Already confused completely, what will be better and why?
Maybe the question is somehow stupid, but I still can not solve it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2021-06-05
@deliro

They don't make logic in DRF and don't make logic through DRF. DRF is a controller layer and a display layer. It does the dirty work for you in the form of ACLs, mapping entities back and forth between ORM and JSON, all sorts of filters there. You write logic in services or models
. But DRF is more likely to be used, especially at the beginning of development.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question