Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fast, low-code application development with APE...

Fast, low-code application development with APEX and open-source JavaScript modules in Oracle Database 23.2 FREE

Oracle APEX as a low code platform empowers developers to build incredible apps and solve real problems. And you won’t need to become an expert in a vast array of web technologies. By harnessing the power of GraalVM and Oracle Database Multilingual Engine (MLE) technologies, developers can effortlessly construct complete Apps using server-side JavaScript scripting utilizing a wide range of open-source modules and directly within the database reducing the time and effort required to build an entire app from scratch.

Tourabi Zakaria

July 13, 2023
Tweet

Other Decks in Programming

Transcript

  1. Fast, low-code application development with APEX and open-source JavaScript modules

    in Oracle Database 23.2 FREE Zakaria TOURABI Software Engineer @ Oracle R&D Hamza HAOUARIA Software Engineer @ Oracle R&D
  2. 2 Copyright © 2022, Oracle and/or its affiliates Hamza Haouaria

    • Software Engineer @ Oracle R&D • Started at Oracle Labs in 2022 • Working on Oracle Database Multilingual Engine (MLE) /hamza-haouaria Hamza HAOUARIA
  3. 3 Zakaria Tourabi • Software Engineer @ Oracle R&D •

    Started at Oracle Labs in 2022 • Working on Oracle Database Multilingual Engine (MLE) /zakariato Zakaria TOURABI
  4. 1. Low code platforms and Oracle APEX 2. GraalVM: The

    Key-enabling Technology of Oracle Database Multilingual Engine (MLE) 3. Managing JavaScript Code With Oracle database MLE 4. Putting it all together 5. Demo ( full-fledged JavaScript application in the Database) 6. Conclusion and QA session Agenda Copyright © 2022, Oracle and/or its affiliates 5
  5. • Oracle APEX as a low code platform empowers developers

    to build incredible apps and solve real problems effortlessly. • No need to become an expert in a vast array of web technologies. • Harness the power of GraalVM and MLE technologies to effortlessly construct complete apps using server-side JavaScript scripting. • Utilize a wide range of JavaScript open-source modules directly within the database. • Enables to build scalable and secure enterprise apps with world-class features 20X faster with 100X less code. Abstract Copyright © 2022, Oracle and/or its affiliates 6
  6. • Managing non business features (authentication, authorization, data access) is

    time and effort consuming. • Steeper learning curve. • Handle mobile development and responsive design. • Complex maintenance ( dependencies managements, vulnerability patching, database updates...). • Setup environment for collaboration and team development. Problem: Develop applications from scratch is time and resource consuming Copyright © 2022, Oracle and/or its affiliates 7
  7. • Development environment used to create application software through a

    graphical user interface. • May produce entirely operational applications (No-Code) or require additional coding for specific situations. • Reduce time, enable accelerated delivery of business applications. • Wider range of people can contribute (not only programmers). • Can lower the initial cost of setup, training, deployment and maintenance. Solution: Low-Code Development Platform (LDCP) [1] Copyright © 2022, Oracle and/or its affiliates 8 [1] https://en.wikipedia.org/wiki/Low-code_development_platform
  8. Use Case 1: Transform Your Spreadsheets to Web Apps in

    Minutes Copyright © 2022, Oracle and/or its affiliates 9 • Single source-of-truth • Send out a URL not a file • Secure, scalable, multi-user app • Extend with Charts, Calendars, Validations, and more Solutions • Drag and Drop an XLS, CSV, XML, or JSON file • Create table in Autonomous Database • Upload data into new table • Create App based on new table Features
  9. Build new business and productivity apps Use Case 2: Rapid

    Application Development Copyright © 2022, Oracle and/or its affiliates 10 • Opportunistic • Simplistic, tactical apps to meet immediate need • Webify paper processes • Generally developed by one or two people Solutions • Build apps in days / weeks not months / years • Use powerful wizards to create fully featured apps • Easily modify to meet changing requirements • Rapidly iterate to production-ready app • Low-code capabilities allow non-IT professionals to also build or help build apps Features
  10. What Is Oracle APEX? 11 Copyright © 2022, Oracle and/or

    its affiliates A low-code development platform that enables you to build scalable and secure enterprise apps with world-class features that can be deployed anywhere.
  11. Oracle APEX 12 Copyright © 2022, Oracle and/or its affiliates

    Database-centric web application development framework Visualize and maintain database data Leverage SQL Skills and database capabilities Develop desktop and mobile web apps
  12. Distinguishing Characteristics 13 Copyright © 2022, Oracle and/or its affiliates

    App Development IDE is a web browser. No client software needed App definitions are stored in the database as meta data. Declarative – No code generation Page generation is efficient with only one request and one response. Data processing done in the Database
  13. APEX Architecture 14 Copyright © 2023, Oracle and/or its affiliates

    HTTP(s) JDBC Data Schemas APEX Engine SQL & PL/SQL Oracle Database (Pluggable or Dedicated, 19c or Above) Oracle REST Data Services (Weblogic, Jetty, Tomcat) Zero latency database data access Dynamically driven by APEX metadata No Application Logic Converts HTTP to database API calls Database Tier Mid Tier Browser
  14. APEX Architecture with MLE/JavaScript 15 Copyright © 2023, Oracle and/or

    its affiliates HTTP(s) JDBC Data Schemas APEX Engine SQL & PL/SQL Oracle Database (Pluggable or Dedicated, 19c or Above) Oracle REST Data Services (Weblogic, Jetty, Tomcat) Zero latency database data access Dynamically driven by APEX metadata No Application Logic Converts HTTP to database API calls Database Tier Mid Tier Browser JavaScript since Oracle 21c / APEX 20.2
  15. Oracle Database Multilingual Engine: GraalVM in the Database • Started

    as an Oracle Labs research project some time in 2013. • Was released on December 8, 2020 as part of the Oracle Database 21c in the Oracle Cloud [1] • First release features dynamic JavaScript execution through DBMS_MLE [2] 17 Copyright © 2022, Oracle and/or its affiliates [1] Oracle Database Always-Free Tier, check it out on oracle.com/free [2] docs.oracle.com/en/database/oracle/oracle-database/21/arpls/dbms_mle.html#GUID-3F5B47A5-2C73-4317-ACD7- E93AE8B8E301 23 C
  16. Using DBMS_MLE through APEX Using DBMS_MLE standalone Using Server-Side Scripting

    in APEX Copyright © 2022, Oracle and/or its affiliates 18 apex.env.P2_OUTPUT = (apex.env.P1_INPUT / 1) + 7; DECLARE ctx dbms_mle.context_handle_t; user_code varchar2(1024) := q'~ let bindings = require("mle-js-bindings"); let input = bindings.importValue("P1_INPUT"); bindings.exportValue("P2_OUTPUT", input + 7); ~'; BEGIN ctx := dbms_mle.create_context(); dbms_mle.export_to_mle(ctx, 'P1_INPUT', P1_INPUT) ; dbms_mle.eval(ctx, 'JAVASCRIPT', user_code); dbms_mle.import_from_mle(ctx, 'P2_OUTPUT', P2_OUT PUT); dbms_mle.drop_context(ctx); END; /
  17. Copyright © 2023, Oracle and/or its affiliates 19 • To

    leverage MLE in 21c: 1. grant execute dynamic mle to my_schema 2. grant execute on sys.javascript to my_schema 3. grant create mle to my_schema To leverage • MLE in 23c: • grant db_developer_role to my_schema Note: When provisioning an apex workspace and schema via the APEX builder, all needed grants will be provided automatically! MLE requirements, grants:
  18. Object Browser • Ability to create modules (via file upload,

    inline code, or URL). • Ability to group modules into environments so they can call each other. • Ability to test modules in SQL Commands and specify an Environment. MLE integration in APEX Copyright © 2022, Oracle and/or its affiliates 20
  19. Supported APEX Components • Computations • Validations • Processes •

    Execute Server-side Code Dynamic Action • Dynamic Content Region Shared Components => Security Attributes => Database Session => MLE Environment APEX + MLE = JavaScript + Low-Code = AWESOME DEVELOPMENT Copyright © 2022, Oracle and/or its affiliates 21
  20. APIs • Use apex.env to read and write session state

    values. e.g: • Use apex.conn to execute SQL from within JavaScript • JavaScript modules use static imports like: • Snippets (in SQL Commands or APEX) use dynamic imports like: Using MLE in APEX Copyright © 2022, Oracle and/or its affiliates 22 APEX makes it eve easier !
  21. • APEX is high productivity low code platform. • APEX

    runs in Oracle Database. • Multilingual Engine (MLE) enables JavaScript in Oracle Database. • APEX can now use open-source JavaScript modules. Conclusion Copyright © 2022, Oracle and/or its affiliates 24
  22. § Getting Started : • Install Oracle Database Free. •

    Create Free Online Oracle APEX Workspace. • Oracle Could Free Tier. • Install APEX in Self-managed Databases. § Blogs : o Build Apps Fast in Oracle Cloud Infrastructure. o Introduction to JavaScript in Oracle Database 23c Free. § Live Lab : o Create App Using APEX + Server-Side JavaScript. Resources Copyright © 2022, Oracle and/or its affiliates 25