Answer the question
In order to leave comments, you need to log in
Why use a REST API when you can do everything manually?
Hello!
I'm just wondering (maybe I'm wrong) but please explain why you need to use the REST API?
for example, I will make my admin panel js framework .. when working, I need to get create, delete data from the database. And they said at this point you need to use the REST API. I read a few docs on the REST API .. if I understood correctly there is a simple structure that we will do manually. That is, we get the data, edit and delete it .. And so the question is
Can I use my structure? for example get all posts by sort edit delete and just return all the result in json format. and here I can make my own conditions.. that is, get data (using my own filter, JOIN) or create or edit data according to several conditions, etc. at the same time, I simply create my own controller and action that will return responses according to the condition.
Can this be done? what is the best REST API? Maybe I almost didn’t understand why the REST API is needed,
if it’s not difficult to explain in detail about the REST API (and my version of what is the minus and plus)
(by the way, if I wrote it wrong somewhere, then sorry for the mistakes)
Answer the question
In order to leave comments, you need to log in
REST is just a recommendation so that others will understand you later. The use of json in REST does not contradict the principles of REST, many even confuse one with the other, although it's like comparing stone with butter.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question