Categories
AI APEX

APEX 26.1 App Enhancements With APEXlang

In this article we will generate a APEX 26.1 app using an AI and then direct an AI to edit that application in VS Code and push it back to the app builder to run it.

This is made possible by the new feature of APEX 26.1 APEXlang, which is described by Oracle as “…an open, declarative specification language for Oracle APEX applications. It expresses application intent as structured, human-readable metadata that teams can review, version, validate, and govern, giving developers and AI agents a supported foundation for AI-assisted application development.

We looked at connecting an AI to the workspace in previous articles and so I’ll generate a small application based on the EMP table as our “starter app”.

This creates a smart looking little application that allows us to maintain the EMP table and add/change employee data via a selection on cards on the first page.

Here’s the maintain employees page and this is the one we will make a tweak to using APEXlang. I want the Salary field to have a validation on it so it is > 0.

Let’s export the application so that we can load it into VS Code. The export routine is the same as prior versions.

Now we are given the option to export in the new APEXlang format, so we will select this as shown.

This creates us a ZIP file of all of the components.

Unzip it and we can see the structure and drill into those files if we want to, e.g. the Pages folder contains ( surprise! ) details of all the pages in the application.

We can open VS Code and open this unzipped folder, so you see the same structure here. Note that VS Code is very flexible in layout options so I’ll show this format and also change the windows around as we start to edit the application.

In this instance I am choosing Claude from Anthropic as the AI as I have the Claude extensions for VS Code, just like I have the SQL Developer extension which I have connected to my APEX workspace instance.

Before your Agent can do anything you need to install the DB and APEX skills from https://github.com/oracle/skills. Skills give the AI the “skills” it needs to work with APEXlang and the definition below is from the Oracle site linked to above.

Once skills are installed and I also connected to my schema and asked my AI to verify that it could access those skills

We’re ready to go, so I asked the AI to enhance a page item in a current page to enhance the validation by checking that salary changes must be >0.

We can see the changes that are suggested, and as it’s actually readable I can see what the change is that is being made.

The AI also gives me a list of the changes that have been made so that I can verify that I am happy with those.

I am and i’ll decide to import these changes. I can do that in a number of ways ( SQLcl etc ) and I decide to use the import button that I have in the IDE.

This tells me that my changes are being imported into my schema.

I then get a confirmation message that it has been completed successfully.

Returning to the APEX designer I can open the application and I can see that this change is now active and viewable in APEX.

Returning back to VS Code, I asked for a whole new page to be added. Here we can see my request to create a new interactive report and the new page being created.

We can run a validation to check that the AI has created completely valid changes and if there are any errors with changes that have been to get those rectified ( if you try to import an invalid APEXlang file you will be informed though ). Then we can import.

Now when I look at the APEX IDE I can see we have a new page added to the application.

Running the application we see a new card entry has been generated.

Click on the new navigation card and we are taken into the new IR page that has been generated.

Summary

Clearly I have just scratched the surface of what APEXlang is capable of, but I can see how it can completely change the way that development can be done, not just via the “traditional” IDE. The skills are also being updated so should be kept in synch as enhancements are made to those.