1 / 51

DEV-11: Leveraging ProDataSets in an Open Environment

DEV-11: Leveraging ProDataSets in an Open Environment. Robin Brown. Principal Software Engineer. Progress ® DataSets. Progress DataSet. Header Data. Detail Data. Table. 1. 6. 01/05/1993. 2. 36. 01/19/1993. 3. 79. 02/10/1993. Business “Objects”

peta
Download Presentation

DEV-11: Leveraging ProDataSets in an Open Environment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DEV-11: Leveraging ProDataSets in an Open Environment Robin Brown Principal Software Engineer

  2. Progress® DataSets Progress DataSet HeaderData DetailData Table 1 6 01/05/1993 2 36 01/19/1993 3 79 02/10/1993 • Business “Objects” • Logical grouping of related data • In-memory cache of data • Data source separate from DataSet • Data abstraction DEV-11 ProDataSets in an Open Environment

  3. ProDataSets in the OpenEdge® Reference Architecture NEW! Enterprise Services Presentation Java™ Open Client Java SDO Business Services Common Infrastructure Data Access Data Sources ABL Client Progress® ProDataSet™ .NET™ Open Client ADO.NET DataSet AppServer™ ABL Progress® ProDataSet™ DEV-11 ProDataSets in an Open Environment

  4. ProDataSets in the OpenEdge Reference Architecture Enterprise Services Presentation Business Services Common Infrastructure Data Access ABL READ-XML ( ) WRITE-XML( ) Progress DataSet Data Sources NEW! AppServer™ ABL Progress DataSet ABL to Database Progress DataSet (XML) DEV-11 ProDataSets in an Open Environment

  5. ProDataSets in the OpenEdge Reference Architecture Enterprise Services Presentation Business Services Common Infrastructure Data Access Data Sources .NET™ Open Client ADO.NET DataSet This Session’s Focus Java™ Open Client Java SDO ABL READ-XML ( ) WRITE-XML( ) Progress DataSet DEV-11 ProDataSets in an Open Environment

  6. Agenda • Overview of ProDataSet and OpenClient • .NET OpenClient / DataSet • Java OpenClient / SDO • ProDataSets to/from XML DEV-11 ProDataSets in an Open Environment

  7. Progress DataSets Defined ProDataSet • 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 Temp-Table Fields Indexes Temp-Table Fields Data-Relations Indexes Temp-Table Fields DEV-11 ProDataSets in an Open Environment

  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 DEV-11 ProDataSets in an Open Environment

  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 DEV-11 ProDataSets in an Open Environment

  10. Open Client Architecture Broker App Server ABL .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 DEV-11 ProDataSets in an Open Environment

  11. Agenda • Overview of ProDataSet and OpenClient • .NET OpenClient / DataSet • Java OpenClient / SDO • ProDataSets to/from XML DEV-11 ProDataSets in an Open Environment

  12. One or more DataTables DataColumns define fields DataConstraints define integrity rules Relationships defined between tables Map fields between tables Share many features of ProDataSet ADO.NET DataSets Defined ADO.NET DataSet DataTable DataColumns DataConstraint DataTable DataRelations DataColumns DataConstraint DataTable DataColumns DEV-11 ProDataSets in an Open Environment

  13. Mapping ProDataSets to .Net DataSets DEV-11 ProDataSets in an Open Environment

  14. INITIAL Value XML attributes UNDO DATA-SOURCE-MODIFIED REJECTED 10.1A Completes the ABL-.Net Mapping NEW! DEV-11 ProDataSets in an Open Environment

  15. Using ProDataSets in a .NET Open Client environment AppServer .Net Client 4GL Business Logic .Net User Interface Progress DataSet ADO .Net DataSet DataSets on both ends of the wire DEV-11 ProDataSets in an Open Environment

  16. Passing DataSets in .Net StaticversusDynamic Progress AppServer .NET Client Static .Net Typed DataSet Static DataSet Data Only Dynamic Schema & Data ADO .Net DataSet Dynamic DataSet DEV-11 ProDataSets in an Open Environment

  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 srcOrd:FILL-WHERE-STRING = “WHERE Order.OrderNum GE ” + STRING(piGE) + “AND Order.OrderNum LE ” + STRING(piLE). /* Fill the dsOrder DataSet */ DATASET dsOrder:FILL(). 1 2 3 DEV-11 ProDataSets in an Open Environment

  18. Method using Static .Net DataSet .NET C# code using nsOrderDS.StrongTypesNS; dsOrderDataSet dsOrders; try { appObj.StaticDS (iLowRange, iHighRange, out dsOrders); ... 1 2 DEV-11 ProDataSets in an Open Environment

  19. Agenda • Overview of ProDataSet and OpenClient • .NET OpenClient / DataSet • Java OpenClient / SDO • ProDataSets to/from XML DEV-11 ProDataSets in an Open Environment

  20. Overview Java Service Data Objects (SDO) Java Specification Request (JSR) 235 • Technical description of Java SDO’s published by BEA and IBM • Java SDO Technology (JSR 235) • http://jcp.org/en/jsr/detail?id=235 • Reference Implementation • Eclipse Modeling Framework (EMF 2.0.1) • http://www.eclipse.org/emf/sdo.php DEV-11 ProDataSets in an Open Environment

  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 DEV-11 ProDataSets in an Open Environment

  22. Java SDO Objects (cont’d) • ChangeSummary • Captures changes from all DataObjects in a DataGraph • Applied back to data source using Data Mediator Service • Data Mediator ServiceNOT needed • Data sent to/from the OpenEdge AppServer DEV-11 ProDataSets in an Open Environment

  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 DEV-11 ProDataSets in an Open Environment

  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 DEV-11 ProDataSets in an Open Environment

  25. Mapping ProDataSets to Java SDOs DEV-11 ProDataSets in an Open Environment

  26. Passing DataSet Parameters in Java ProDataGraph ProDataGraph Same for Static AND Dynamic OUTPUT INPUT-OUTPUT INPUT ProDataGraphHolder DEV-11 ProDataSets in an Open Environment

  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 srcOrd:FILL-WHERE-STRING = “WHERE Order.OrderNum GE ” + STRING(piGE) + “AND Order.OrderNum LE ” + STRING(piLE). /* Fill the dsOrder DataSet */ DATASET dsOrder:FILL(). DEV-11 ProDataSets in an Open Environment

  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 DEV-11 ProDataSets in an Open Environment

  29. Updating a DataSet • ProChangeSummary object tracks changes • Works similar to ProDataSet • Tracks modified, added, deleted rows • Keeps track of original versions DEV-11 ProDataSets in an Open Environment

  30. Demo DEV-11 ProDataSets in an Open Environment

  31. Temp-Table Parameters Cannot mix ProDataGraph and java.sql.ResultSet DEV-11 ProDataSets in an Open Environment

  32. New .jar files for CLASSPATH Location: <install-dir>/java/ext/ • SDO jar files • common.jar • commonj.sdo.jar • ecore.jar • ecore.change.jar • ecore.resources.jar • ecore.sdo.jar • ecore.xml.jar DEV-11 ProDataSets in an Open Environment

  33. Agenda • Overview of ProDataSet and OpenClient • .NET OpenClient / DataSet • Java OpenClient / SDO • ProDataSets to/from XML DEV-11 ProDataSets in an Open Environment

  34. ProDataSets in the OpenEdge Reference Architecture Enterprise Services Presentation Business Services Common Infrastructure Data Access Data Sources NEW! ABL READ-XML ( ) WRITE-XML( ) Progress DataSet (XML) DEV-11 ProDataSets in an Open Environment

  35. WRITE-XML WRITE-XMLSCHEMA READ-XML READ-XMLSCHEMA Methods apply to ProDataSet Temp-Table Temp-Table Buffer New Methods Added ProDataSet .xsd .xml DEV-11 ProDataSets in an Open Environment

  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 dsOrder:WRITE-XML ("FILE", “dsOrder.xml", TRUE). /* formatted */ DEV-11 ProDataSets in an Open Environment

  37. ProDataSet XML Example ‘Order’ Row ‘OrderLine’ Row DEV-11 ProDataSets in an Open Environment

  38. NESTED Attribute ProDataSetData-Relation Example DEFINE DATASET dsOrder FOR eOrder,eOrderLine DATA-RELATION OrderLine FOR eOrder,eOrderLine RELATION-FIELDS (OrderNum,OrderNum) NESTED. /* attach datasources and FILL */ DATASET dsOrder:WRITE-XML ("FILE", “dsOrderNested.xml", TRUE). /* formatted */ DEV-11 ProDataSets in an Open Environment

  39. NESTED Attribute ProDataSetData-Relation OrderLine Records NESTED within Orders DEV-11 ProDataSets in an Open Environment

  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 dsOrder:READ-XML (“FILE”, “dsOrder.xml”, /* file */ “EMPTY”, /* read-mode */ ?, ?). DEV-11 ProDataSets in an Open Environment

  41. Reading XML Into A ProDataSet READ-XML ( ) • Reads XML containing Before-Image information • Progress “datasetChanges” • Microsoft “Diffgram” • ProDataSet eventsDO NOT fire • Change tracking is turned OFF DEV-11 ProDataSets in an Open Environment

  42. WRITE-XMLSCHEMA ( ) Syntax • 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 WRITE-XMLSCHEMA (target-type, {file | stream | memptr | handle | longchar} [, formatted [, encoding [, min-xmlschema ]]]) DEV-11 ProDataSets in an Open Environment

  43. Progress XML Schema Extensions MIN-SCHEMA = TRUE + MIN-SCHEMA = FALSE DEV-11 ProDataSets in an Open Environment

  44. Progress XML Schema Extensions “prodata” namespace field-level attributes non-unique index definition DEV-11 ProDataSets in an Open Environment

  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 DEV-11 ProDataSets in an Open Environment

  46. In Summary EnterpriseServices Presentation Business Services CommonInfrastructure Data Access DataSources • The ProDataSet is key to the future of ABL applications • Major component of the OpenEdge Reference Architecture • We’re continuing to expand ProDataSet features DEV-11 ProDataSets in an Open Environment

  47. Relevant Exchange Sessions • DEV-9: Using the ProDataSet in OpenEdge 10 • DEV-15: XML in OpenEdge Past, Present and Future DEV-11 ProDataSets in an Open Environment

  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) DEV-11 ProDataSets in an Open Environment

  49. Questions? DEV-11 ProDataSets in an Open Environment

  50. Thank you foryour time DEV-11 ProDataSets in an Open Environment

More Related