Download presentation
Presentation is loading. Please wait.
Published byAmi Rose Modified over 8 years ago
1
MOVE-15: Leveraging Business Entities, Data Access Objects and ProDataSets with a Progress Dynamics® or ADM2 GUI Peter Judge Principal Software Engineer
2
© 2006 Progress Software Corporation2 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Session Goals How to connect an existing ADM2 UI to OpenEdge® Reference Architecture- compliant Business Logic … in a staged, interoperable manner That Dynamics / ADM2 users can easily build OpenEdge RA-compliant applications with minimal effort We’ll see …
3
© 2006 Progress Software Corporation3 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Agenda The ADM2 in the OpenEdge Reference Architecture Introducing the DataView object Using the DataView object This presentation includes annotations with additional complementary information
4
© 2006 Progress Software Corporation4 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Overview Separated presentation and integration layers Data access abstracted from storage Common business logic with advanced models OpenEdge Reference Architecture Presentation Business Services Data Access Data Sources Common Infrastructure Enterprise Services
5
© 2006 Progress Software Corporation5 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Monolithic data provider Presentation Business Services Data Access Data Sources Common Infrastructure Enterprise Services ADM2 & OpenEdge Reference Architecture SmartDataObject Presentation logic Business logic Data access logic ADM2 UI Smart Data Object
6
© 2006 Progress Software Corporation6 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Presentation Business Services Data Access Data Sources Common Infrastructure Enterprise Services Logical view of data Public interface Encapsulates Business Logic Business Entity OpenEdge Reference Architecture Business Entity
7
© 2006 Progress Software Corporation7 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Presentation Business Services Data Access Data Sources Common Infrastructure Enterprise Services Data Access Object OpenEdge Reference Architecture Data Access Object Understands physical model Reads / writes data Supporting logic Maps between physical and logical view
8
© 2006 Progress Software Corporation8 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Presentation Business Services Data Access Data Sources Common Infrastructure Enterprise Services Service Interface OpenEdge Reference Architecture Service Interface Provides bridge between business services and presentation / integration layers
9
© 2006 Progress Software Corporation9 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI The Challenge Keep rich user interface with ADM2 presentation logic Break up the monolith Break out Data Access and Business logic Provide binding between presentation and Business logic through Service Interface Reuse existing Dynamics & ADM2 Code Managers Application code
10
© 2006 Progress Software Corporation10 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Agenda This presentation includes annotations with additional complementary information The ADM2 in the OpenEdge Reference Architecture Introducing the DataView object Using the DataView object
11
© 2006 Progress Software Corporation11 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Presentation Business Services Data Access Data Sources Common Infrastructure Enterprise Services DataView Introducing the new DataView Data View Delivers data to Users Provides data binding for UI ADM2 doesn’t care what’s behind Service Interface
12
© 2006 Progress Software Corporation12 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Presentation Business Services Data Access Data Sources Common Infrastructure Enterprise Services DataView Introducing the new DataView Data View Delivers data to Users Provides data binding for UI ADM2 doesn’t care what’s behind Service Interface Data Access Object Business Entity Service Interface
13
© 2006 Progress Software Corporation13 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Service Interface Introducing the new DataView Service Interface Data container Dataset Temp-table SmartWindow Visual Objects DataView SmartWindow Service Adapter Business EntitiesBusiness TasksBusiness Workflow ADM Dataset Object
14
© 2006 Progress Software Corporation14 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI What is the DataView? Standard SmartObject Select from palette, build in AppBuilder Dynamic and static versions available Use supplied DataView as instance Provides data binding to the UI BusinessEntity, DataTable properties adm2/dyndataview.p
15
© 2006 Progress Software Corporation15 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI ADM2 Class Hierarchy Smart Query DynSDO Data SDO dynsdo.w Previous
16
© 2006 Progress Software Corporation16 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI ADM2 Class Hierarchy Smart DataView Query DynDataView DynSDO Data SDO dyndataview.w dynsdo.w StaticDataView Dataset dyndataset.w
17
© 2006 Progress Software Corporation17 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Comparing DataView & SmartDataObject DataViewSDO Physical data access NoYes Business LogicBusiness Entity, Data Access Object All inside SDO Logical data storage Data normalized, multiple temp-tables Denormalized data, rowObject temp- table, contains meta-data ConnectionDefined by Service Interface Contained in SDO Transaction Scope Defined by service interface One transaction per interaction (commit)
18
© 2006 Progress Software Corporation18 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI What is the Data Container? ADM2 Data Service Manager Manages all ProDataSets in DataViews AppServer call reduction Batching Error handling Caching (future) One instance per session Abstracts the communication with the service interface adm2/datacontainer.p Data container Dataset Temp-table DataView
19
© 2006 Progress Software Corporation19 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI What is the Service Adapter? ADM2’s connection to Service Interface Defined API retrieveData submitData Default is adm2/serviceadapter.p Ships with stubs Implement separately or part of the Service Interface getServiceAdapterName
20
© 2006 Progress Software Corporation20 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI What is the ADM2 Dataset object? It is NOT a Business Entity Extends and wraps ProDataSet object Bridge between normalised data in ProDataSet and string-based ADM2 Library of ProDataSet utilities
21
© 2006 Progress Software Corporation21 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Service Interface proSIGateway.p Data Access Layer Business Servicing Layer Application Flow: Data Retrieval beCustomer.p fetchWhere(…) serviceadapter.p daCustomer.p fetchWhere(…) retrieveData (‘Customer’) proSIServer.p startEntity(‘Customer’) App DB
22
© 2006 Progress Software Corporation22 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Service Interface: startEntity() (Example 1) FUNCTION startEntity RETURNS HANDLE (INPUT pcEntityName AS CHARACTER): /* Run Business Entity and return handle */ DEFINE VARIABLE hEntity AS HANDLE NO-UNDO. DEFINE VARIABLE cEntity AS CHARACTER NO-UNDO. cEntity = SEARCH("entity/be" + pcEntityName + “.p"). IF cEntity NE ? THEN RUN VALUE(cEntity) PERSISTENT SET hEntity NO-ERROR. RETURN hEntity. END FUNCTION.
23
© 2006 Progress Software Corporation23 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Service Interface: startEntity() (Example 2) FUNCTION startEntity RETURNS HANDLE (INPUT pcEntityName AS CHARACTER): /* Run Business Entity and return handle */ cPropertyNames = “RenderingProcedure". RUN getInstanceProperties IN gshRepositoryManager (INPUT pcEntityName, INPUT "", INPUT-OUTPUT cPropertyNames, OUTPUT cPropertyValues ) NO-ERROR. RUN VALUE(cPropertyValues) PERSISTENT SET hEntity NO-ERROR. RETURN hEntity. END FUNCTION.
24
© 2006 Progress Software Corporation24 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Discovering Business Entity Details in the AppBuilder Requires include file for visual objects Contains ProDataSet or temp-table definition Creates, runs dummy DataView on the fly Dynamics uses Temp-DB Import include into Temp-DB Entity Import creates DataFields from fields DataView uses running Business Entity Table names, field lists and other data used
25
© 2006 Progress Software Corporation25 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Demo
26
© 2006 Progress Software Corporation26 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Agenda This presentation includes annotations with additional complementary information The ADM2 in the OpenEdge Reference Architecture Introducing the DataView object Using the DataView object
27
© 2006 Progress Software Corporation27 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI FOR EACH customer: CREATE eCustomer. FOR EACH salesrep OF customer: CREATE eSalesrep. Query concepts: DataView Application DB FOR EACH eCustomer WHERE …. END. FOR EACH eSalesrep WHERE …. END. Business Entity
28
© 2006 Progress Software Corporation28 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI FOR EACH customer: FOR EACH salesrep OF customer: CREATE rowObject. Query concepts: SmartDataObject Application DB FOR EACH rowObject: END. SmartDataObject
29
© 2006 Progress Software Corporation29 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI FOR EACH customer WHERE region = ‘South’: CREATE eCustomer. DataView filtering NumRegion 1South 2 3North 4South 5North 6East 7West 8South 9East 10West Application DB table: customer Business Entity
30
© 2006 Progress Software Corporation30 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI FOR EACH customer WHERE region = ‘South’: CREATE eCustomer. DataView filtering NumRegion 1South 2 3North 4South 5North 6East 7West 8South 9East 10West Application DB table: customer Business Entity
31
© 2006 Progress Software Corporation31 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI DataView filtering NumRegion 1South 2 4 8 Business Entity FOR EACH eCustomer WHERE Num <= 5: DataView 1 Num Region ------ -------- 1 South 2 South 4 South
32
© 2006 Progress Software Corporation32 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Query API simplified by removing physical references assignQuerySelection removeQuerySelection resetQuerySelection getQueryString Sorting also simplified [get|set]QuerySort resortQuery Applies to SmartDataObject too Refactored Query API
33
© 2006 Progress Software Corporation33 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Methods that expose the physical storage fetchRowIdent, rowidWhere [add|set]QueryString Server-side transaction logic methods Business logic hooks Properties that expose physical storage AssignList, BaseQuery, QueryWhere Properties that define service-only or server- side behavior Unsupported in the DataView
34
© 2006 Progress Software Corporation34 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI 1)Populate Retrieve data from data store Queries are important 2)Operate Create, modify, delete data 3)Submit Save changes to data store Record keys important Business Logic and Validation Three discrete stages of operation
35
© 2006 Progress Software Corporation35 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Occurs in the Data Access Layer Access to physical data 4GL callbacks on ProDataSet and buffer objects BEFORE-FILL AFTER-FILL BEFORE-ROW-FILL (buffer only) AFTER-ROW-FILL (buffer only) Implemented in SDO as Maybe code in openQuery, initializeObject Calculated fields Populate Business logic hooks
36
© 2006 Progress Software Corporation36 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Occurs in the Business Entity Access to logical data structures only 4GL callbacks on buffer objects ROW-CREATE ROW-DELETE ROW-UPDATE Implemented in SDO as rowObjectValidate, Validate, modifyNewRecord Calculated Fields Operate Business logic hooks
37
© 2006 Progress Software Corporation37 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Occurs in the Data Access Layer Access to physical data No 4GL callbacks on ProDataSet or buffer objects Implemented in SDO as *TransactionValidate Submit Business logic hooks
38
© 2006 Progress Software Corporation38 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Data Access Object Business Entity Migrating SDO Business Logic: Populate SDO openQuery initializeObject DATA.CALCULATE [DataSet]BeforeFill [Buffer]BeforeFill [Buffer]BeforeRowFill [Buffer]AfterRowFill [Buffer]AfterFill [DataSet]AfterFill
39
© 2006 Progress Software Corporation39 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Data Access Object Business Entity Migrating SDO Business Logic: Operate & Submit SDO rowObjectValidate WritePreTransVal WriteBeginTransVal WriteEndTransVal WritePostTransVal [Buffer]RowCreate [Buffer]RowUpdate [Buffer]RowDelete [Table] WriteBeginTrans [Table] WriteEndTrans [DataSet]PreTrans [DataSet]PostTrans [Table]WritePreTrans [Table]WritePostTrans DATA.CALCULATE
40
© 2006 Progress Software Corporation40 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI API for support in ADM2 Passed to Service Interface as context RowsToBatch and RebuildOnReposition supported Implemented in the data access layer support/daSupport.p in our example Batching
41
© 2006 Progress Software Corporation41 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Demo
42
© 2006 Progress Software Corporation42 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI In Summary You can easily take advantage of your OpenEdge RA Business Logic in your Dynamics/ADM2 application You don’t have to: it’s entirely optional DataViews and SDO can co-exist in a session
43
© 2006 Progress Software Corporation43 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI For More Information, go to… PSDN OpenEdge Reference Architecture (incl. implementation) Getting Started with DataViews White Paper ADM2 with OpenEdge RA White Paper DataView Sample Code
44
© 2006 Progress Software Corporation44 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Relevant Exchange Sessions ARCH-4: Context Management in the OpenEdge Reference Architecture ARCH-5: Service Interfaces in Practice ARCH-9: Implementing the OpenEdge Reference Architecture with OpenEdge 10.1
45
© 2006 Progress Software Corporation45 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Education / Documentation References Course Using ProDataSets
46
© 2006 Progress Software Corporation46 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Questions?
47
© 2006 Progress Software Corporation47 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI Thank you for your time
48
© 2006 Progress Software Corporation48 MOVE-15: Leveraging Business Entities in Dynamics or ADM2 GUI
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.