All posts by danmcghan

How to get, use, and close a DB connection using the Async module

By | Uncategorized | No Comments

The first pattern we looked at in this series was the Node.js callback pattern. As I mentioned there, that pattern alone will only get you so far. Eventually, you’ll want to construct asynchronous workflows that process elements in a collection serially or run several tasks in parallel. You could write your own library, but why reinvent the wheel when you could just use Async, one of the most popular Node.js libraries ever. In this post, we’ll take a look at Async to see how it can help you write asynchronous code in Node.js.
Read More

How to get, use, and close a DB connection using various async patterns

By | Uncategorized | No Comments

It seems simple enough: get a connection to the database, use it to do some work, then close it when you’re done. But due to the asynchronous nature of Node.js, coding this sequence isn’t as straightforward as it seems. There are lots of options for writing asynchronous code with Node.js, and each one requires the sequence to be coded differently. In this series, I’ll provide some examples that demonstrate how to get, use, and close a connection using various async patterns.
Read More

Adding Font Awesome to a Yeoman Generated JET Project

By | Uncategorized | No Comments

Oracle JET, Oracle’s JavaScript toolkit for single page apps, includes over 80 components to help build enterprise JavaScript applications. But one thing JET doesn’t include is a set of icons – the argument being that different apps and teams will likely choose different icons. Luckily, it’s not too difficult to add Font Awesome to a JET app. If you’re using one of the starter apps without the Yeoman generator, have a look at Paul Thaden’s post on adding Font Awesome. In this post, I’ll show you how to add Font Awesome to a project created via the Yeoman generator.
Read More

Working with Dates Using ORDS

By | Uncategorized | 4 Comments

Oracle REST Data Services (ORDS) allows developers to create REST interfaces to Oracle Database, Oracle Database 12c JSON Document Store, and Oracle NoSQL Database as quickly and easily as possible. When working with Oracle Database, developers can use the AutoREST feature for tables or write custom modules using SQL and PL/SQL routines for more complex operations. This post will explain what happens with dates as they move between ORDS and Oracle Database.
Read More

Working with Dates Using the Node.js Driver

By | Uncategorized | No Comments

Node.js is an excellent platform for creating RESTful APIs that store and retrieve data using Oracle Database. node-oracledb is the driver maintained by Oracle that allows Node.js developers to connect to and utilize the database. As data crosses the boundaries between JavaScript and Oracle Database, the driver automatically converts it to native data types on either end. This post explores how that conversion process works for datetime values.
Read More

Working with Dates in JavaScript, JSON, and Oracle Database

By | Uncategorized | No Comments

When I wrote a series of posts on creating JSON from relational data, I mentioned that dates could be tricky. That was a bit of an understatement. Dates, and the time zone conversions that often go along with them, can be outright daunting!

In this series, I hope to shed some light on the subject of dates in the context of JavaScript, JSON, and Oracle Database. As in the previous series, I’ll base things on a RESTful API scenario. The focus here will be on tracking a date from the browser to the database and then back from the database to the browser.
Read More