What is the difference between implementing a RESTful web service and a plain HTTPServlet. All GET/POST/DELETE/PUT are supported in Servlet as well as any REST API.
Put simply, there are no differences between REST and RESTful as far as APIs are concerned. REST is the set of constraints. RESTful refers to an API adhering to those constraints. It can be used in web services, applications, and software.
HTTP servlets can read HTTP headers and write HTML coding to deliver a response to a browser client. Servlets are deployed on WebLogic Server as part of a Web Application. A Web Application is a grouping of application components such as servlet classes, JavaServer Pages (JSP), static HTML pages, images, and security.
HTTP is a communication protocol as we have just gone over. So an HTTP API is just an API ( a system that helps two software entities communicate with each other ) that uses HTTP to communicate and doesn't have any other major modifications or constraints placed upon it.
The HttpServlet class extends the GenericServlet class and implements a Serializable interface.
REST is really an architectural style used when designing an API on a server. HttpServlets can be a method of implementing a RESTful web service.
REST describes a style where HTTP verbs like GET/POST/DELETE/etc. are used in a predictable way to interact with resources on a server.
I'd recommend reading through the REST Wikipedia page for a good overview.
REST is an architectural pattern (abstract), while servlets are an implementation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With