Fun with Node.js and APEX

By February 4, 2015 Uncategorized

A couple of weeks ago I release a video that showed people how to get up and running with Node.js and Oracle on the App Dev VM. This post builds on the work done there and demonstrates some of the power and flexibility of Node.js and the Oracle Database Node.js Driver.

Last week I started thinking about a new project for the Oracle Database Node.js Driver. I have a lot of experience with Oracle Application Express (APEX) and I wondered if it would be possible to use the driver as the basis for a new APEX listener powered by Node.js.

APEX, for those that don’t know it, is a declarative environment for creating web applications on the Oracle Database. APEX is included with the Oracle Database license, including the free XE edition. At any rate, APEX runs in the database and thus requires some kind of “web listener” to proxy communications between the Oracle Database and the client. You thinking what I’m thinking??? Let’s do it with Node!

The thing I’m most excited about with Node.js is flexibility. I already see many people in the Oracle community finding new ways to leverage Node and the vast ecosystem of JavaScript libraries and frameworks now available (good example). I hope to capture a lot of this activity in an upcoming webinar series.

Back to the the Node.js APEX listener… I was able to get the basics working! Keep in mind: This code is NOT ready for production use (not even close). But it is pretty cool!

Check out the video to see it in action and follow these steps if you’re interested in giving it a whirl:

  1. If you haven’t already done so, watch this video and follow the steps to get Up and Running with Node.js and Oracle
  2. In the VM, open a terminal and enter the following:
  3. Login with hr/hr/oracle
  4. That’s it!

I had a lot of fun putting together this proof of concept. The response was great – there is clearly a lot of interest in the community for using Javascript and the Node.js driver in creative, new ways. However, since I wasn’t hired to build product, but instead to help Javascript developers use Oracle Database more fully, I hereby hand off this POC to anyone interested in moving it forward. I will now dive back into creating an unending flow of content related to the world of JavaScript and Oracle!

 

8 Comments

  • Nice work, Dan! Having implemented an alternative Apex listener myself (the “Thoth Gateway” for Microsoft IIS, written in C# for ASP.NET, see https://code.google.com/p/thoth-gateway/), I’m really excited to see yet another alternative listener implementation. Choice is good! (Somebody should write an Apex listener for Nginx as well! :-))

    Looking forward to see how this project develops. As for the Thoth Gateway, the fact that version 1.4 now uses the ODP.NET Managed Driver (ie a pure .NET driver with no dependencies on the regular Oracle client), and the fact that Microsoft are open-sourcing and making their tools and runtimes available cross-platform, means that the Thoth Gateway may one day be able to run on Linux and Macs as well (when those platforms get a production-ready alternative to IIS that can run ASP.NET applications).

    Now I just need to learn more about Node, hope you follow up with more tutorials! 🙂

    • danmcghan says:

      Hi Morten,

      Thanks! Actually I downloaded the Thoth Gateway to have a look at the implementation – it was very helpful!

      More tutorials are in the works…

      Regards,
      Dan

  • Tony F says:

    Great vid once again Dan.

    Looking forward to your code for this on Github – hopefully soon.

    Thanks.

  • Tim says:

    Great video! Did you see that ? https://www.npmjs.com/package/node_plsql
    I think it is similar 🙂

  • John Hernandez says:

    Dan,

    Is this working with the 2017 versions of node and apex?

    Thank you

Leave a Reply