Oracle 23c unleashed: App Development with JSON Duality Views

KScope 2024

Philipp Hartenfeller

15-Jul-2024 | Nashville

$whoami

Philipp Hartenfeller

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

Database World: Relational

Application World: Documents

Application World: Documents power UIs

The Clash

  • Translation between both worlds is tedious
  • Middleware: Spring, Express, etc.
  • Mapping: manual / ORM
  • ORDS: Autorest a nice start but not tailored to frontend
  • Allow for Reads and Writes

The Clash: Oracle Calling

So what is it?

  • A new view type
  • Parent and child tables form document
  • Read → get JSON document
  • Write → pass changed JSON document
  • Lost changes detection
  • Control which columns can be changed
  • ORDS REST enable → auto REST support

The how

            
            
          

Alternative Syntax

            
            
          

Demo

ORDS + REST

How to build your app

  • Protect your ORDS endpoints
  • Backend-for-frontend: customized JDV for every page
  • Read: GET
  • Write: I - POST | U - PUT | D - DELETE
  • (based on parent document)
  • Write helper function to communicate with JDVs

Demo

SvelteKit App

Issues: Authorization

  • Authorization can't be in database
    • (e.g. only authorized people allowed to write)
    • → check in app backend before writing to JDV
    • Client-side-rendered apps: read-only

Issues: Others

  • Pagination inside document
  • Having to get PKs from child table → duplicate values for n:m
  • Orderby bug

Resources

United Codes

Thank you!

Questions? Feedback?

Contact me: philipp@united-codes.com

hartenfeller.dev