About RESTful services

Representational State Transfer (REST) is a new technology that suits the requirements of flashing the requested contents from a database on to the web browser screen. A service is described as RESTful when it conforms to the tenets of REST Data Services implemented.

Web services enable applications to interact with one another over the web browser or any similar platform independent environment. In a typical web services scenario, a business application sends a request to a service at a given URL by using the protocol over HTTP. The service receives the request, processes it, and returns a response. The web services is found in the URI format and method of the service is described by the HTTP method like GET, POST, PUT, and DELETE.

RESTful services terminology

The following are some major terms related to RESTful services:

  • RESTful service: An HTTP web service based on the RESTful architecture.
  • Resource template: An individual RESTful service that is able to service requests for some set of URIs.
  • Resource module: A group of related resource templates.
  • URI template: A URL that is formed for doing a particular action using the bind variable attached to it. For example, the pattern employees/{id} will match any URI whose path begins with employees/, such as employees/301.
  • Resource handler: This is a query or an anonymous PL/SQL block that handles a particular HTTP method. Only one resource handler per HTTP method can be used.
    select empno, ename, dept from emp where empno = :id
    
  • HTTP operation: Standard methods that can be performed on resources: GET (retrieve the resource contents), POST (store a new resource), PUT (update an existing resource), and DELETE (remove a resource).

RESTful services requirements and setup

For you to use the RESTful services features in SQL Developer, Oracle REST Data Services 3.0 must be installed and running.

You can use the Oracle REST Data Services Install wizard to install and run ORDS in standalone mode. This method is well explained in the initial sections of this chapter.

We can run the Oracle REST Data Services installer from the command line too.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset