Presentation is loading. Please wait.

Presentation is loading. Please wait.

ARCH-07: Implementing the OpenEdge™ Reference Architecture – Part 2

Similar presentations


Presentation on theme: "ARCH-07: Implementing the OpenEdge™ Reference Architecture – Part 2"— Presentation transcript:

1 ARCH-07: Implementing the OpenEdge™ Reference Architecture – Part 2
John Sadd Progress Fellow and OpenEdge Evangelist

2 Modern Application Architecture
OpenEdge Reference Architecture – a layered view Separated presentation and integration layers Users Enterprise Services Presentation Layer Integration Layer Common business logic with advanced models Business Servicing Layer Data access abstracted from storage Data Access Layer Managed Data Stores Unmanaged Data Stores

3 Agenda Introducing the Service Interface Layer
Managing ProDataSet Instances Context Management Creating a WebSpeed® User Interface Additional Topics and Futures Conclusions

4 SOA – Service Interaction Model
Bind Invoke Service Requestor Provider Broker/ Directory Find / Details Publish Enterprise Services Bus Task

5 Container-managed Support Services
Security Transaction Control Session/Context Management Client Side Fn() Presentation Container Service Proxy Service Interface Service Container Order Mgmt Server Side

6 The Service Interface Layer in the Architecture
Users Enterprise Services Presentation Layer Integration Layer Service Interface Business Servicing Layer Data Access Layer Managed Data Stores Unmanaged Data Stores

7 Role of the Sample Service Interface Layer
Manages server-side entities Keeps an in-memory catalog of running instances Provides standard one-call access to server-side procedures Provides a single simplified API from client to server

8 The Service Interface Layer
Client Server UI Procedure Business Entity Data-Access Object DATASET dsOrder DATASET dsOrder DATASET dsOrder RUN fetchOrder IN hdsOrder (. . . , OUTPUT DATASET dsOrder BY-REFERENCE) RUN FetchWhere IN hEntity (. . ., OUTPUT DATASET phFetchDataSet BY-REFERENCE) fetchWhere: FILL ATTACH Client Proxy Server Gateway Service Interface

9 (call to server-side gateway)
Client-side SI Proxy Client proxy procedure User interface procedure proSIproxy.p PROC fetchWhere: RUN proSIgateway.p ON hAppServer (INPUT “Order”, INPUT “fetchWhere”…) dsOrderWinAdv.w {dsOrder.i} {proSIproxyStart.i} RUN fetchWhere IN ghProxySIproc (INPUT “Order”, INPUT ttContextDSOrder, OUTPUT DataSet dsOrder). (call to server-side gateway)

10 Server-side SI Procedures
(call from client session) Server service procedure Server gateway procedure proSIserver.p DEFINE T-T ttEntity… FN startEntity: FN getEntityHandle: /* entity temp-table lookup */ FN getDAOHandle: proSIgateway.p hEntity = getEntityHandle in hSI. RUN fetchWhere in hEntity (call to Business Entity API)

11 Gateway Procedure API Five standard parameters
Logical entity name Logical operation name Context/parameter temp-table for passing any related values back and forth OUTPUT or INPUT-OUTPUT ProDataSet Depending on whether ProDataSet definition or values need to be passed in OUTPUT status for exception handling Useful default for many operations Use custom APIs and custom gateway procedures for special operations

12 Agenda Introducing the Service Interface Layer
Managing ProDataSet Instances Context Management Creating a WebSpeed® User Interface Additional Topics and Futures Conclusions

13 Management of ProDataSet Instances
Which object “owns” the ProDataSet instance on server and client? ProDataSets can be passed BY-REFERENCE to avoid copying The caller’s instance is always used, even on OUTPUT This will be extended in 10.1 to support a “pull” model where the called procedure’s instance is used

14 ProDataSet Instances on OUTPUT
Client Server UI Procedure Business Entity Data-Access Object DATASET- HANDLE DATASET dsOrder DATASET dsOrder DATASET dsOrder BY-REF HANDLE BY-REF RUN fetchOrder IN hdsOrder (. . . , OUTPUT DATASET dsOrder BY-REFERENCE) RUN FetchWhere IN hEntity (. . ., OUTPUT DATASET phFetchDataSet BY-REFERENCE) fetchWhere: FILL ATTACH Client Proxy Procedure Server Gateway Procedure

15 Agenda Introducing the Service Interface Layer
Managing ProDataSet instances Context Management Creating a WebSpeed® User Interface Additional Topics and Futures Conclusions

16 Context Management Basics
Target environment is client to state-less or state-free AppServer Each interaction is independent Maintain context between related interactions

17 Passing Context between Client and Server
Context/Parameter temp-table passes context back and forth Name & Value fields allow flexibility Context is maintained on the client Useful for small amounts of data Also for context used on the client And for context modified on the client

18 Context Between Client and Server
Business Entity UI Procedure DATASET dsOrder DATASET dsOrder context/parameter temp-table RUN FetchWhere IN hEntity (. . ., OUTPUT DATASET phFetchDataSet BY-REFERENCE) RUN fetchOrder IN hdsOrder (. . . , OUTPUT DATASET dsOrder BY-REFERENCE) Server Gateway Procedure Client Proxy Procedure WhereString = “…” NextRowid = 63524

19 Context Maintained on the Server
Hold context in a shared server-side data store Typically a database table Useful for context not to pass back and forth Session context such as language, authorization that does not change Requires a Context ID passed from the client GUID support in sample and in 10.1

20 Context Stored on the Server
Client Business Entity UI Procedure DATASET dsOrder DATASET dsOrder context/parameter temp-table RUN FetchWhere IN hEntity (. . ., OUTPUT DATASET phFetchDataSet BY-REFERENCE) RUN fetchOrder IN hdsOrder (. . . , OUTPUT DATASET dsOrder BY-REFERENCE) Server Gateway Procedure Client Proxy Procedure ContextID = 95847 95847 English Auth …

21 ProDataSet and Temp-table Context
Store retrieved data in a context table For WebSpeed or other clients with no ProDataSet support RAW fields and BLOBS for generic storage Store successive updates before commit Allows partial validation on the server Final update ProDataSet rebuilt from context

22 ProDataSet or Temp-table Data as Context
Server Client Business Entity UI Procedure DATASET dsOrder DATASET dsOrder ContextID = 95847 RUN FetchWhere IN hEntity (. . ., OUTPUT DATASET phFetchDataSet BY-REFERENCE) RUN fetchOrder IN hdsOrder (. . . , OUTPUT DATASET dsOrder BY-REFERENCE) “OrderNum = 1” Server Gateway Procedure Client Proxy Procedure 95847 Order 1 Line 1 95847 Order 1 Line 1 95847 Order 1 Line 2

23 Agenda Introducing the Service Interface Layer
Managing ProDataSet Instances Context Management Creating a WebSpeed® User Interface Additional Topics and Futures Conclusions

24 Agenda Introducing the Service Interface Layer
Managing ProDataSet Instances Context Management Creating a WebSpeed® User Interface Additional Topics and Futures Conclusions

25 White Paper: Using an Unmanaged Data Store
Uses an XML document in place of the database Alternative Data-Source procedure identifies the document Custom code populates the ProDataSet Remaining Business Entity code runs unmodified

26 White Paper: Simple .NET Interface to Business Entities
Code generator creates a XSD file with a DataSet description This in turn creates a C# class file for the DataSet C# version of the client proxy runs the same gateway procedure on the AppServer C# DataSet class file used to build the UI

27 White Paper: Advanced Business Logic
The role of database trigger procedures One Business Entity accessing another One Data Access Object accessing another When to allow direct database access

28 The Sample Implementation and Future Releases
Significant new language extensions planned for 10.1 and beyond Elements of an OO4GL such as classes Auditing and other built-in core services Materials to be revised and extended to describe 10.1 best practices

29 Agenda Introducing the Service Interface Layer
Managing ProDataSet Instances Context Management Creating a WebSpeed User Interface Additional Topics and Futures Conclusions

30 In Summary Think about and plan for services in your application
Think about which objects control the data Think about context and other aspects of a stateless application server

31 Questions?

32 Thank you for your time!

33


Download ppt "ARCH-07: Implementing the OpenEdge™ Reference Architecture – Part 2"

Similar presentations


Ads by Google