Tuesday, February 27, 2018

Oracle JET - stop building server side user interfaces rendering

For years enterprises have been building large monolitical applications with large server side components and large user side components in it. We see a change and a move away from monolith application design, modern day applications are developed in a microservice manner. As part of the microservice architecture REST based APIs are becoming the standard for interaction between the different microservices within a wider service and between different services within an enterprise.

Surprisingly user interfaces are still being developed relatively common based upon a more traditional way. It is not uncommon to see deployments in which an application is designed to have the full server to server communication based upon REST APIs and the user interface is developed in a way that an application server is connecting to the backend REST APIs and will generate the user interface to be presented to the end user.

The model of using an application server-side rendering of HTML based upon data in the backend systems is a model which has been adopted form the model in which the application server would connect to backend databases primarily. When having a backend based upon APIs rather than direct database connectivity there is no direct need to have this old model in place.

As the above diagram shows, the traditional way is collecting data from the database and have the application server render HTML content which contains both the look and feel as well as the data in one. The below images outlines the more API and micro services driven architecture.

When using, as an example, Oracle JET you will have your “static” Javascript code and HTML being provided to the end-user from simple webserver without any “logic”. As companies move more and more to flexible and container based infrastructures it a good practice is to server the Oracle JET code from a Docker container running nothing more than a simple NGINX webserver on an Oracle Linux docker base image.

In effect, serving your Oracle JET code from an Oracle Linux Docker base image with NGINX provides you with a small webserver footprint that can be scaled upwards and downwards when needed.

The Javascript provided as part of the Oracle JET application will ensure that the client (the browser of the client), and not he server, will request the required information from a REST API. Meaning, instead of an application server collecting the data from the database, generating a HTML page containing the data and sending this to the workstation of the end-user the model is now working differently. The client itself will communicate with a REST API to collect the data when needed.

The advantage of this model is that developing the relative simple Javascript based Oracle JET application can be done in a fast manner and will base itself on REST APIs. The REST APIs can be used for this specific application and can also be used for other applications. The level of re-use in combination with ease and speed of development provides that new application and changes can be implemented and put to use much faster than when building monolitical and large application server based solutions.

No comments: