We’ll kick off this year with a new blog series in Link Consulting, devoted to a more pure development thread with Oracle development tools (broadly speaking) and Oracle JET in particular.
I was most impressed with Oracle’s own JET MOOC, which provided with a nice introduction of the toolkit, and allowed me to clean up those spider webs from my programming background and returned to the good old keyboard bashing routine. This posed a significant difference from what I’ve been doing in the last 10 years, which were mainly filled with Workflow and BPM projects.
My goal is to publish a new article every 2 weeks, but if I manage to get a bit more time I’ll try to reduce it to a week’s interval.
The Oracle JET
Because the target is to build enterprise applications, JET incorporates thoroughly tested components that have been on the market for quite some time and are mature. This contrasts with the “Java Framework flavor of the week” approach, in which people adopt the newest framework because it’s the best thing since the invention of the wheel. Don’t get me wrong: going for the newest coolest stuff can be great. There are loads of applications in which using one of these newer frameworks can greatly reduce your work and deliver very good results. But, within organizations, there are several things to consider when choosing frameworks, such as how many resources are available in the market with that kind of knowledge (something that typically is very low on recent frameworks), what kind of community support is available, how do frameworks work with each other to accelerate development (and what side effects or bugs are there), etc… Organizations go for stability and maturity above all, because that ensures quality and risk reduction.
How to set things up
There are a few things you need to set up in order to start. We’ll guide you through each one of these steps. If you already have some of these items installed and setup, you can skip those steps. Here’s a list of everything you need to prepare:
- Install Node.JS (version 5+)
- Install the Oracle JET CLI (Command Line Interface)
The first thing you need to do is to install Node.JS. You need this to have the NPM installer, which is needed to install the Oracle JET CLI.
Go to nodejs.org download page, choose your OS and the LTS version, and download the respective pre-built installer. Then, run the installer, as shown in the images (these refer to the Windows version. Other OS may differ slightly).
After the installation is completed, you can verify that everything is working according to the plan by using the following command in a command line window (Command Prompt or Powershell in Windows, Terminal window in MacOS or Linux), to verify the current version of nodeJS in your system:
prompt> node -v v8.9.4
You can also check the Node Package Manager (NPM), which is what will guarantee the installation of Oracle JET and all its dependencies.
prompt> npm -v 5.6.0
Done! On to the next part.
Install Oracle JET CLI (Command Line Interface)
We now have everything we need to install a very special tool that was made available with Oracle JET 4.0.0: the CLI. This tool will allow you to create and manage your Oracle JET projects, as well as help you through the entire development process. I could explain you all the details, but it’s better if I just show you hands-on how to use it and the benefits of it.
To install the Oracle JET CLI just run this on your command line or terminal:
prompt> npm -g install @oracle/ojet-cli
If you are behind a corporate proxy, you may need to set additional configurations to npm, so that it can fetch and install the necessary packages. These are:
prompt> npm config set proxy http://proxy.company.com:8080 prompt> npm config set https-proxy http://proxy.company.com:8080
After the Oracle JET Cli is installed, you can use the ojet command, which we will use to create, build and run our Oracle Jet projects. Try it out by typing ojet help. The outcome should be something like this.
prompt> ojet help Oracle JET CLI Synopsis: ojet <command> [<scope>] [<parameter(s)>] [<options>] Available commands: add ........................... Adds platforms, plugins and more to a JET app build ......................... Builds a JET app clean ......................... Cleans build output from a JET app create ........................ Creates a new JET app, custom theme, or component help .......................... Displays command line help Commands: [add|build|clean|configure|create|list|remove|restore|serve|strip] list .......................... Lists platforms, plugins and more within a JET app remove ........................ Removes platforms, plugins and more from a JET app restore ....................... Restores missing dependencies, plugins, and libraries to a JET app serve ......................... Serves a JET app to an emulator, device or the browser strip ......................... Strips all non source files from a JET app Detailed help: ojet help <command> [<scope>]
You now have Oracle JET properly installed on your system! But before we go and get our hands dirty, there’s still one piece of the puzzle left… the IDE. Enter Netbeans!
Installing NetBeans IDE
The easy way is to use an IDE or text editor that offers some creature comforts, such as code completion, syntax highlighting. Oracle recommends the use of NetBeans IDE (and I do also), a free and open-source IDE, because it features already a tight integration with Oracle JET, making it easier for you to develop Oracle JET projects.
Now you’re ready to start developing projects using Oracle JET. Hurray!
An Oracle JET application high-level architecture
So we now have almost everything we need to start developing our applications. Nevertheless, we need to take into account what’s the typical high-level architecture of an Oracle JET application. Oracle has a very good diagram that explains this quite well, as well as what is the Model-View-ViewModel architectural design pattern.
For now, just have these diagrams present in your memory. As we unfold and go through the next chapters of this blog series, all of this will become clearer and second nature to you, while developing your applications.
What will we be developing?
Through my years as a developer, and now in management, there was always the need to build some tools to help in the development process. Right now, Agile development seems to be the norm and although there are a lot of tools out there to help with this “methodology”, there are always somethings that don’t fit quite well with the way you do your stuff.
So, I decided to tackle that need with the development of an Agile Toolbox, which addresses my particular needs. All of the exercises and blog entries will revolve around building these tools, and I’ll cover everything, from the idea, through application design, requirements definition, development, building and testing, all the way up to packing and deploying the application in a cloud provider (Oracle Application Container Cloud Service?).
As of now, the tools that we’ll develop are:
- Team Evaluation Tool – A tool that will allow a team member to evaluate the performance of his colleagues during a sprint. The application will get data about projects where the person has been involved, check the sprint team, and allow a quantitative evaluation (1-5), plus a top and bottom performer election.
- User Story and Backlog creation – A tool to create user stories and manage them in terms of story lifecycle (written, in backlog, in development, in testing, released)
- Planning Poker – A tool to allow planning poker on the user stories created. Will allow not only voting but also discrepancy discussion, etc…
- Work Report – A reporting worksheet in which each team member will report the time they spent on a given User Story
We’ll start with the Team Evaluation Tool in the next blog article.
The Server Side Stuff
Referring to the architecture diagram above, for our case, I decided to implement all Server Side logic and data using Oracle Database Cloud Service (DBCS). For me, it’s the easiest way to handle the data and associated business logic, while having the possibility to expose these as REST services, using ORDS (Oracle REST Data Services). Of course, I could set up a local database for this, but it wouldn’t be as much fun and it’s a way for some of you guys to start your journey in the (Oracle) cloud. We’ll set up a trial account and guide you through each step in the next article of this blog series.
That doesn’t mean that we’ll be implementing everything we need directly in the browser (although we could). We’ll also use the Oracle SQLDeveloper. including the SQL Data Modeler, to plan and design our application data as well as some business logic.
You can download it from here. There’s no installation process. You just uncompress it to a directory and run directly from it. You’ll need an up to date Java Runtime to run it, though.
Before we wrap up the first blog article in the series, I would like to recommend a set of additional resources that will prove valuable throughout this adventure.
- Oracle JET MOOC – A massive online course on Oracle JET. Most of the ideas expressed in this blog series come from here. I did this MOOC and was very impressed by what you can learn about JET in it.
- Oracle JET Cookbook – A set of premade oracle JET code and how-to’s, which handle pretty much every aspect of Oracle JET. It’s also a great accelerator for when you want to put up something very fast, maybe for a demonstration or small POC.
- Oracle JET JSDOC – The full Oracle JET documentation programming reference.
- Developing applications with Oracle JET – An online book on how to develop Oracle JET applications. Quite detailed.
- Oracle SQL Developer Data Modeler for Database Design Mastery (Oracle Press), Heli Helskyaho – A book on using Oracle SQL Developer Data Modeler. We will be using knowledge of it throughout the blog series.
So we set up most of the tools we’ll need to start our adventure with Oracle JET and we established what we’ll be doing in the next weeks/months. I hope you’ll continue this journey with us and follow our (bi-)weekly articles, building your own tools or the ones we’re proposing.
All code will be available on Github. Everyone is welcome to contribute to it.
So, until next week.
José Rodrigues, a.k.a. Maverick