🏗️ Oracle APEX Architecture Explained in Simple Words (Step-by-Step)

🏗️ Oracle APEX Architecture Explained in Simple Words (Step-by-Step)

1. Introduction

Oracle APEX (Application Express) is often described as a low-code web application development platform, but many developers—especially beginners—feel confused when they hear terms like ORDS, Web Listener, Database, Browser, and PL/SQL engine.

In this blog, we’ll break down Oracle APEX architecture in very simple words, step by step, and understand what happens when a user clicks a button in an APEX application.

No heavy theory—just clear concepts you can actually remember.


2. High-Level Architecture (Big Picture)

At a high level, Oracle APEX architecture has four main layers:

1️⃣ Web Browser (Client)

2️⃣ Web Server / ORDS

3️⃣ Oracle APEX Engine

4️⃣ Oracle Database

📌 Think of APEX as running inside the Oracle Database, not as a separate application server.


3. Architecture Diagram (Simple View)

User Browser
     │
     ▼
Web Server / ORDS
     │
     ▼
Oracle APEX Engine
     │
     ▼
Oracle Database

4. Step 1: User Browser (Client Layer)

This is where everything starts.

  • User opens an APEX URL in a browser
  • Browser sends an HTTP request
  • Browser receives HTML, CSS, JavaScript as response

📌 The browser never talks to the database directly.


5. Step 2: Web Server & ORDS (Middle Layer)

ORDS (Oracle REST Data Services) acts as the bridge between the browser and the database.

What ORDS does:

  • Listens for HTTP requests
  • Forwards requests to the database
  • Returns responses back to the browser

📌 ORDS replaces older technologies like mod_plsql.


6. Step 3: Oracle APEX Engine (Inside Database)

This is the heart of Oracle APEX.

Important points:

  • APEX is installed as database schemas
  • Runs completely inside the Oracle Database
  • Processes pages, regions, validations, and logic

The APEX engine:

  • Reads metadata (pages, items, regions)
  • Executes PL/SQL
  • Generates HTML dynamically

📌 There is no separate APEX application server.


7. Step 4: Oracle Database (Data Layer)

This layer stores:

  • Application data (tables, views)
  • Business logic (PL/SQL)
  • APEX metadata
  • User sessions

Everything—data + logic + APEX itself—lives in the database.


8. What Happens When You Open an APEX Page? (Step-by-Step Flow)

Let’s simplify it:

1️⃣ User opens APEX URL in browser

2️⃣ Request goes to ORDS

3️⃣ ORDS forwards request to database

4️⃣ APEX engine processes the page

5️⃣ SQL & PL/SQL are executed

6️⃣ HTML is generated

7️⃣ Response is sent back to browser

📌 All page rendering happens inside the database.


9. Where Do JavaScript & AJAX Fit In?

  • JavaScript runs in the browser
  • AJAX calls go back to ORDS
  • ORDS invokes APEX (AJAX Callback)
  • PL/SQL runs and returns JSON
Browser JS → ORDS → APEX → Database → JSON → Browser

10. Where Are Security & Sessions Handled?

Oracle APEX handles:

  • Authentication (login)
  • Authorization (roles & access)
  • Session management
  • CSRF protection

📌 Sessions are managed inside the database, making APEX very secure.


11. Why This Architecture Is Powerful

✔ Fewer moving parts

✔ High security

✔ Excellent performance

✔ Easy scaling

✔ Minimal infrastructure

That’s why APEX is widely used for enterprise applications.


12. Common Misconceptions

❌ APEX is a separate server

❌ APEX is only for small apps

❌ No coding required at all

✔ APEX is database-centric and enterprise-ready


13. Simple One-Line Summary

Oracle APEX = Browser + ORDS + Database (APEX runs inside DB)

If you understand this line, you understand APEX architecture.


14. Conclusion

Oracle APEX architecture is simple, elegant, and powerful once you see the full picture. Instead of spreading logic across multiple servers, APEX keeps everything close to the data, resulting in secure and high-performance applications.

Understanding this architecture will help you:

  • Debug issues faster
  • Design better applications
  • Explain APEX clearly in interviews

💡 Once you understand APEX architecture, everything else starts making sense.

Love coding? Me too! Let’s keep in touch – subscribe to my website for regular chats on Oracle APEX, PL/SQL,SQL JavaScript, and CSS.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *