I understand that they are architectures and that the idea of these is once the web page is downloaded, it does not download any HTML or CSS or JS again, if not, it only makes calls or requests and is answered with JSON
I understand that they are architectures and that the idea of these is once the web page is downloaded, it does not download any HTML or CSS or JS again, if not, it only makes calls or requests and is answered with JSON
REST (Representational State Transfer) is an architecture that runs on top of HTTP.
RESTful refers to a web service that implements the REST architecture.
In a fairly basic example (of creating a RESTful application), we have a project where we implement a CRUD for houses in PHP and with the MVC architecture, the result of the responses will be returned in JSON, but it is not mandatory to handle only that type
Content-type
, it is can return HTML, text, etc...My model would be something like:
My controller something like:
the 3rd part you could handle it with JavaScript and HTML, where the Js would send the request through AJAX to obtain a result and show it to the user in a friendly way.
The requests could be made to the resources listed below with the corresponding HTTP status and the controller would be in charge of responding to each one of them.
Additional information at:
REST (Representational State Transfer or Representational State Transfer) is a style of software architecture, which not only consists of responding to json, but can also respond to another data exchange format such as xml.
But aside from just responding in an exchange format other than HTML, REST involves other concepts like:
REST is much more than what I just mentioned, so it would be good if you read a little more about what REST really is and not be left alone with the idea that REST is only for responding to JSON requests.
RESTful is often used to refer to web services that run the REST architecture.
Additional Information:
REST is an "architectural style" that basically takes advantage of existing Web technology and protocols.
RESTful is often used to refer to the running web services of such an architecture.