3 MLE JavaScript Modules and Environments
A JavaScript module is a unit of MLE's language code stored in the database as a schema object.
Storing code within the database is one of the main benefits of using JavaScript in MLE: rather than having to manage a fleet of application servers each with their own copy of the application, the database takes care of this for you.
In addition, Data Guard replication ensures that the same code is present in both production and all physical standby databases. Configuration drift, a common problem bound to occur when invoking the disaster recovery location, can be mitigated against.
A JavaScript module in MLE is equivalent to an ECMAScript 6 module. The terms MLE module and JavaScript module are used interchangeably. The contents are specific to JavaScript and can be managed using Data Definition Language (DDL) commands.
In traditional JavaScript environments, additional information is often passed to the runtime using directives or configuration scripts. In MLE, this can be achieved using MLE environments, an additional metadata structure complementing MLE modules. MLE environments are also used for name resolution of JavaScript module imports. Name resolution is crucial for maintaining code and separating it into various modules to be used with MLE.
See Also:
Developer.mozilla.org for more information about JavaScript modules
Topics
- Using JavaScript Modules in MLE
JavaScript modules can be used in several different ways and can be managed using a set of Data Definition Language (DDL) commands. - Specifying Environments for MLE Modules
MLE environments are schema objects in the database. Their functionality and management methods are described.