Oracle REST service examples with Oracle Jet

December 1,2016

Oracle JET which is a collection of open source JavaScript libraries (like Jquery, Knockout, RequireJs,Cordova) along with a set of Oracle contributed JavaScript libraries provide a simple and efficient platform to the advanced JavaScript developers to build applications that consume and interact with Oracle products and services, especially Oracle Cloud services. Oracle JavaScript Extension Toolkit (JET) - empowers developers by providing a modular toolkit based on modern JavaScript, CSS3 and HTML5 design and development principles. The main beauty of this framework is that it leverages popular open-source technologies , so it has rich sets of UI components. It can be configured for both LAMP & MEAN framework. But I have observed that with MEAN we have more advantages. In another blog I will explain, how we can configure Oracle Jet on Express Js using both YO & Express generators. It is essential for oracle developers to start reading Jquery, Knockout, RequireJs,Cordova user manuals also prior to start using Oracle Jet goodies. In this blog , I will explain how to create a REST web service on a Oracle Table and how to use it in Oracle Jet code.

Installation Tips

  • Install a demo XE database and configure listener services
  • Install Apex 5.1.1
  • Configure Apex for Embedded PL/SQL gateway
  • Configure Apex for ORDS (Oracle Rest Data Services
  • Start ORDS services

  • Java -jar ords.war standalone --port 7081 --apex-images --doc-root
  • Connect to Apex Admin console to create a workspace
  • I have created a workspace name 'userbase' Now,Connect to ORDS console [http://HOST:7081/ords] with new workspace and in SQL workshop tab click Restful Services to create rest services

    Create a rest web service – example EmployeeData

  • Test the REST web service Call the rest web service – example [http://<>:7081/ords/userbase/hr/employees/100] Where 100 is specific employee ID Call the rest web service – example [http://<>:7081/ords/userbase/hr/employees/0] Where 0 for all employees
  • Configure Oracle JET
  • To use this newly created REST in Oracle JET use the sample codes in view and viewModels
    Now you are ready to view the data in Oracle Jet , invoke the view page and you will see following data '