APEXlang and Coding Agents in Practice

DOAG K+A

Philipp Hartenfeller

| Nürnberg

$whoami

Philipp Hartenfeller

  • Düsseldorf, Germany
  • Oracle APEX Dev since 2016
  • Product Lead at United Codes
  • Web Dev and Databases

Agenda

  1. APEXlang: reading an app as source
  2. Tooling: VS Code, SQLcl, and make
  3. Team workflow: Builder and files without overwrites
  4. APEXlang & coding agents: skills and context
  5. Guardrails: let agents check their own work
  6. Coding agent best practices: models, sizing, perspectives

APEXlang

APEX apps as readable source

  • APEXlang gives familiar APEX components a readable, file-based format.
  • Let’s follow one page

A simple modal form

Milestone Detail modal showing Project, Milestone, Description, Due Date, Audit Details, and Cancel, Delete, and Save buttons

sample-master-detail · page 7: Milestone Detail

What does this page look like as source?

This is the page

pages/p00007-milestone-detail.apx

APEXlang has its own syntax: it is not JSON or YAML.

Exports omit default values, keeping the source easier to read.

A form region

pages/p00007-milestone-detail.apx

The form binds to a table and declares its allowed operations.

Page Item

pages/p00007-milestone-detail.apx

A required text field, bound to the form’s NAME column.

How components connect

pages/p00007-milestone-detail.apx

shared-components/lovs.apx

@projects connects the select list to its shared LOV. SQL stays SQL.

Dynamic Action and a button

pages/p00007-milestone-detail.apx

pages/p00007-milestone-detail.apx

The button and its dynamic action connect through @cancel.

Save process

pages/p00007-milestone-detail.apx

Standard form processing uses the same form region reference.

All together in one page

pages/p00007-milestone-detail.apx · schematic outline

Regions, items, buttons, actions, and processes are siblings inside the page.

Edit inside the file

pages/p00007-milestone-detail.apx

A diff you can review.

Tooling

Import and diff from VS Code

Requires the Oracle SQL Developer for VS Code extension.

VS Code toolbar with annotated actions: import file, import app, and diff app

Open an .apx file to access Import File, Import App, and Diff App.

Validate the local changes

Validate the app’s APEXlang before importing the change.

Works offline: no database connection needed (sql -nolog).

Import the app

Import always runs validate first.

Bring Builder changes back to files

Export app 154 as APEXlang into ./src/app.

Import selected files (26.2)

Import only the files you changed.

Demo

SQLcl: export, validate, import

Put the commands in a Makefile

Team Workflow

Builder or file?

Better in the Builder Better in files
Layout & visual tweaking Bulk changes (rename a column across 20 pages)
Exploring options (what can this region do?) Search across the whole app
Template options, Theme Roller Reviewing changes (diffs)
Quick one-off fixes Copying patterns between pages / apps

Too many cooks...

  • You edit files locally, a colleague edits in the Builder
  • You import → their changes are gone
  • Export first and merge? Yes! But that's a Git problem, not an APEX problem
  • But a merge needs a common base: what did the DB look like before either of you changed it?

The apex-db branch

  • A second branch that only holds what the DB looked like at the last sync: the common base
  • Git can now tell what you changed in files and what others changed in the Builder
  • Script on GitHub: uc-apex-sync

make sync-app

  1. Commit your pending app changes
  2. Export the DB into a worktree on apex-db → "DB snapshot" commit
  3. Merge apex-db into your branch
    • nothing changed | auto-merged | or regular merge conflicts
  4. apex validate the merged result
  5. Abort if someone saved in the Builder meanwhile
  6. Import (on 26.2: only the changed files), then move apex-db forward

Demo

Merge-safe import

APEXlang &
Coding Agents

Files are what agents speak

  • LLMs are heavily trained on editing files and running terminal commands
  • APEXlang is a clear, distraction-free file format
  • → LLMs can easily develop APEX apps
  • But: best experience on modern and high-end models

Skills

  • Oracle skills repo: github.com/oracle/skills
  • Synced via SQLcl: sql -nolog → skills sync --force
  • Teaches APEXlang syntax, components, PL/SQL, DB
  • skills list

The best context: a reference app

  • Docs explain the language; an example shows the way you use it
  • A well-built reference app in the repo (or next to it)
  • "Build the page like p00010 in the reference app"
  • The agent copies your patterns: naming, templates, auth, error handling

Big wins

  • Unify conventions: consistent naming, labels, and patterns
  • Generate help text: explain fields and workflows
  • Analyze the whole app: find inconsistencies and repeated patterns
  • Large-scale restructuring: apply changes across pages and components

Guardrails

Let agents check their own work

Give the agent its own schema

  • A real schema to compile against and run tests
  • Prefer a dedicated schema used only by this agent
  • Keep install/upgrade scripts reproducible at all times
  • uc-local-apex-dev: local Oracle Database, APEX, and ORDS in containers
  • or a PDB snapshot copy

Unit tests with utPLSQL

  • Test SQL and PL/SQL business logic with utPLSQL
  • Run tests after every change
  • New features get new tests
  • Make this an acceptance criterion in AGENTS.md
  • The agent reports the test results before calling the task done

Lint with dbLinter

  • Check SQL and PL/SQL against common best practices
  • Trivadis guidelines and additional rules
  • New: APEXlang rules, including APE and SERT checks
  • Make this an acceptance criterion in AGENTS.md

E2E tests with Playwright

  • Export the app from dev → import into the local database
  • Run Playwright tests against the local app
  • Modern LLMs do a good job of figuring APEX out
  • Run frequently to make sure UI workflows keep working

Put it all in AGENTS.md

Coding Agent
Best Practices

Pick the right model

  • Frontier models are worth it for unfamiliar formats like APEXlang
  • Subscriptions are quite cheap (for now)
  • Big model plans and reviews, smaller model executes

Start small

  • Start small: ask for a small change, then check the result
  • Build experience, one change at a time
  • You get a feel for what the agent does well, and what needs supervision (copilot vs. autonomous)
  • Again: highly model-dependent. Recalibrate when you switch models

Sizing

  • Break features down into chunks
  • Just like humans tackle tasks
  • Context is still the limiting factor
  • But models keep getting more capable and efficient

Ask from different perspectives

  • Not only: "build feature X"
  • UX: "Review this page as a first-time user. What's confusing?"
  • Security: "Where could a user see or change data they shouldn't?"
  • Testing: "What breaks with empty, huge or weird data?"
  • Performance: "Which queries won't scale?"
  • Consistency: "Which pages deviate from our patterns?"

Let another agent review it

  • A second agent reviews the first agent's changes with fresh context
  • Ask it to check correctness, missed requirements, and unintended changes
  • Include the review in your original prompt:
    "After implementing, have another agent review your changes. Fix the findings and rerun the checks."

Don't drown

  • Lines of code are not value; users productivity is
  • Don't burn tokens for the sake of it
  • A few things at a time: you still have to understand the system

Persist context

  • Common commands in the Makefile and AGENTS.md
  • Workflows as skills: recurring tasks, pre-release checks

Takeaways

  • APEXlang makes APEX apps real source code: use Git
  • Put your commands in a Makefile, and merge before you import
  • A reference app is the best context for agents
  • Let agents validate their own work
  • Ask for more than features: UX, security, tests

Resources

Q&A

Thank you!

philipp@united-codes.com