Last Friday was a day with lots of Oracle products releases (Check Oracle ADF 12.2.1 release notes) and Oracle also released one of the most expected products Oracle JavaScript Extension Toolkit, also known as Oracle JET, the new JavaScript Framework.
Oracle JET is targeted at intermediate to advanced JavaScript developers working on client-side applications. It’s a collection of open source JavaScript libraries along with a set of Oracle contributed JavaScript libraries that make it as simple and efficient as possible to build applications that consume and interact with Oracle products and services, especially Oracle Cloud services.
Oracle JET is a framework to develop applications based on some Open Source libraries:
JQuery is a JavaScript library that help us to simplify the way to interact with HTML files, manipulate DOM tree and handle events.
JQuery UI is a components library build on top of JQuery that offer us different widgets and allow us to interact easily with them (resize, drag and drop, etc). We can also add those components transitions and effects.
Knockout is a library that allow us to create responsive interfaces with a clean underlying data model having a Model-View-ViewModel (MVVM) architecture design pattern.
RequireJS is more than a library to resolve dependencies It also provides an asynchronous file and module loader.
Hammer is an open-source library that can recognize gestures made by touch, mouse and pointer events.
Oracle JET supports MVVM arquitecture pattern (Model-View-ViewModel). In this architecture the Model represents the application data, the View is the presentation of the data and the ViewModel exposes the data from the model to the View.
Oracle JET Common Model and Collection API implements Model layer. This API has the following JavaScripts objtects:
- oj.Model: Represents one single record from a data service such as a RESTful service.
- oj.Collection: It is a list of oj.Model objects.
- oj.Events: Provides methods to handle events.
- oj.KnockoutUtils: Provides methods for mapping the attributes from oj.Model and oj.Collection object to Knockout observable objects for use with components view models
Oracle JET provides a collection of components wrapped as JQuery UI Widgets to implement View layer. These components range from a basic button or input to advanced visualization components like charts.
The last layer, ViewModel is implemented by Knockout.js, and offers us two-way data binding between View and Model layers.
Oracle JET also has a lot of more features like these:
- A validation framework that offers components level validation and data conversion
- A cache at the Model layer for performance optimization of the pagination.
- Connection to data sources through web services such as REST services or WebSockets.
- Integrated authorization through OAuth 2.0 for data models retrieved from REST services.
Oracle has also provided us some resources so we can start building an application and learning Oracle JET.
- Oracle JET application demo
In the cookbook we can see all Oracle JET components and also the HTML and JavaScript code needed to make it work,
You can also edit HTML and JavaScript code in the cookbook and see the changes at the moment.
If you are interested in the framework and want to learn more you should visit these links:
Oracle JET Website
Oracle JET Developers Guide
Oracle JET Youtube channel