xml data control - oracle openworld preview amis - richard olrichs en wilfred van der deijl

34
ADF EMG XML DataControl Powerful and Easy ADF Datacontrol for XML

Upload: amis-friends-of-oracle-and-java

Post on 10-Nov-2014

137 views

Category:

Technology


1 download

DESCRIPTION

Many organizations want to leverage their existing or newly developed web services in Oracle Application Development Framework (Oracle ADF) applications. Oracle ADF’s data binding layer provides a declarative way to access different types of data controls. Several of these data controls can be used to access XML content. They tend to be either easy to implement or very powerful. As a result of the Oracle ADF community’s effort, now there is a free open source XML Oracle ADF data control that is both simple and powerful. It can be used with SOAP web services, Oracle Business Process Management human tasks, or any other XML data. It is declarative, without the need for JAX-WS proxies or custom beans—although it is extensible with custom code. Come to this session to learn more.

TRANSCRIPT

Page 1: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

ADF EMG

XML DataControl Powerful and Easy ADF Datacontrol for XML

Page 2: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

About Us

Richard Olrichs

MN

www.olrichs.nl

@richardolrichs

Wilfred van der Deijl

The Future Group

www.redheap.com

@wilfreddeijl

Page 3: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Agenda

● History

● Alternatives

● Live product demo

● Summary

Page 4: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

XML DataControl History

● Development started at MN in August 2012

● Adopted by Spir-it since March 2014

● Open to the public o ADF EMG sub project

o https://adfxmldc.atlassian.net/wiki

Page 5: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Alternatives Calling WebService from ADF

1. ADF WebService DataControl

1. JAX-WS Proxy with Bean DataControl

1. Programmatic Business Components

Page 6: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

ADF WebService DataControl Alternatives

● Not customizable, for simple web services

● Dates and enumerations not supported

● Only for simple web services like stock info

or weather info

Page 7: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

JAX-WS Proxy with Bean DC Alternatives

● Lots of work: o Generate JAX-WS Proxy classes

o Domain POJO’s

o Mapper classes (and back).

● Labor intensive when services change

● JAX-WS Proxy cannot be used directly as

bean DataControl

o Dates and enumerations not supported

o JAXBElement getters/setters not supported

Page 8: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

● Lot of work:

o JAX-WS Proxy

o ViewObjects

o EntityObjects

o Mappers (and back)

● BC is very database (SQL) centric

o Commit, Rollback, Fault-In selects, locking,

connection pooling, etcetera

● Requires extensive coding in ADF BC base

classes

Programmatic ADF BC Alternatives

Page 9: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

ADF EMG XML DataControl

Developer’s Guide: “Data controls abstract the

implementation technology of a business service by using

standard metadata interfaces to describe the service's

operations and data collections, including information

about the properties, methods, and types involved.”

● XML Schema is the key

● XML DataControl gets its structure from XSD

● Runtime XML document can come from

anywhere o Web service, Human task payload, Static resource,

or… wherever you like

Page 10: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

ADF EMG

ADF EMG

ADF EMG

Page 11: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Demo Time ADF EMG XML DataControl

Page 12: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

ADF EMG XML DataControl

● Minimal effort to setup, yet powerful and

customizable

● JDeveloper 11.1.1 and 12.1.3

Page 13: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Powerful Providers

● Data Provider - Fetch XML Element

● Customization - Supplies customization classes

● Type Mapper - Map XML to Java types

● Structure Provider - Builds DC structure from XSD

Page 14: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

DataProvider Nesting

● Plain DataProviders o WSDataProvider - Web Service

o ELDataProvider - Expression Language

o ResourceDataProvider - XML file from classpath

● Nesting DataProviders o Can manipulate dynamic parameters going into the

nested dataprovider

o Get XML from nested provider and can manipulate it

before returning it to the caller

Page 15: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Nesting DataProviders

● XSL Transformation

● XML Schema Validation

● Caching

● Multi Nesting o UnionFilter - Combines result from multiple providers

o Build your own...

Page 16: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

WSDataProvider EmployeeService

<Employee>

<Type>MGR</Type>

</Employee>

Page 17: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

WSDataProvider ReferenceDataService

WSDataProvider EmployeeService

<Employee>

<Type>MGR</Type>

</Employee>

<EmployeeTypes>

<Type>

<Code>MGR</Code>

<Desc>Manager</Desc>

</Type>

</EmployeeTypes>

Page 18: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

WSDataProvider ReferenceDataService

WSDataProvider EmployeeService

UnionFilter

<Employee>

<Type>MGR</Type>

</Employee>

<EmployeeTypes>

<Type>

<Code>MGR</Code>

<Desc>Manager</Desc>

</Type>

</EmployeeTypes>

<Union>

<Employee>

</Employee>

<EmployeeTypes>

...

</EmployeeTypes>

</Union>

Page 19: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

WSDataProvider ReferenceDataService

WSDataProvider EmployeeService

UnionFilter

XSLFilter

<Employee>

<Type>MGR</Type>

</Employee>

<EmployeeTypes>

<Type>

<Code>MGR</Code>

<Desc>Manager</Desc>

</Type>

</EmployeeTypes>

<Employee>

<Type>MGR</Type>

<TypeDesc>Manager</TypeDesc>

</Employee>

<Union>

<Employee>

</Employee>

<EmployeeTypes>

...

</EmployeeTypes>

</Union>

Page 20: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

WSDataProvider ReferenceDataService

WSDataProvider EmployeeService

CacheFilter

UnionFilter

XSLFilter

<Employee>

<Type>MGR</Type>

</Employee>

<EmployeeTypes>

<Type>

<Code>MGR</Code>

<Desc>Manager</Desc>

</Type>

</EmployeeTypes>

<Employee>

<Type>MGR</Type>

<TypeDesc>Manager</TypeDesc>

</Employee>

<Union>

<Employee>

</Employee>

<EmployeeTypes>

...

</EmployeeTypes>

</Union>

Page 21: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Java Customizers

● Java Classes with Annotations

● Can alter structure and behavior of

datacontrol elements o Calculated Attributes

o Transient Attributes

o Attribute Validation

o Element Validation

o Post Attribute Change

o Post Element Created

o Custom operations/methods

Page 22: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Wiki - adfxmldc.atlassian.net/wiki

Page 23: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Next Steps

Subscribe for product announcements:

http://bit.ly/signupxml

Subscribe to ADF EMG:

http://www.adfemg.org

Follow XML DataControl development:

https://adfxmldc.atlassian.net/wiki

Page 24: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Questions

Page 25: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Demo shots

Page 26: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Creating Data Control

Page 27: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl
Page 28: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Initial Data Control

in 2 minutes

Dynamic

Parameter from

DataControls.dcx

Page 29: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Drag-Drop

Data Control

onto Page

Dynamic

Parameter value

(typically from EL)

Page 30: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Initial Task Flow

in 5 minutes

Page 31: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Which Data

Collection is this

customizing ?

Calculated (Read

Only) Attribute

Transient (Read

Write) Attribute

Attribute Validation

Page 32: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Register

Customization

Class(es) with

Data Control

Page 33: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Calculated Attribute

Transient Attribute

Page 34: XML Data Control - Oracle OpenWorld Preview AMIS - Richard Olrichs en Wilfred van der Deijl

Transient Attribute

Calculated Attribute

Attribute Validation