Installing Oracle JET for JavaScript Web Development

DZone 's Guide to

Installing Oracle JET for JavaScript Web Development

In this article, the author will focus on the basics of installing Oracle JET for web development which is where everyone has to start.

· Web Dev Zone ·
Free Resource

One of the fun parts of my job as a mobile and development tools product manager, is I'm often given the chance to learn new technologies, without necessarily the pressure of rushing to deliver a project and therefore also rushing learning the technology superficially.

Up until recently, I've had the chance to focus on Android, iOS, and NodeJS thanks to Oracle Mobile Cloud Service and its various SDKs for each platform. But finally, a little late given how popular it has been since public release in 2015, I've finally had a chance to kick the, ah, wings of Oracle's JavaScript Extension Toolkit, commonly known as Oracle JET.

Rather than keep all these useful "learnings" in my head, this time, I thought I'd take pen to virtual paper and describe what I learned along the way, with the goal of sharing this with communities like DZone to help others get started.

So in starting out, in this article I'll focus on the basics of installing Oracle JET for web development which is where everyone, including myself, has to start. Assuming the editors appreciate my efforts and Australian grammer isn't too horrible, I hope to expand this into a series of articles for others to learn from.

What is Oracle JET?

Before discussing how to install the Oracle JET tooling, for anyone not familiar with Oracle JET let's take a quick recap.

Image title

At its simplest: Oracle JET is a JavaScript toolkit designed to allow you to build client-side applications for both web and hybrid mobile applications too, using a combination of HTML5, CSS3 and JavaScript.  It harnesses a number of modern open-source libraries and frameworks including RequireJS, Knockout, jQuery, and Cordova to build apps. In addition, JET extends upon these by providing a rich UI component set including data visualization components, with built-in accessibility and support for internationalization, web and mobile app templates, and command line tooling.

While Oracle JET is still relatively new to the world of JavaScript developers, it has been used inside Oracle to build out a considerable amount of its new cloud offering websites, latest estimates are approximately 70% of all services.  I made the mistake of subscribing to one of our internal JET forums the other day and had to quickly turn it off, the amount of posts and activity was like drinking from a fire hose!

Image title

If you'd like to learn more about Oracle JET before continuing on take the chance to visit oraclejet.org for more information. If you'd like to see a JET app in action, check out the demo Work Better app.

How to Install Oracle JET for Web Development

From a developer's perspective looking to start out with Oracle JET by simply installing it, it's useful to explain that Oracle JET is logically split into tooling, that is the code libraries, command line scripts & utilities you will use to build your JET app, and the actual Oracle JET runtime which is the HTML, JavaScript and CSS that runs in the browser or mobile app.

In developing pure web applications (I hope to cover hybrid-mobile apps in another article) using Oracle JET, JET uses several well-known & popular Open Source packages:

Image title

  • NodeJS's Node Package Manager – used to install the other developer packages
  • Git – in conjunction with Github provides access to the source for the other packages
  • Yeoman – a web application scaffold tool for creating the shell of each JET app
  • Grunt – akin to make files of old, used to run tasks to build and run JET apps
  • Bower – separate to npm designed to download front-end runtime artefacts
  • Oracle JET – the JET tooling and runtime that uses ND extends the other tooling

I'd like to say it's nearly possible to install all of these in 1 command line, but, Git and npm (contained in NodeJS) which must be installed first require a few more steps. Depending if your development machine is running Windows, MacOS or Linux, you need to download & install a specific installation package for your operating system for both of these. Luckily both Git and NodeJS/npm's website and install instructions are fairly straightforward. It's worth noting for developers not familiar with npm it is installed as part of NodeJS.

Tip: For anyone using Linux, be careful in installing NodeJS/npm using sudo. I'm no Linux expert but this did cause me a world of privilege-grief when I made this mistake. Consider using Node Version Manager (nvm) to manage your NodeJS installs instead.

Having installed Git AND npm, via the command line you can then install the rest of the packages in one line using npm. For reference 'yo' refers to Yeoman.npm:

npm install -g yo grunt-cli bower generator-oraclejet

At conclusion to check what was installed and what versions, you can issue the following npm command:

npm list -g --depth=0

An example result from my Mac:

├── bower@1.7.9
├── generator-oraclejet@1.1.0
├── grunt-cli@1.2.0
├── node-inspector@0.12.5
├── npm@2.15.9
└── yo@1.8.4

(Note the generator-oraclejet version 1.1.0 does currently not relate to the Oracle JET version (the latest being v2.1), but the version of the template generator & associated Yeoman templates for JET. This will be resolved in a future version of Oracle JET)

In concluding the install you can test the setup by creating a JET application from a supplied Yeoman template and running it. Oracle JET comes with several templates, that essentially create a preconfigured shell for your web application. We'll use the 'navbar' template which will create a Single Page Application (SPA) with several tabs accessing modules such as a dashboard, incidents and customers which is designed to give you a footprint for building your own apps:

yo oraclejet MyWebProject --template=navbar 

Tip: If you're on a slow internet connection ensure to be patient and check the process finishes successfully without timing out.

Once the process completes successfully we can then build and serve the application on our development machine via Grunt:

cd MyWebProject
grunt build
grunt serve

And after a second or so you should see the running app built upon the template "navbar" shell in your default browser:

Image title

At this point you're right to continue learning about and developing your Oracle JET web application. If you're new to Oracle's JET I highly recommend hitting the Oracle JET homepage which includes links to the documentation, tutorials, videos, demo applications and a detailed cookbook.


Overall, installing the tooling for Oracle JET is relatively painless and a good way to get started with JET to learn the foundations and start exposing yourself to what collateral is available to assist you.

In a follow-up article, I hope to publish how to install the tooling for hybrid-mobile applications with Oracle JET, where it's a little more complex thanks to having to install things like the Android SDK, Xcode and more.

Overall I hope this was helpful, stay tuned for more.

web development ,javascript ,knockout ,requirejs ,cordova ,tutorial ,yeoman ,grunt ,bower ,install

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}