Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform....

107
1 Oracle APEX 18.1 (aka 5.2) The Golden Nuggets Dietmar Aust Opal-Consulting, Köln www.opal-consulting.de

Transcript of Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform....

Page 1: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

1

Oracle APEX 18.1 (aka 5.2) The Golden Nuggets

Dietmar Aust Opal-Consulting, Köln

www.opal-consulting.de

Page 2: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

2 About Dietmar.

•  Dipl.-Inform.DietmarAust,FreelanceConsultant•  Master'sDegreeinComputerScience(MSCS)

•  BuildingOraclebasedWebApplicationssince1997•  Portal,Forms,Reports,OWAToolkit,nowAPEX!

•  1997-2000:ConsultantatOracleGermany

•  Since09/2000:FreelanceConsultant,Since2006–APEXonly!

•  AuthoroftheJasperReportsIntegrationtoolkit•  http://www.opal-consulting.de/tools

•  2015DatabaseDeveloperoftheyearintheORDScategory

Page 3: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

3

Feature Analysis

Page 4: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

4 How to find the new features?

https://apexea.oracle.com/ Documentation (BETA) https://docs.oracle.com/database/apex-18.1/

Actually compute the delta between different APEX versions: -  APEX Dictionary -  Packages

Page 5: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

5 Wie wurde analysiert?

Page 6: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

6 How to find the new features?

In Debug-Mode (logged in as developer) APEX uses the uncompressed Javascript Files (Source Code)

Page 7: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

7 How to find the new features?

Page 8: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

8 How to find the new features?

Definition in User-Interface > Concatenated Files Sample: Oracle APEX Page Designer, Application 4000, Page 4500

Pre18.1

Page 9: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

9 Sample application / slides available for download

http://dietmaraust.com/blog

Page 10: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

10

Architecture

Page 11: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

11 Additional x11-x20 … Parameters in AJAX calls

The big archtitecture change was in APEX 5.1 => JSON processing Small change in 18.1: Additional Parameters for AJAX calls x11-x20 Javascript on client PL/SQL on server side

Page 12: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

12

Application Builder

Page 13: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

13

Application Builder

Spotlight Search

Page 14: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

14 Spotlight Search

Powerful Search Feature (like on the Mac) to search for •  Workspace and application areas and navigates there (Packaged

Apps, SQL Workshop, Shared Components, ...) •  Applications •  Pages •  Application content •  within pages, etc.

Context dependent (Workspace, Application, Page Designer)

Page 15: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

15 Spotlight Search

Page 16: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

16 Spotlight Search

How to figure out the right keyboard shortcut in your language? CTRL-’ on an English layout … what is the representation of ‘ in a different language?

CTRL-ä on a German layout

Page 17: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

17

Application Builder

Compatibility Mode

Page 18: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

18 Compatibility Mode

The compatibility mode changes the behaviour of the APEX engine at runtime => balancing new features / security / stricter checks and easy upgrades => No Changes in APEX 18.1

Page 19: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

19

Application Builder

Default Schema

Page 20: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

20 Default Schema

Set default schema for user in workspace Pre18.1

Page 21: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

21 Default Schema

Default schema is used: – SQLWorkshop–  Installationofpackagedapplications

Pre18.1

Page 22: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

22

Application Builder

UT User Interface Attributes

Page 23: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

23 User Interface Attributes > Collapsed by Default

Universal Theme starts with left navigation side collapsed

Page 24: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

24 User Interface Attributes > "Built with APEX" Footer

Universal Theme has a new footer Can be turned off in User Interface Attributes

Page 25: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

25

Application Building

Page 26: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

26

Application Building

Social Sign-In

Page 27: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

27 New Authentication Scheme

New Authentication Scheme – SocialSign-In

Authentication Provider

Page 28: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

28 New Authentication Scheme

About OAuth2 and its flow https://developers.google.com /identity/protocols/OAuth2

Page 29: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

29 New Authentication Scheme

Example: Steps to authenticate with Google 1.  Register oauth2 client with Google 2.  Create web credentials in APEX 3.  Create authentication scheme and use credentials

Page 30: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

30 New Authentication Scheme

1.  Register client with Google Register client: https://console.developers.google.com/

Page 31: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

31 New Authentication Scheme

Page 32: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

32 New Authentication Scheme

2.  Create web credentials in APEX

Page 33: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

33 New Authentication Scheme

3.  Create authentication scheme and use credentials

Page 34: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

34 New Authentication Scheme

Scopes https://developers.google.com/identity/protocols/googlescopes#google_sign-in

Page 35: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

35 Social Sign In – Requirements for https callouts

Requirements •  Google redirects back to official DNS domain •  Needs ACLs to call webservice (see APEX Install) •  Needs wallet for certificates

–  https://blogs.oracle.com/apex/apex-https-certificates-and-the-oracle-wallet

–  https://apex.oracle.com/pls/apex/germancommunities/apexcommunity/tipp/6121/index-en.html

•  Register wallet in APEX Instance – ManageInstance>InstanceSettings>Wallet

Page 36: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

36 Social Sign In – Requirements for https callouts

Different ways make https callouts from the database 1.  Create Wallet with orapki

–  https://oracle-base.com/articles/misc/utl_http-and-ssl#test-unsecured-connection

–  https://blogs.oracle.com/apex/apex-https-certificates-and-the-oracle-wallet

2.  Create Wallet using openssl –  https://blog.hazrulnizam.com/openssl-workaround-oracle-xe-wallet/

3.  Use reverse proxy: –  https://fuzziebrain.com/content/id/1711/

Page 37: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

37

Application Building

Switching Auth Schemes

Page 38: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

38 Switching Authentication Schemes at Runtime

Why use multiple authentication schemes at runtime?

Page 39: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

39 Switching Authentication Schemes at Runtime

Step 1 – make apex login current scheme Step 2 - Enable switch in session for the Google scheme

Page 40: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

40 Switching Authentication Schemes at Runtime

Step 3 - Add button to login page and use a URL to switch to the Google scheme Request variable: APEX_AUTHENTICATION=<Scheme Name> f?p=&APP_ID.:1:&APP_SESSION.:APEX_AUTHENTICATION=Google

Page 41: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

41 Switching Authentication Schemes at Runtime

Post Authentication Handler – change username --derivenewusernamefrom:APP_USERcase:app_userwhen'[email protected]'thenl_new_app_user:='[email protected]';else--willnotchangel_new_app_user:=l_orig_app_user;endcase;--setuserforthissessionapex_custom_auth.set_user(p_user=>l_new_app_user);

Page 42: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

42 Switching Authentication Schemes at Runtime

Post Authentication Handler – get scope attributes --getattributebynameapex_json.get_varchar2(p_path=>'id_token');apex_json.get_varchar2(p_path=>'access_token');--orloopoverallattributesl_idx:=apex_json.g_values.first;while(l_idxisnotnull)loopl_value:=apex_json.g_values(l_idx);:p2_user_info:=:p2_user_info||get_output_str(p_idx=>l_idx,p_value=>l_value);l_idx:=apex_json.g_values.next(l_idx);endloop;

Page 43: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

43 Switching Authentication Schemes at Runtime

Post Authentication Handler – make additional request --secondrequest,toretrieveadditionaluserinformationc:=apex_web_service.make_rest_request(p_url=>'https://www.googleapis.com/oauth2/v3/userinfo',p_http_method=>'GET',p_credential_static_id=>'GOOGLE');apex_json.parse(c);

Page 44: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

44

Application Building

Access Control

Page 45: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

45 Application Access Control

Management of Roles and User / Role Mappings as part of the application Why? •  Convenience, almost every application

needs it •  Used for blueprint applications

Page 46: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

46 Application Access Control

Page 47: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

47 Application Access Control

Page 48: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

48 Application Access Control

Security Setting to define the meaning of “ROLE”

Page 49: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

49 Application Access Control

This makes a difference when using Authorization Schemes

Page 50: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

50 Application Access Control

Summary •  Roles are exported with the application •  User / Role Mappings are NOT

– TargetconfigurationNOToverwritten•  API provided: APEX_ACL•  Data dictionary views for viewing and modifying the

data (INSERT,UPDATE,DELETE on APEX_APPL_ACL_USERS)

Page 51: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

51

Application Building

Application Settings

Page 52: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

52 Application Settings

Maintain application specific configuration settings, e.g. Environment, Email servers, ... Why? •  Application and Source Code should be identical

between environments, specifics go into config table •  => similar to configuration files in other applications

Page 53: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

53 Application Settings

On Upgrade Keep Values => respect the value upon upgrade

Page 54: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

54

Application Building

Email Templates

Page 55: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

55 Email Templates

Manage Email Templates as part of the application

Page 56: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

56 Email Templates

Page 57: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

57 Email Templates

Send email via API beginapex_mail.send(p_to=>'[email protected]',p_template_static_id=>'TEST1',p_placeholders=>'{'||'"CUSTOMER_NAME":'||apex_json.stringify('Dietmar')||',"ITEMS_ORDERED":'||apex_json.stringify(6)||',"MY_APPLICATION_LINK":'||apex_json.stringify('')||',"ORDER_DATE":'||apex_json.stringify('')||',"SHIPPING_ADDRESS_LINE_1":'||apex_json.stringify('')||',"SHIPPING_ADDRESS_LINE_2":'||apex_json.stringify('')||',"SHIP_TO":'||apex_json.stringify('')||'}');end;

Page 58: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

58 Email Templates

Page 59: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

59 Email Templates

Just generate the HTML via the API declarel_subjectvarchar2(4000);l_htmlclob;l_textclob;beginapex_mail.prepare_template(p_static_id=>'ORDER',p_placeholders=>'{"ORDER_NUMBER":5321,"ORDER_DATE":"01-Feb-2018","ORDER_TOTAL":"$12,000"}',p_subject=>l_subject,p_html=>l_html,p_text=>l_text);end;

Page 60: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

60 Email Templates

Manage Email Templates as part of the application Good separation of Templates and data in placeholders Easy to use No complex logic supported

Page 61: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

61

Items and Regions

Page 62: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

62

Items and Regions

Text with Autocomplete

Page 63: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

63 'Text with Autocomplete' item type using Oracle JET

Re-Implementation of the item type „Text with Autocomplete“ based on Oracle JET APEX 5.1 APEX 18.1

Page 64: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

64 'Text with Autocomplete' item type using Oracle JET

Advantages: •  Improved accessibility •  Lazy loading with cache •  Minimum search characters

Page 65: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

65

Items and Regions

Responsive Rich Text

Page 66: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

66 Responsive Rich Text

Responsive Rich Text editor - automatically adjusts to the region width.

Page 67: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

67 Responsive Rich Text

Feature can be turned off in Shared Components > Component Settings Initially turned off for imported / upgraded applications

Page 68: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

68

RESTful Services (providing)

Page 69: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

69 RESTful Services (providing)

SQL Workshop Integration upgraded to use ORDS APIs

Schemas §  APEX_180100 §  APEX_LISTENER §  APEX_REST_PUBLIC_USER

Schemas §  ORDS_METADATA §  ORDS_PUBLIC_USER

NewFeaturesonlyhere

Page 70: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

70 RESTful Services (providing)

“Old” RESTful services still available – READ ONLY

Page 71: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

71 RESTful Services (providing)

“Old” RESTful services still available – READ ONLY

Page 72: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

72 RESTful Services (providing)

New RESTful Services use API for ORDS_METADATA

Page 73: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

73 RESTful Services (providing)

New RESTful Services use API for ORDS_METDATA Features: •  More capable template handlers •  Autorest enablement for tables,

views and procedures •  OAUTH2 support •  Open API 2.0 (Swagger) Support •  ...

Page 74: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

74 RESTful Services (providing)

Integration with Swagger to generate doc •  http://douggault.com/2018/03/19/swagger-doc-from-

apex-ords-restful-workshop •  SWAGGER UI 2.0+ Server (based on Node.js) •  https://swagger.io/download-swagger-ui/

Page 75: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

75 RESTful Services (providing)

APEX Instance Administration

Page 76: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

76 RESTful Services (providing)

Page 77: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

77

SQL Workshop

Page 78: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

78

SQL Workshop

Quick SQL

Page 79: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

79 SQL Workshop > QuickSQL

QuickSQL is now integrated, used to be a packaged app

Page 80: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

80 SQL Workshop > QuickSQL

Page 81: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

81

SQL Workshop

Sample Datasets

Page 82: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

82 SQL Workshop > Sample Datasets

Sample Datasets

Page 83: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

83 SQL Workshop > Sample Datasets

Sample Datasets – very good to help with training and troubleshooting

Page 84: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

84

Packaged Applications

Page 85: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

85 APEX_PKG_APP_INSTALL

Install, upgrade and delete packaged applications on the command line:

declarel_app_idnumber;begin--Installl_app_id:=APEX_PKG_APP_INSTALL.install(p_app_name=>'SampleTrees',p_authentication_type=>'NATIVE_APEX_ACCOUNTS',p_schema=>'DAUST_DE');end;

Pre18.1

Page 86: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

86 APEX_PKG_APP_INSTALL

Great for automatically installing all packaged applications after a patch to look for gems or upgrade all applications at once. Currently (not yet) officially supported but used by Oracle in the cloud. Data Dictionary View APEX_PKG_APPS

Page 87: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

87 Install Packaged Applications

Allow „Modify Other Applications“ in security settings

Page 88: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

88

PL/SQL APIs

Page 89: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

89 PL/SQL APIs

APEX_ACL Application Access Control

APEX_APP_SETTING

Application settings

add_user_role has_user_any_roles has_user_role remove_all_user_roles remove_user_role replace_user_roles get_value set_value

Page 90: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

90 PL/SQL APIs

APEX_APP_BUILDER_API Generate Pages, Reports, etc.

Mainly used in Data Reporter, not (yet) officially supported

delete_page_item delete_region

APEX_APPLICATION_INSTALL Application settings

get_no_proxy_domains get_remote_server_base_url get_remote_server_https_host get_remote_server_ords_tz set_remote_server

Page 91: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

91 PL/SQL APIs

APEX_CREDENTIAL Public API for Secure Credentials

(basic auth / oauth2)

clear_tokens set_persistent_credentials set_persistent_token set_session_credentials set_session_token

APEX_JWT Handling von JSON Web Tokens

decode encode validate

APEX_COLLECTION Collection handling

create_collection (Parameter p_truncate_if_exists)

Page 92: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

92 PL/SQL APIs

APEX_EXEC SQL Execution (mostly

remote), especially for plugin- developer

add_column add_filter add_order_by add_parameter close execute_plsql execute_remote_plsql execute_web_source get_anydata get_clob get_column …

https://blogs.oracle.com/apex/apex-181-early-adopter-2-rest-services-and-plsql

Page 93: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

93 PL/SQL APIs

APEX_EXPORT Replacement for wwv_flow_utilities.

export_application_to_clob

get_application get_workspace_files get_feedback get_workspace

APEX_MAIL Mail handling

prepare_template send_mail (support template)

APEX_SESSION Session utils

testing in sqlplus / sqlcl running apex_exec in sqlplus / sqlcl

attach create_session delete_session detach

5.1.4

Page 94: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

94 PL/SQL APIs

--initializesessionapex_util.set_security_group_id(apex_util.find_security_group_id('TRAINING'));apex_session.create_session(p_app_id=>1386,p_page_id=>4,p_username=>'DIETMAR.AUST');--getvaluesfromsessionstateselectv('APP_ID')asapp_id,v('APP_SESSION')asapp_session,v('APP_USER')asapp_user,apex_app_setting.get_value(p_name=>'INSTANCE_TYPE')instance_typefromdual;--removesessionapex_session.delete_session(p_session_id=>nv('APP_SESSION'));

Page 95: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

95 PL/SQL APIs

APEX_UTIL Utilities

delete_feedback delete_feedback_attachment get_timeframe_lov_data reply_to_feedback set_parsing_schema_for_request

Multitenant applications Switching datasets (different schemas) prepare_url (Parameter p_plain_url)

Page 96: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

96

Data Dictionary

Page 97: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

97 APEX_WORKSPACE_GROUPS

New columns application_idand application_name, „true“ workspace groups now: whereapplication_idisnull

Page 98: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

98 APEX_WEBSERVICE_LOG

https://jastraub.blogspot.de/2018/03/apex-181-new-feature-logging-web.html

Page 99: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

99 Universal Theme light / dark navigation

Page 100: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

100 Create Feature Page

Create Application Wizard supports Features (Blueprint)

Page 101: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

101 Create Feature Page

Add „Blueprint“ features to your app AFTER creation

Page 102: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

102 Questions?

Opal Consulting Zum Tilmeshof 11 50859 Köln Germany

Email / Website [email protected] www.opal-consulting.de

Page 103: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

103

Backup

Page 104: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

104 Resource Links

New Resource Links on APEX Workspace Homepage •  Shortcuts on Community Site •  Twitter, Youtube, LinkedIn, Facebook Great idea … but everybody has different needs

Page 105: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

105 Custom Resource Links

Customizing the Workspace or Instance Announcement (HTML is only allowed here, not in the news items)

Page 106: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

106 Custom Resource Links

Customizing the Workspace Announcement

Page 107: Oracle APEX 18.1 (aka 5.2) The Golden Nuggets - doag.org · About Dietmar. 2 • Dipl.-Inform. Dietmar Aust, Freelance Consultant • Master's Degree in Computer Science (MSCS) •

107 Tree Region - Enhancements

•  The Advanced: JavaScript Initialization Code attribute is supported.

•  JSDoc for Tree Region, easier to customize the tree •  Support Dynamic Action Event: Selection Change [Tree]. •  Advanced Config option (nodeSelector) to support checkbox

selection. •  Tree region now supports the apex.region API => but AJAX

REFRESH is still not possible! •  Copy selection to clipboard.