Wednesday, 25 March 2020

JET - show global processing icon

JET - v7.2.0
Source: GitHub

This is a quick demonstration on how to setup an application wide processing icon, which may be displayed every time a lengthy operation is in progress, and you don't want the user to perform anything else in the meantime.

JET provides a useful component - oj-progress - which may be used effectively for this purpose. This, along with some nice CSS tricks for creating an overlay, can solve our problem.


The oj-progress component is displayed on some boolean condition being set to true, and is hidden when the condition is set to false.

The component is placed at the root of the application, in index.html, so that it may be accessible to all child modules. The control is in appController.js, which is registered with the window object, so that the module may be accessed by any component, without the need to explicitly load it in the define block.



Cheers!

Tuesday, 17 March 2020

JET - with mongodb, nodejs and express

JET - v7.2.0

We all talk about the MEAN stack and the MERN stack. What about a MongoDB-Express-Nodejs-Jet stack this time? Can we call it the MENJ stack? I started on a POC and ended up on a full-blown cloud implementation of the stack. Sharing the POC results below.

Test users: refer to README.

Source code:
Oracle JET: (GitHub) hr-store
Node/Express: (GitHub) hr-server

The location/department/employee objects have been made similar to those from the HR schema, including the master child relationships. The master-detail page in the JET app implements this relationship.

Since I wrote my own middleware, I had the freedom of customizing the REST data to a standard easily suited to JET. However, I did have to extend the JET framework to support custom URL call and pagination.

This blog post may help you further to understand the master-child and search model implemented in this POC.








The front-end JET code has been deployed on heroku server. The Node/Express middleware is running on another heroku instance. You may access and play around with the deployed instance @ https://menj-stack.herokuapp.com/

Disclaimer: since the front-end, middleware and database are all running in 3 different servers, the performance of the deployed instance is quite disappointing. But hopefully it will let you gain some amount of insight with the stack.

Cheers!