r/learnjava • u/[deleted] • Feb 08 '23
API, REST & RESTfull
what is the difference between API, REST and RESTful?
I was researching articles, blog and what I understood was: API is a ready-made application that can be implemented in your project. REST, an architecture that contains functions: PUT, DELETE, POST, GET, etc. RESTfull, and the application of REST.
But I'm still trying to understand what exactly an API would be? any coding that contains controller, service and model and an API?
Can I create a workshop API and then implement a front end layer on top?
44
Upvotes
16
u/greglturnquist Feb 08 '23
APIs are simply code you can invoke, be they libraries out on the classpath, remote SOAP XML services, or JSON-based web services.
REST is a collection of constraints on remote services such that you dont have to upgrade your client JUST BECAUSE you updated the service. (Stuff like SOAP is much more brittle)
“RESTful” is a spectrum of trying to describe how many (or how few) of the concepts of REST have really been adopted.