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.
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.
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
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:
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 a'kin to make files of old, used to run tasks to build & 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 ANDnpm, 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
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:/usr/local/lib ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] └── [email protected]
(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