XFILES, the APEX 4 version - The truth is in there

35
XFILES The APEX 4 Version XFILES The APEX 4 Version The truth is in thereRoel Hartman & Marco Gralike

description

Showing the versioning capabilities of Oracle's XML-DB by creating a version control system for Application Express (APEX) - built in APEX itself!

Transcript of XFILES, the APEX 4 version - The truth is in there

Page 1: XFILES, the APEX 4 version - The truth is in there

XFILES – The APEX 4 Version

XFILES

The APEX 4 VersionThe truth is in there…

Roel Hartman & Marco Gralike

Page 2: XFILES, the APEX 4 version - The truth is in there

• Oracle since v5, Forms 2.3, Case*Designer etc

• Presenter at UKOUG (4x), OOW (3x), Collab (1x), ODTUG (2x), OBUG, OGH, etc..

• Oracle ACE Director [DB Dev]

• Co-author of Expert Oracle Application Express

What about me?

Page 3: XFILES, the APEX 4 version - The truth is in there

• Oracle DBA since v6 (1993), XML-DB since (2003)

• Presenter (among others): UKOUG, Oracle Open World,MOW, Hotsos, OGH, OPP, ODTUG, UKOUG

• Oracle 11gRx database, XBRL Extension Beta trails

• Oracle ACE Director [XML-DB]

• OakTable member

• Customer Advisory Member Board XML-DB Oracle 12x

What about me?

Page 4: XFILES, the APEX 4 version - The truth is in there

History

Page 5: XFILES, the APEX 4 version - The truth is in there

XFILES - XMLDB

• XML-DB Demo Application GUI based on AJAX / HTML

Current version XFILES version V

• Mark DrakeSenior Product Manager

Oracle XML-DB

• Demonstrates (among others)

Native Database WebServices (NDWS) / SOA

Geo Information based XML handling

Page 6: XFILES, the APEX 4 version - The truth is in there

XFILES - APEX

• APEX GUI

• W/ help of Carl Backstrom

XFILES version IV

• Oracle Open World 2008

• Demonstrated Combined Power

APEX (V 3)

XML-DB (V 11.1)

Versioning & Lightweight Application Security

Page 7: XFILES, the APEX 4 version - The truth is in there

XML-DB

• Based on XML (&Related) Standards

• XML Handling

Stores, Consumes, Generates, Validation

• XDB Repository

HTTP(s), FTP & WebDAV

Repository Events

• Supports Security (ACL’s) & Versioning

• XPath V2, XSLT V1, XQuery V1, XBRL

Page 8: XFILES, the APEX 4 version - The truth is in there

Features Used

• XDB Repository

• Versioning, CheckIn/Out functionality

DBMS_XDB_VERSION

• Resource (file, folder) manipulation

DBMS_XDB

• Default XDB ACL Driven Security

Page 9: XFILES, the APEX 4 version - The truth is in there

XDB Repository Resources

• Access to XDB Repository

PATH_VIEW, RESOURCE_VIEW

• XDB$Resource

XDBResource.xsd

XMLType Table (Schema based XML Table)

• Select, Update, Delete

UNDER_PATH, EQUALS_PATH

Page 10: XFILES, the APEX 4 version - The truth is in there

Version Control

Create ResourceLock the Resource

Make itVersioned

Check it OutUpdate the Resource

Check It In

UnLock the Resource

Page 11: XFILES, the APEX 4 version - The truth is in there

Process Flow

# Create file / dbms_xdb.createResource

1. dbms_xdb.lockResource

2. dbms_xdb_version.makeVersioned

3. dbms_xdb_version.checkOut# Update file content

4. dbms_xdb_version.checkIn

5. dbms_xdb.unlockResource# Done…

Page 12: XFILES, the APEX 4 version - The truth is in there

Create Versioned Resource

Original source, with permission, by Mark D Drake, Senior Product Manager, Oracle USA

Page 13: XFILES, the APEX 4 version - The truth is in there

Create Versioned Resource

Original source, with permission, by Mark D Drake, Senior Product Manager, Oracle USA

Page 14: XFILES, the APEX 4 version - The truth is in there

Create Versioned Resource

Original source, with permission, by Mark D Drake, Senior Product Manager, Oracle USA

Page 15: XFILES, the APEX 4 version - The truth is in there

Create Versioned Resource

Original source, with permission, by Mark D Drake, Senior Product Manager, Oracle USA

Page 16: XFILES, the APEX 4 version - The truth is in there

Create Versioned Resource

Original source, with permission, by Mark D Drake, Senior Product Manager, Oracle USA

Page 17: XFILES, the APEX 4 version - The truth is in there

Create Versioned Resource

Original source, with permission, by Mark D Drake, Senior Product Manager, Oracle USA

Page 18: XFILES, the APEX 4 version - The truth is in there

Helper Function: getVersionHistory

Original source, with permission, by Mark D Drake, Senior Product Manager, Oracle USA

Page 19: XFILES, the APEX 4 version - The truth is in there

XMLTable Statement

Original source, with permission, by Mark D Drake, Senior Product Manager, Oracle USA

Page 20: XFILES, the APEX 4 version - The truth is in there

XMLTable Statement

Original source, with permission, by Mark D Drake, Senior Product Manager, Oracle USA

Page 21: XFILES, the APEX 4 version - The truth is in there

XMLTable Statement

Original source, with permission, by Mark D Drake, Senior Product Manager, Oracle USA

Page 22: XFILES, the APEX 4 version - The truth is in there

XMLTable Statement

Original source, with permission, by Mark D Drake, Senior Product Manager, Oracle USA

Page 23: XFILES, the APEX 4 version - The truth is in there

XMLTable Statement

Original source, with permission, by Mark D Drake, Senior Product Manager, Oracle USA

Page 24: XFILES, the APEX 4 version - The truth is in there

Demo

Page 25: XFILES, the APEX 4 version - The truth is in there
Page 26: XFILES, the APEX 4 version - The truth is in there

Version Control

• APEX has no files – at least, not a lot

• APEXExport Utility

• Export from Builder

• Export from SQL Developer

Version Control for APEX isn’t thatdifferent from PL/SQL !

Page 27: XFILES, the APEX 4 version - The truth is in there

Version Control

• apex_util.export_application

• apex_util.export_application_page

• apex_util.export_application_component

Issues :• undocumented and unsupported• USER instead of CURRENT_USER (4.1?)• Developed for SQL Developer/Plus

Page 28: XFILES, the APEX 4 version - The truth is in there

Version Control

• Export functions of wwv_flow_gen_api2

• Using wwv_flow_css_repository

• Using wwv_flow_html_repository

• Used in the Export utilities of the builder

Issues :• Even more undocumented and unsupported

Page 29: XFILES, the APEX 4 version - The truth is in there

Demo

Page 30: XFILES, the APEX 4 version - The truth is in there

Bu

yTh

isB

oo

k

Page 31: XFILES, the APEX 4 version - The truth is in there

Conclusions

• APEX / XMLDB

Extreme Powerful Combination

• Functionality

APEX Powerful Database Driven Mature

Web Development Environment

XMLDB Versioning / Security Build-in

Easy PL/SQL based Automation Possible

Page 32: XFILES, the APEX 4 version - The truth is in there

Questions

Page 33: XFILES, the APEX 4 version - The truth is in there

Thank you

34

Page 34: XFILES, the APEX 4 version - The truth is in there

Contribute !

Page 35: XFILES, the APEX 4 version - The truth is in there

Contact

Logica | Meander 901 P.O. Box 7015 | 6801 HA Arnhem | The Netherlands | www.logica.com

Contact: Roel Hartman - Lead Technical Architect Oracle: +31 (0) 26 3765 000 M: +31 (0) 6 2954 3729 E: [email protected]

AMIS Services BV | Edisonbaan 15 P.O. Box 24 | 3439 MN Nieuwegein | The Netherlands | www.amis.nl

Contact: Marco Gralike – Principal Database Consultant: +31 (0) 30 6016000 M: +31 (0) 6 29042385 E: [email protected]