20 April 2017

Oracle RENO

Oracle RENO

R = REST
E = Express
N = Node.js
O = (Node)OracleDB

I've read an article about an REST Api with Node.js and Node-OracleDB at the website of Amis and at the website of Sivakumar Balagopalan.

This inspired me to write a application on the employee table inside the HR schema. The url http://machine:3000/employees fetches all rows in the employees table.

 The url http://machine:3000/employees/200 fetches the employee with employee_id 200 from the employees table.

I implemented the following:

POST /employees Create a new employee
GET /employees Read all the employees
GET /employees/:employee_idRead the employee with the given employee_id
PUT /employees/:employee_id Update the employee
DELETE /employees/:employee_id Delete the employee                         

Now I'm able to show the result inside an Oracle JET application:

19 April 2017

Setting up a development environment


I'm setting up a new development environment so I can do some development with JavaScript, ApEx and REST.

Gitlab on Raspberry Pi
I've a Raspberry Pi 3 and followed the installation instruction on https://about.gitlab.com/2015/04/21/gitlab-on-raspberry-pi-2/. After the installation I have a working gitlab on the Raspberry and I created new projects inside gitlab. 

Pre-installed appliance
I've downloaded the "Network Applications VM" from Oracle Technet. The appliance contains the following: 
  • Oracle Linux 7 
  • Oracle Java JDK 7 and 8
  • Oracle Database XE 11g
  • Oracle Enterprise Pack for Eclipse
  • I updated the Oracle Linux with the latest patches and then I downloaded a new version of Oracle ApEx (5.1.1) since a older version is part of the XE database inside the appliance. I also downloaded ORDS (Oracle REST Data Service)  for the access to ApEx and setting up REST.

    Additional Software

    I downloaded some additional software and installed it inside the appliance
  • Netbeans 8.2
  • Visual Studio Code (for Linux)
  • Postman (for calling REST)
  • Oracle SQL Developer (4.2)
  • DBeaver
  • NodeJS
  • 08 March 2016

    Installing Oracle Jet 2.0 on Ubuntu

    At http://oraclejet.org there are installation steps for installing the basic template of Oracle JET. So I followed the instructions. The installation is done using npm so I went to the NodeJs site where I followed the installation instructions for ubuntu.

    curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
    sudo apt-get install -y nodejs

    Now the npm package is installed on my system.

    Then I could follow the installation instructions at Oracle JET.

    1 Setup

    Using npm, run the following commands:
    npm -g install yo
    npm -g install grunt
    npm -g install generator-oraclejet

    2 Create

    After installing the Oracle JET Yeoman generator, you can create a new project with:
    yo oraclejet  --template=basic

    3 Run

    Once your project has been created, you can serve it by running:
    cd  
    grunt build
    grunt serve
    But then I received some errors and it seemed like I was missing some packages. For instance it could not find the grunt command, 
    npm -g install grunt-cli
    It could not find bower, so I installed the bower package
    npm -g install bower 
    It could not find git, so I installed the git package with npm and also on ubuntu.
    npm -g install git
    apt-get install git
    Then I did the create step and build steps again and the basic template of Oracle JET worked fine.

    28 March 2015

    Moved Forms PJC examples to GitHub

    I moved my Forms PJC examples to GitHub. The examples and the Oracle JDeveloper projects can now be found at: https://github.com/mark-oradev/FormsPJC

    19 March 2015

    Update a grails project from version 2.3.8 to version 2.4.4

    At first I changed the version of the application to 2.4.4.
    > grails set-grails-version 2.4.4

    I also created a new appliction with grails 2.4.4. From this application I took the BuildConfig.groovy and copied the content into to the BuildConfig.groovy of the application I wanted to update. Then I added the changes to the BuildConfig which  are necessary for the application.

    In the datasource of the application I had to change my current setting for hibernate which pointed default to Hibernate 3 so it will point to hibernate 4.
    So I commented:    
    //cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory' // Hibernate 3
    And uncommented:
    cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory' // Hibernate 4
        
    I copied the applicationContext.xml from the web-app/WEB-INF folder of the new application to the same file of the application I wanted to update. 

    Then I removed the target folder and tried to run the application by running
    > grails run-app.

    For one of my applications I got an error after starting. I fixed that application by setting the Hibernate version back from Hibernate 4 to Hibernate 3. 

    24 February 2015

    Created the first version of the JavaFX Browser inside Oracle Forms

    I created the first version of the JavaFX browser inside Oracle Forms.


    I created a Form with two java beans components. I added the JavaFX browser with a socket server to one component and I added a socket client to the other component. With the socket server I made it possible to communicate to the java browser.


    18 February 2015

    Playing around with JavaFx inside Oracle Forms

    Sometime ago someone asked me some questions about the Enhanced java bean. That java bean was based on the JDIC (java desktop integration component) of sun. The project of  jdic hasn't been updated for quite some time. So the java bean is getting harder to use.

    So I was searching for a different solution, when I stumbled on JavaFX. I now have the following results:


    This a JavaFX browser inside Oracle Forms. It now displays a hard code webpage (google.nl) but inside the search window I could easily navigate to oracle.com. So the component still needs some enhancement before it will be available.

    The difference between this component and the enhanced html browser is that this component only displays html content. So you can't open a PDF document with this solution.

    Another component I tried was the PieChart
    This component shows a hard coded piechart. I tried this hardcoded first just to see if it was possible. I now will have to change it, so arguments can passed to it.

    Note! Since JavaFX is available in jre 7 it will not be available for the older Oracle Forms components/ I've been testing with Oracle Forms 11gR2  and a java runtime 1.7, In older versions you will get an error message that the components used are from a newer version.