DEV-11: Leveraging ProDataSets in an Open Environment - PowerPoint PPT Presentation

About This Presentation
Title:

DEV-11: Leveraging ProDataSets in an Open Environment

Description:

Override option in ProxyGen allows change from default of ProDataGraph to using SQL ... Progress DataSource ... the ABL-.Net Mapping Using ProDataSets ... – PowerPoint PPT presentation

Number of Views:229
Avg rating:3.0/5.0
Slides: 52
Provided by: PSC77
Category:

less

Transcript and Presenter's Notes

Title: DEV-11: Leveraging ProDataSets in an Open Environment


1
DEV-11 Leveraging ProDataSets in an Open
Environment
Robin Brown
Principal Software Engineer
2
Progress DataSets
  • Business Objects
  • Logical grouping of related data
  • In-memory cache of data
  • Data source separate from DataSet
  • Data abstraction

3
ProDataSets in the OpenEdge Reference
Architecture
ABL Client Progress ProDataSet
.NET Open Client ADO.NET DataSet
AppServer ABL Progress ProDataSet
4
ProDataSets in the OpenEdge Reference
Architecture
AppServer ABL Progress DataSet
ABL to Database Progress DataSet
(XML)
5
ProDataSets in the OpenEdge Reference
Architecture
.NET Open Client ADO.NET DataSet
This Sessions Focus
Java Open Client Java SDO
ABL READ-XML ( ) WRITE-XML( ) Progress DataSet
6
Agenda
  • Overview of ProDataSet and OpenClient
  • .NET OpenClient / DataSet
  • Java OpenClient / SDO
  • ProDataSets to/from XML

7
Progress DataSets Defined
  • One or more Temp-Table buffers
  • Default or user-defined
  • Relationships defined between tables
  • Field-mapping
  • Custnum ?? Cust_num
  • Pass as parameters
  • Local
  • APPEND option
  • BY-REFERENCE option
  • Remote

ProDataSet
Temp-Table
Fields
Indexes
Temp-Table
Data-Relations
Fields
Indexes
Temp-Table
Fields
8
Open Client and ProxyGen
App Object
Proc Object
ABL Business Logic (r-code)
Sub- AppObj
Web Services Mapping file (.wsm)
Java Proxy Code
.NET Proxy Code
9
10.1A - OpenAPI
NEW!
  • Run arbitrary procedure on AppServer without
    proxy
  • New Classes
  • Progress.Open4GL.Proxy. (.Net)
  • com.progress.open4gl.javaproxy. (Java)

OpenAppObject
OpenProcObject
ParamArray
10
Open Client Architecture
.NET / Java Client
OpenEdge AppServer
Client App
Proxy
Internet /Intranet
Open Client Runtime
App Object
AppServer
Proc Object
Proc Object
HTTP/S
Sub- AppObj
Name Server
Database Server
.Net Framework / JRE
Communication Protocol
11
Agenda
  • Overview of ProDataSet and OpenClient
  • .NET OpenClient / DataSet
  • Java OpenClient / SDO
  • ProDataSets to/from XML

12
ADO.NET DataSets Defined
ADO.NET DataSet
  • One or more DataTables
  • DataColumns define fields
  • DataConstraints define integrity rules
  • Relationships defined between tables
  • Map fields between tables
  • Share many features of ProDataSet

DataTable
DataColumns
DataConstraint
DataTable
DataRelations
DataColumns
DataConstraint
DataTable
DataColumns
13
Mapping ProDataSets to .Net DataSets
ABL Component .Net Object
ProDataSet DataSet
Temp-Table DataTable
Buffer (record) DataRow
Before-Table GetChanges() on DataSet
Field DataColumn
Data-Relation DataRelation
Unique/Primary Index DataConstraint
14
10.1A Completes the ABL-.Net Mapping
NEW!
  • INITIAL Value
  • XML attributes
  • UNDO
  • DATA-SOURCE-MODIFIED
  • REJECTED

15
Using ProDataSets in a .NET Open Client
environment
DataSets on both ends of the wire
16
Passing DataSets in .Net
Static versus Dynamic
Progress AppServer
.NET Client
Static
.Net Typed DataSet
Static DataSet
Data Only
Dynamic
Schema Data
ADO .Net DataSet
Dynamic DataSet
17
Procedure using Static ProDataSet
ABL code
/ StaticDs.p / dsOrderDef.i DEF INPUT
PARAMETER piGE AS INT. DEF INPUT PARAMETER piLE
AS INT. DEF OUTPUT PARAMETER DATASET FOR
dsOrder. DATA-SOURCE srcOrdFILL-WHERE-STRING
WHERE Order.OrderNum GE STRING(piGE)
AND Order.OrderNum LE STRING(piLE). /
Fill the dsOrder DataSet / DATASET
dsOrderFILL().
1
2
3
18
Method using Static .Net DataSet
.NET C code
using nsOrderDS.StrongTypesNS dsOrderDataSet
dsOrders try appObj.StaticDS
(iLowRange, iHighRange, out dsOrders) ...
1
2
19
Agenda
  • Overview of ProDataSet and OpenClient
  • .NET OpenClient / DataSet
  • Java OpenClient / SDO
  • ProDataSets to/from XML

20
Overview Java Service Data Objects (SDO)
Java Specification Request (JSR) 235
  • Technical description of Java SDOs published by
    BEA and IBM
  • Java SDO Technology (JSR 235)
  • http//jcp.org/en/jsr/detail?id235
  • Reference Implementation
  • Eclipse Modeling Framework (EMF 2.0.1)
  • http//www.eclipse.org/emf/sdo.php

21
Java SDO Objects
  • DataObject
  • Disconnected view of structured data
  • Holds data as a set of properties
  • Relational data
  • Reference to another DataObject
  • DataGraph
  • Graph (or tree) of DataObjects
  • Single root DataObject
  • Typical unit of transfer
  • Contains a ChangeSummary object

22
Java SDO Objects (contd)
  • ChangeSummary
  • Captures changes from all DataObjects in a
    DataGraph
  • Applied back to data source using Data Mediator
    Service
  • Data Mediator Service NOT needed
  • Data sent to/from the OpenEdge AppServer

23
Java SDO Implementation Issues
  • Limitations of Java SDO design
  • Relationship support
  • No meta data to describe relationship
  • No GregorianCalendar support
  • Needed to map to DATETIME(-TZ) fields
  • Inefficient access to DataGraph changes
  • Need changes-only DataGraph for AppServer

ProDataGraph implementation overcomes limitations
24
Primary Progress Classes (extensions)
Java classes com.progress.open4gl.
  • ProDataGraph
  • Extends Java SDO DataGraph
  • ProDataGraphMetaData
  • Specifies the ProDataGraph meta data
  • ProDataObject
  • Extends Java SDO DataObject
  • ProDataObjectMetaData
  • Specifies the ProDataObject meta data
  • ProChangeSummary
  • Extends Java SDO ChangeSummary
  • ProDataRelationMetaData
  • Resolves missing relational metadata support

25
Mapping ProDataSets to Java SDOs
ABL Component Java Object
ProDataSet ProDataGraph
Temp-Table List of ProDataObjects
Buffer (record) ProDataObject
Before-Table getChanges() on ProChangeSummary
Field Property in ProDataObject
Data-Relation ProDataRelationMetaData
Index ProDataObjectMetaData
26
Passing DataSet Parameters in Java
Same for Static AND Dynamic
OUTPUT
INPUT-OUTPUT
INPUT
ProDataGraphHolder
27
Procedure using Static ProDataSet
ABL code
/ StaticDs.p / dsOrderDef.i DEF INPUT
PARAMETER piGE AS INT. DEF INPUT PARAMETER piLE
AS INT. DEF OUTPUT PARAMETER DATASET FOR
dsOrder. DATA-SOURCE srcOrdFILL-WHERE-STRING
WHERE Order.OrderNum GE STRING(piGE)
AND Order.OrderNum LE STRING(piLE). /
Fill the dsOrder DataSet / DATASET
dsOrderFILL().
28
Method using ProDataGraph
Java Client code
import com.progress.open4gl. import
commonj.sdo. ProDataGraphHolder dgHolder
new ProDataGraphHolder() ProDataGraph dg
null try appObj.StaticDS
(iLowRange, iHighRange, dgHolder) dg
dgHolder.getProDataGraphValue() List rows
dg.getProDataObjects(Order") ...
1
2
3
4
5
29
Updating a DataSet
  • ProChangeSummary object tracks changes
  • Works similar to ProDataSet
  • Tracks modified, added, deleted rows
  • Keeps track of original versions

30
Demo
31
Temp-Table Parameters
Cannot mix ProDataGraph and java.sql.ResultSet
32
New .jar files for CLASSPATH
Location ltinstall-dirgt/java/ext/
  • SDO jar files
  • common.jar
  • commonj.sdo.jar
  • ecore.jar
  • ecore.change.jar
  • ecore.resources.jar
  • ecore.sdo.jar
  • ecore.xml.jar

33
Agenda
  • Overview of ProDataSet and OpenClient
  • .NET OpenClient / DataSet
  • Java OpenClient / SDO
  • ProDataSets to/from XML

34
ProDataSets in the OpenEdge Reference
Architecture
NEW!
ABL READ-XML ( ) WRITE-XML( ) Progress DataSet
(XML)
35
New Methods Added
ProDataSet
  • WRITE-XML
  • WRITE-XMLSCHEMA
  • READ-XML
  • READ-XMLSCHEMA
  • Methods apply to
  • ProDataSet
  • Temp-Table
  • Temp-Table Buffer

.xsd
.xml
36
WRITE-XML ( )
Syntax
WRITE-XML (target-type, file stream memptr
handle longchar , formatted , encoding
, schema-location, , write-xml schema ,
min-xmlschema, write-before-image)
Example
DEFINE DATASET dsOrder... / attach datasources
and FILL / DATASET dsOrderWRITE-XML ("FILE",
dsOrder.xml",
TRUE). / formatted /
37
ProDataSet XML Example
Order Row
OrderLine Row
38
NESTED Attribute ProDataSet Data-Relation
Example
DEFINE DATASET dsOrder FOR eOrder,eOrderLine
DATA-RELATION OrderLine FOR eOrder,eOrderLine
RELATION-FIELDS (OrderNum,OrderNum) NESTED.
/ attach datasources and FILL / DATASET
dsOrderWRITE-XML ("FILE",
dsOrderNested.xml",
TRUE). / formatted /
39
NESTED Attribute ProDataSet Data-Relation
OrderLine Records NESTED within Orders
40
READ-XML ( )
Syntax
READ-XML (source-type, file memptr handle
longchar , read-mode, schema-location ,
override-default-mapping , field-type-mapping
, verify-schema-mode )
Example
DEFINE DATASET dsOrder... DATASET
dsOrderREAD-XML (FILE,
dsOrder.xml, / file /
EMPTY, / read-mode /
?, ?).
41
Reading XML Into A ProDataSet
READ-XML ( )
  • Reads XML containing Before-Image information
  • Progress datasetChanges
  • Microsoft Diffgram
  • ProDataSet events DO NOT fire
  • Change tracking is turned OFF

42
WRITE-XMLSCHEMA ( )
Syntax
WRITE-XMLSCHEMA (target-type, file stream
memptr handle longchar , formatted ,
encoding , min-xmlschema )
  • min-xmlschema
  • if TRUE only write standard XML Schema structures
  • if FALSE, add XML Schema extensions from
    prodata namespace
  • Progress-specific information
  • Allows round-trip of Progress definition

43
Progress XML Schema Extensions
MIN-SCHEMA TRUE
XML Schema Extensions
None
Temp-Table UNDO status
Format Label Decimals Case-sensitive Read-only...
Non-unique Indexes
Non-Unique Data-Relations
Standard XML Schema
Dataset DataSet / Table names
Table Table / Field names
Field Name Data Type Extent Initial value
Index Unique Indexes
Relation Unique Data-Relations

MIN-SCHEMA FALSE
44
Progress XML Schema Extensions
prodata namespace
field-level attributes
non-unique index definition
45
XML Schema to ABL Tool
Syntax
xsdto4gl xml-schema-filename -output
output-directory-name filename -element
element-name -overridemapping
-fieldtypemapping field-mapping-file string

.i
.xsd
xsdto4gl
46
In Summary
  • The ProDataSet is key to the future of ABL
    applications
  • Major component of the OpenEdge Reference
    Architecture
  • Were continuing to expand ProDataSet features

47
Relevant Exchange Sessions
  • DEV-9 Using the ProDataSet in OpenEdge 10
  • DEV-15 XML in OpenEdge Past, Present and Future

48
Education / Documentation References
  • Course
  • Using ProDataSets
  • What's New in OpenEdge 10.1 SOA Support
  • Documentation
  • OpenEdge Development ProDataSets
  • OpenEdge Development .Net Open Clients
  • OpenEdge Development Java Open Clients
  • OpenEdge Development Programming Interfaces (XML)

49
Questions?
50
Thank you foryour time
51
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com