DEV-5: Using ProDataSets™ in OpenEdge ® 10 Cheryl LaBarge Product Readiness.

Slides:



Advertisements
Similar presentations
17. Data Access ADO.Net Architecture New Features of ADO.NET
Advertisements

Server Access The REST of the Story David Cleary
DEV-13: You've Got a Problem, Here’s How to Find It
Inside the JSDO: Mobile and Web
Chapter 12: Using ADO.NET 2.0 Programming with Microsoft Visual Basic 2005, Third Edition.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Exchange in Real Time DEV-06: The ProDataSet in OpenEdge™ 10 John Sadd Progress Fellow and OpenEdge Evangelist.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
DEV-14: Understanding and Programming for the AppServer™
Performance testing of Progress Appservers and a plug-in for Jmeter
Database Updates Made Easy In WebFocus Using SQL And HTML Painter Sept 2011 Lender Processing Services 1.
Web Development Challenges and How They are Solved in ps:eScript Matt Verrinder Progress Software UK Internet & Integration Technologies.
ARCH12: QA Considerations - OERA ARCH-12: QA considerations for applications following the OpenEdge Reference Architecture SMAT-Team Tobago Thomas Hutegger.
DEV-16: ABL Database Objects Updated David Olson Director, Enterprise Solutions Mary Szekely Just Mary.
Module 3: Table Selection
JavaScript & jQuery the missing manual Chapter 11
DEV-07: Increasing Productivity with Tools for Business Logic Gikas Principal Software Engineer.
Databases and LINQ Visual Basic 2010 How to Program 1.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Miscellaneous Excel Combining Excel and Access. – Importing, exporting and linking Parsing and manipulating data. 1.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Twelve Access Databases and LINQ.
ARCH-03: Implementing the OpenEdge™ Reference Architecture – Part 1 John Sadd Progress Fellow and OpenEdge Evangelist.
White Star Software Exchange 2005 – DEV-15 DEV-15 All Dynamic Applications John Campbell White Star Software.
DEV-5: Introduction to WebSpeed ® Stephen Ferguson Sr. Training Program Manager.
Going Mobile with OpenEdge ® Basics Paul Guggenheim Paul Guggenheim & Associates.
Introduction to Database Development Using Borland Data Providers 2128 Martin Rudy.
The ProDataSet in OpenEdge™ 10
ARCH-3: Context Management in the OpenEdge® Reference Architecture John Sadd Engineering Fellow and OpenEdge Evangelist.
ARCH-4: The Presentation Layer in the OpenEdge® Reference Architecture Frank Beusenberg Senior Technical Consultant.
Siebel 8.0 Module 5: EIM Processing Integrating Siebel Applications.
MOVE10: Darwin or Big Bang? 1 MOVE-10: Darwin or Big Bang? SMAT-Team Tobago Thomas Hutegger & Pheona Job
DEV-01 What’s New in Progress Dynamics ® Anthony Swindells Progress Fellow.
SOA-26: Extending Your Application with OpenEdge ® Web Services John Sadd OpenEdge Evangelist.
MANAGING DATA RESOURCES ~ pertemuan 7 ~ Oleh: Ir. Abdul Hayat, MTI.
Chapter Thirteen Working with Access Databases and LINQ Programming with Microsoft Visual Basic th Edition.
ARCH-07: Implementing the OpenEdge™ Reference Architecture – Part 2
ARCH-7: A Class-Based Implementation of the OpenEdge® Reference Architecture John Sadd Fellow and OpenEdge Evangelist Applied Technology.
ARCH-11: Building your Presentation with Classes John Sadd Fellow and OpenEdge Evangelist Sasha Kraljevic Principal TSE.
DEV-3: Getting Started with OpenEdge® Architect – Part II David Lund Sr. Training Program Manager Mark Hanley Sr. Manager Development Tools.
A16: proDataSets in the Real World aka blood, sweat and tears revisited Miles Klettke Clever Fellow.
INT-9: Implementing ESB Processes with OpenEdge ® and Sonic ™ David Cleary Principal Software Engineer.
DEV-6: Advanced Object-Oriented Programming in the ABL Evan Bleicher Senior Development Manager Shelley Chase
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 25 I’m Suffering from Information Overload.
Chapter 24 I’m Suffering from Information Overload (Access Databases) Clearly Visual Basic: Programming with Visual Basic nd Edition.
A7: Architecting Your Application in OpenEdge ® 10 Mike Ormerod Applied Architect.
NSF DUE ; Wen M. Andrews J. Sargeant Reynolds Community College Richmond, Virginia.
ARCH-7: Integrate this! SonicMQ® and the OpenEdge® Reference Architecture Christian Stiller Technical Architect.
ARCH-5: Service Interfaces in Practice Christian Stiller Technical Architect.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
MOVE-15: Leveraging Business Entities, Data Access Objects and ProDataSets with a Progress Dynamics® or ADM2 GUI Peter Judge Principal Software Engineer.
DEV-9: Using the ProDataSet™ in OpenEdge® 10
Programming with Microsoft Visual Basic 2012 Chapter 14: Access Databases and SQL.
- The PUG Challenge - Brynjar Hasle, Chemistry as Geir O. Olsen, THInc Consulting as.
DEV-21: Embracing OpenEdge ® Architect Sunil S Belgaonkar Software Architect.
Visual Basic 2010 How to Program
DEV-25: You've Got a Problem, Here’s How to Find It
Data Virtualization Tutorial: XSLT and Streaming Transformations
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
COMP-10: Managing OpenEdge® Development with the Roundtable® TSMS
MANAGING DATA RESOURCES
ARCH-1: Application Architecture made Simple
– JukeBox – transparency, flexibility, speed and comfort!
DEV-11: Architecting Your Application in OpenEdge® 10
ARCH-2: OpenEdge Reference Architecture (OERA) Latest Thinking
ARCH-14: Power Your Organisation with OpenEdge
Presentation transcript:

DEV-5: Using ProDataSets™ in OpenEdge ® 10 Cheryl LaBarge Product Readiness

© 2007 Progress Software Corporation 2 DEV-5: Using ProDataSets™ in OpenEdge® 10 Agenda  Evolution of data access  Reasons to use ProDataSets  Sharing data easily with the outside world  Where to go next ProDataSets

© 2007 Progress Software Corporation 3 DEV-5: Using ProDataSets™ in OpenEdge® 10 ProDataSet Evolution of Data Access.db Work File Temp- Tables.dbi Temp- Tables Host Centric Web SOA & Beyond Client Server Temp- Tables ProDataSet Temp- Tables XML.NET Flexibility Combining the best of the past to meet the demands of the future Java SDO

© 2007 Progress Software Corporation 4 DEV-5: Using ProDataSets™ in OpenEdge® 10 Agenda  Evolution of data access  Reasons to use ProDataSets  Sharing data easily with the outside world  Where to go next ProDataSets

© 2007 Progress Software Corporation 5 DEV-5: Using ProDataSets™ in OpenEdge® 10 Reasons to Use ProDataSets  Strength of temporary tables  Flexibility to group data for business needs  Straight forward methods and events  Data caching  Batching Complex multi–level data structures as a single entity

© 2007 Progress Software Corporation 6 DEV-5: Using ProDataSets™ in OpenEdge® 10 The Strength of the Temporary Table Based on the familiar temporary table Outline view Color code text

© 2007 Progress Software Corporation 7 DEV-5: Using ProDataSets™ in OpenEdge® 10 Temporary Tables Available for Use in UI AppBuilder perspective uses temp-tables for building a browse

© 2007 Progress Software Corporation 8 DEV-5: Using ProDataSets™ in OpenEdge® 10 Reasons to Use ProDataSets  Strength of temporary tables  Flexibility to group data for business needs  Straight forward methods and events  Data caching  Batching Complex multi–level data structures as a single entity

© 2007 Progress Software Corporation 9 DEV-5: Using ProDataSets™ in OpenEdge® 10 Flexibility to Group Data for Business Needs  The DATA-RELATION (OrderLine) defines the relationship between parent-child tables  The RELATION-FIELDS (OrderNum, OrderNum) define fields in parent and child to use for selection Defaults for –Populating –Navigating

© 2007 Progress Software Corporation 10 DEV-5: Using ProDataSets™ in OpenEdge® 10 Data-Sources Easy to Use  The Data-Source is a separate object from the ProDataSet One for each temp-table buffer Can define database buffers or a query or both XML methods allow easy loading of data from external sources

© 2007 Progress Software Corporation 11 DEV-5: Using ProDataSets™ in OpenEdge® 10 Relating the ProDataSet Using relation fields to define foreign keys Related Order lines

© 2007 Progress Software Corporation 12 DEV-5: Using ProDataSets™ in OpenEdge® 10 Data-Sources Provide Data Flexibility  Data-Source can flatten a triple join into a single table Related Order lines The Data-Source can be more complex

© 2007 Progress Software Corporation 13 DEV-5: Using ProDataSets™ in OpenEdge® 10 Ability to Modify the Query  Because they are based on temp-tables it is easy to use familiar QUERY-PREPARE to select necessary records Top level ONLY! Child fills based on data source and relation

© 2007 Progress Software Corporation 14 DEV-5: Using ProDataSets™ in OpenEdge® 10 Reasons to Use ProDataSets  Strength of temporary tables  Flexibility to group data for business needs  Straight forward methods and events  Data caching  Batching Complex multi–level data structures as a single entity

© 2007 Progress Software Corporation 15 DEV-5: Using ProDataSets™ in OpenEdge® 10 Filling a ProDataSet  Populate the ProDataSet from the Data-Sources  FILL on the DataSet Fills every table starting with top-level buffers  FILL on a buffer Fills that table and its descendents  FILL-MODE on each buffer NO-FILL – skip this table EMPTY – empty the table first APPEND – add more records to the table MERGE – add records & eliminate duplicates REPLACE – replace existing records Straight forward FILL method

© 2007 Progress Software Corporation 16 DEV-5: Using ProDataSets™ in OpenEdge® 10 Populating with Data-Relations  When a DataSet is populated, OpenEdge retrieves children of the current parent ProDataSet Data-Relation ttOrder 6102/09/ /09/ /09/06 ttOLine Order Data-Source OrderLine Data-Source Application Database Navigate.w

© 2007 Progress Software Corporation 17 DEV-5: Using ProDataSets™ in OpenEdge® 10 Event Callback Procedures  You can define event procedures for: Before and After FILL of the ProDataSet Before and After FILL of any temp-table buffer Before and After FILL of any record  Use ProDataSet events to prepare queries, attach Data-Sources, etc.  Use Buffer events to manipulate the table  Use Record events to populate calculated fields  You can use these events when there is no Data-Source at all

© 2007 Progress Software Corporation 18 DEV-5: Using ProDataSets™ in OpenEdge® 10 Setting Callback Events Advantage over.NET dataset is the buffer storing current record context (ttOrder)

© 2007 Progress Software Corporation 19 DEV-5: Using ProDataSets™ in OpenEdge® 10 Navigating 1.Browse functionality2.Query syntax 1 2 dsOrderWinUp.w

© 2007 Progress Software Corporation 20 DEV-5: Using ProDataSets™ in OpenEdge® 10 Updating Through the ProDataSet  ProDataSet tables can have a companion before-image temp-table to record updates (add/change/delete) Used to pass changes to the server to be made in the Data-Source and error messages to the client Maps to.NET and Java support for update versions Defining a BEFORE-TABLE

© 2007 Progress Software Corporation 21 DEV-5: Using ProDataSets™ in OpenEdge® 10 Before-Image Table for a DataSet dsOrderWinUp.w - Original record Values for order # 6 Delete Lines 2, 4, & 5 Modify Line 1 to have 60 Add 60 Fishing Lures (Item 44) Add 30 Fishing Poles (Item 13)

© 2007 Progress Software Corporation 22 DEV-5: Using ProDataSets™ in OpenEdge® 10 Before-Image Table for a DataSet  Select ROW-DELETED ROW-MODIFIED ROW-CREATED ProDataSet/dsCompareTables.w

© 2007 Progress Software Corporation 23 DEV-5: Using ProDataSets™ in OpenEdge® 10 Saving Changes to the Database  SAVE-ROW-CHANGES method for saving a row to the database Uses the before-table for optimistic locking Allows full control in the event of a conflict  ERROR, ERROR-STRING, REJECTED, DATA-SOURCE-MODIFIED attributes

© 2007 Progress Software Corporation 24 DEV-5: Using ProDataSets™ in OpenEdge® 10 ProDataSet Demo…

© 2007 Progress Software Corporation 25 DEV-5: Using ProDataSets™ in OpenEdge® 10 Reasons to Use ProDataSets  Strength of temporary tables  Flexibility to group data for business needs  Straight forward methods and events  Data caching  Batching Complex multi–level data structures as a single entity

© 2007 Progress Software Corporation 26 DEV-5: Using ProDataSets™ in OpenEdge® 10 Data Caching  DATASET – static reference like TABLE  DATASET-HANDLE – dynamic reference to the DataSet and its definition, like TABLE- HANDLE – passes a simple DataSet handle to a local procedure  Note! By default the DATASET and DATASET- HANDLE parameters copy the ProDataSet contents (deep copy) Passing a ProDataSet as a Parameter

© 2007 Progress Software Corporation 27 DEV-5: Using ProDataSets™ in OpenEdge® 10 Passing a ProDataSet BY-REFERENCE: Local to a Single Session

© 2007 Progress Software Corporation 28 DEV-5: Using ProDataSets™ in OpenEdge® 10 Remote DataSet Parameter BY-REFERENCE ProDataSet Temp- Tables ProDataSet Temp- Tables Deep Copy BY-REFERENCE is ignored, always a deep copy

© 2007 Progress Software Corporation 29 DEV-5: Using ProDataSets™ in OpenEdge® 10 ProDataSet Illustration of BY-REFERENCE Local Call DEFINE DATASET dsRef… DEFINE DATASET dsOrder REFERENCE-ONLY. RUN FillWithWHERE IN hOrderMain (INPUT icWhere, OUTPUT DATASET dsRef BY- REFERENCE). PROCEDURE FillWithWhere: DEFINE INPUT icWhere AS CHARACTER NO-UNDO. DEFINE OUTPUT PARAMETER FOR DATASET dsOrder. dsOrder:FILL(). END PROCEDURE. dsOrder:FILL().  Always the caller’s instance used  Called procedure instantiates a ProDataSet that is never used  References are redirected for the duration of that procedure call only Please note example was coded without this option Order Olines Unused ProDataSet Order Olines

© 2007 Progress Software Corporation 30 DEV-5: Using ProDataSets™ in OpenEdge® 10 Options for Parameters Local Call: For Data Caching Define DATASET dsPrices REFERENCE- ONLY… Define DATASET dsRef… RUN fetchData IN hProc2. DISPLAY. PROCEDURE fetchData: dsRef:FILL(). PROCEDURE bindData: DEFINE OUTPUT PARAMETER FOR DATASET dsRef BIND. END PROCEDURE. ItemSelection.p PriceListDataCache.p RUN bindData IN hProc2 (OUTPUT DATASET dsPrices BIND)  ProDataSet – or temp-table – on one side of the call is defined REFERENCE-ONLY  Use the BIND option on both sides of a single procedure call  No need to pass the ProDataSet again! Unused ProDataSet Pricelist ProDataSet Pricelist

© 2007 Progress Software Corporation 31 DEV-5: Using ProDataSets™ in OpenEdge® 10 Summary of BY-REFERENCE and BIND  BY-REFERENCE To use the caller’s ProDataSet instance in the called procedure  REFERENCE-ONLY For the unused instance  BIND To identify called or caller procedure’s instance to use Useful for data caching and separation of data management from user interface

© 2007 Progress Software Corporation 32 DEV-5: Using ProDataSets™ in OpenEdge® 10 Reasons to Use ProDataSets  Strength of temporary tables  Flexibility to group data for business needs  Straight forward methods and events  Data caching  Batching Complex multi–level data structures as a single entity

© 2007 Progress Software Corporation 33 DEV-5: Using ProDataSets™ in OpenEdge® 10 Batching in a Distributed Stateless Environment QUERY CustBrowse PROCEDURE offEnd: PROCEDURE fetchCustomers: RUN fetchWhere ON hAppServer (OUTPUT DATASET dsCustomer) Procedure fetchWhere: DATASET dsCustomer:FILL() Database AppServer BATCH-SIZE LAST-BATCH NEXT-ROWID RESTART-ROWID OFF-END event Client APPEND) dsCustomer eCustomer dsCustomer eCustomer

© 2007 Progress Software Corporation 34 DEV-5: Using ProDataSets™ in OpenEdge® 10 ProDataSet Events to Support Data Batching  The goal is to make data retrieval with batching transparent  OFF-END event for a ProDataSet query Occurs when a query goes off the end Occurs before Browse:OFF-END Occurs before Query:QUERY-OFF-END  FIND-FAILED for a FIND on a buffer Use to respond to individual missing rows

© 2007 Progress Software Corporation 35 DEV-5: Using ProDataSets™ in OpenEdge® 10 Sample Code for Batching  Set up an event handler for OFF-END QUERY CustBrowse:SET-CALLBACK(“OFF-END”, “OffEnd”).  Define the event handler PROCEDURE OffEnd: DEFINE INPUT PARAMETER DATASET FOR dsCustomer. IF NOT BUFFER eCustomer:LAST-BATCH THEN DO: RUN fetchCustomers. RETURN NO-APPLY. /* Cancel OFF-END */ END. END PROCEDURE.

© 2007 Progress Software Corporation 36 DEV-5: Using ProDataSets™ in OpenEdge® 10 Requesting a Batch from the Server  Make the request RUN fetchWhere ON hServer (INPUT “Customer”, INPUT iBatchSize, INPUT-OUTPUT rRestartRowid, INPUT cWhereString, OUTPUT DATASET dsCustomer APPEND).  Handle the request for data on the server hCustBuffer:BATCH-SIZE = iBatchSize. hDataSource:RESTART-ROWID(1) = rRestartRowid. hCustQuery:QUERY-PREPARE(“FOR EACH Customer WHERE “ + cWhereString). DATASET dsCustomer:FILL(). IF hCustBuffer:LAST-BATCH = NO THEN rRestartRowid = hDataSource:NEXT-ROWID(1).

© 2007 Progress Software Corporation 37 DEV-5: Using ProDataSets™ in OpenEdge® 10 Agenda  Evolution of data access  Reasons to use ProDataSets  Sharing data easily with the outside world  Where to go next ProDataSets

© 2007 Progress Software Corporation 38 DEV-5: Using ProDataSets™ in OpenEdge® 10 Converting Between XML and ProDataSets  Exporting the entire ProDataSet to XML WRITE-XML – creates XML stream from data WRITE-XMLSCHEMA – creates XML Schema information based on the data definition READ-XML – takes XML source and loads it into a ProDataSet –It can create the ProDataSet definition after a CREATE DATASET statement READ-XMLSCHEMA – creates or verifies XML Schema information

© 2007 Progress Software Corporation 39 DEV-5: Using ProDataSets™ in OpenEdge® 10 Ability to Add External Data Pulling in third party items from XML based documents

© 2007 Progress Software Corporation 40 DEV-5: Using ProDataSets™ in OpenEdge® 10 Agenda  Evolution of data access  Reasons to use ProDataSets  Sharing data easily with the outside world  Where to go next ProDataSets

© 2007 Progress Software Corporation 41 DEV-5: Using ProDataSets™ in OpenEdge® 10 Relevant Exchange Sessions DayTimeSessionTitle Wed.8:00 - 9:30 AM DEV-14Using ProDataSets and WebClient for Robust B2B Applications Wed.10: :00 AM DEV-15Building a resilient Retail System using WebClient, SonicMQ, and ProDataSets Wed.10: :00 AM DEV-16ABL Database Objects Updated Wed.3:30-5INT-12Mastering ProDataSets and Native XML Datatypes with Sonic ESB

© 2007 Progress Software Corporation 42 DEV-5: Using ProDataSets™ in OpenEdge® 10 For More Information, Go to…  PSDN AutoEdge Application Application Architecture Made Simple  Progress eLearning Community: Using ProDataSets  Documentation: 10.1B ProDataSet Manual, by John Sadd

© 2007 Progress Software Corporation 43 DEV-5: Using ProDataSets™ in OpenEdge® 10 In Summary  Leverages what you know  Flexible and easy to use  Allows applications to combine data more effectively to meet business needs

© 2007 Progress Software Corporation 44 DEV-5: Using ProDataSets™ in OpenEdge® 10 Questions?

© 2007 Progress Software Corporation 45 DEV-5: Using ProDataSets™ in OpenEdge® 10 Thank you for your time

© 2007 Progress Software Corporation 46 DEV-5: Using ProDataSets™ in OpenEdge® 10