APEX extensibility beyond standard: Plug-ins

As we have seen in other posts, it is possible to take Oracle APEX beyond standard. We also have pointed out that in order to carry out this task it is necessary to have a wider knowledge of PL/SQL and JavaScript. In this post we will explore to extend APEX beyond standard with a more reduced knowledge of those languages, or how to take full profit of our knowledge to reduce application production time: APEX plug-ins.

 

But before that, for the users who may not be familiar with plug-ins, we will try to explain this concept briefly. A plug-in is a functionality not included in the official APEX, developed created by other developer (or by ourselves), that can be added to our application easily.. Instead of repeating the same code several times to get the same functionality, we will be able to add it by using a plug-in. This will save us time and maintenance effort.

We will evaluate several aspects to take in account when using plug-ins, and afterwards, we will show how to create them.

 

APEX Plug-ins overview

We could say that plug-ins have come to make our life easier. However, this doesn’t happen always. When using them we should take in account several precautions before installing them. But before analyse that, we will try to make a distinction between plug-ins. For a better analysis we will consider these types of plug-ins:

 

  • Author plug-ins: These have been created by APEX developers, and you will be able to find them in several web-pages. Oracle provides a webpage for Oracle APEX developer community, where you will be able to find several free plug-ins.
  • Owned plug-ins: These have been developed by oneself (or by a team of our collaborators). These plug-ins can be private and therefore may not be uploaded in any public webpage.

 

If the first type give us a lot of the work already done, it is important to remember that those are not official plug-ins. That means that Oracle doesn’t take responsibility of the consequences of installing or using them, and doesn’t ensure they will be functional in future versions of APEX. Still, plug-ins published for a long time in Oracle webpage, can usually be consider safer to use and we can expect them to be updated. However, sometimes Oracle decides to include on the official version some of the functionalities implemented by those plug-ins based on their stability and popularity. When answering the question of whether or not trust them, is convenient to make some investigation on our own. It is always important to read the reviews of this and other plug-ins created by the same author, and check if author makes updates when new APEX versions are released. Also, it will make no harm to check the plug-in code since this is usually public.

 

Regarding our owned plug-ins there shouldn’t be much a trust issue, as long as we trust in our own work. For this type, what is really important is to keep track of APEX updates, in order to detect what methods become deprecated, and updated them to the newest version. Only by doing so, we will be sure our plug-in doesn’t stop being compatible.

How can I create my own plug-ins?

Create your own plug-ins is easy and can be done in different ways. One possible way of doing so is directly from the application where we would like to install the plug-in (later we will be able to export it to other applications where it could be useful). First we will go to the section “Shared components” of our application, and on “Other Components” we search for “Plug-in”:

 

 

When clicking there, we will see the list of all plug-ins that we have installed on our application. Also from here we will be able to import plug-ins which we had downloaded, and edit other installed plug-ins. Additionally, we will be able to access the Oracle plug-in catalogue and explore other users creations.

When clicking on the button “Create”, we will be able to decide if we want to create a plug-in from scratch or of we would like it to create it based on other existing plug-in. We will create it from scratch in this case. Once we have selected this option, we can see the creation screen. We have filled it as follows:

 

 

Here we have defined the plug-in name, the type (as Item) and the code. Also we have defined which of the procedures implemented on the code will carry out which function (in this case there is a single procedure, which work as render function)

After that, we could see our plug-in in the list of available elements for this project:

Twitter
LinkedIn
Evolution, innovation and transformation
7 expertise + 42 specializations endorsed by Oracle
Our value proposition
100% Oracle posts
Follow our day-to-day activities