1 / 96

IA366 DDS Enterprise Application Framework

IA366 DDS Enterprise Application Framework. Alex Whitney Managing Principal Dynamic Data Solutions awhitney@dyn-data.com. Agenda. Why Enterprise Application Framework (EAF) Major Features Major Components and Services Demonstration. Why Did We Develop the EAF.

tanith
Download Presentation

IA366 DDS Enterprise Application Framework

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. IA366DDS Enterprise Application Framework Alex Whitney Managing Principal Dynamic Data Solutions awhitney@dyn-data.com

  2. Agenda • Why Enterprise Application Framework (EAF) • Major Features • Major Components and Services • Demonstration

  3. Why Did We Develop the EAF • EAF was developed to help our customers guarantee the success of their EAServer development efforts • We felt that development community as a whole could benefit from this kind of functionality

  4. Why Did We Develop EAF • We decided that the best solution would be to provide the DDS EAF as an open source offering to the PowerBuilder community • EAF is to EAS as PFC is to PowerBuilder • It gives developers a leg up on the development process • Utilize their time on solving business problems, not technical ones

  5. Major Features • ResultSet Vs. Blob • No DataWindow syntax required on client • Logical Unit of Work • Single point of entry for all clients • Interface Manager & Business Object • HTMLDW Support • Multilingual support • Tracing and debugging support

  6. Resultset Vs. Blob • ResultSets are Corba compliant and usable from many clients • Blobs require a PB Datastore or DataWindow at the client

  7. No Datawindow Syntax Required on Client • Updates to client applications can be much simpler • Syntax is sent to client as requested • Options • Only Syntax • Only Data • Syntax and Data • Syntax As Needed

  8. Logical Unit of Work • Implicit in how data is transmitted between client application and component • Data for multiple DataWindows are sent as a group • Both retrieves and updates can be grouped • One round trip between client and server for an update or retrieve

  9. Client Business Object Business Object Update Request Interface Manager Component DataSet DataSet DataSet Session Manager Component Message Manager Component Business Object Component Business Object Component Business Object Component Database Logical Unit of Work

  10. Single Point of Entry for All Clients • All data access is treated the same no matter what the client is • InterfaceManager Component delegates all requests as required • DataSet Object • BO Component

  11. Web Client Business Object Business Object PowerBuilder Client Business Object Business Object Java Client Business Object Business Object Interface Manager Component DataSet C++ Client Business Object Business Object Session Manager Component Message Manager Component ActiveX Client Business Object Business Object Business Object Component Message Manager Message Manager Database Single Point of Entry for All Clients

  12. Business Object • Allows a single point of validation for updates from multiple IM’s • Supports DataWindow validations as well as custom logic

  13. Interface Manager Component Interface Manager Component DataSet Interface Manager Component Business Object Component Client Business Object Business Object Database Business Object

  14. HTMLDW Support • Permits the developer to treat web clients just like a PB client • Same retrieval and update logic regardless of client

  15. HTMLDW Support

  16. Multilingual Support • Display DataWindows and messages in a specific language that is tied to a session

  17. Multilingual Support

  18. Tracing and Debugging Support • Extensive support for writing information to the Jaguar log file • Can be controlled from the component’s Jaguar properties • com.sybase.jaguar.component.ddseafdebug=true • com.sybase.jaguar.component.ddseafdetailed=true • com.sybase.jaguar.component.ddseaftrace=true

  19. Tracing and Debugging Support

  20. Major Components and Services • DDSEAF_n_cst_component • Interface structure • InterfaceManager Component • BOManager Component • DataSet Object • InterfaceService Object • SessionManager Component • MessageManager Component • DDSEAF_n_cst_resultsetservice

  21. DDSEAF_n_cst_component • Base class for all PB components • Database access • Methods for configuring a connection to the database • Methods for connecting and disconnecting • No default connection or disconnection logic at this level

  22. DDSEAF_n_cst_component • Transaction management • SetComplete/SetAbort() wrappers • IsInTransaction() • IsTransactionAborted() • Logging • Reference to logging service object • Debugging • Automatic setting of debug variables from component properties

  23. DDSEAF_n_cst_component • Error handling • Get/SetLastError() functions • Communication with other components via ObjectService reference variable • SessionManager • MessageManager

  24. Interface Structure • Communication between server and client is handled via the Interface Structure • Structure allows multiple DataSets to be transferred between the client and InterfaceManager as a single LUW

  25. InterfaceManager Component • Manages requests for data from client applications • Requests are for a single (or multiple) set of data (DataSet) • Each DataSet’s ResultSet is defined by: • A DataWindow object • A more sophisticated DataSet object

  26. InterfaceManager Component • Can manage one to many DataSets • Each DataSet has zero to many associated BusinessObjects assigned to it • Updates are: • Delegated to a BO • Performed via a DataSet Object • Not allowed • Defined by DataSet configuration

  27. InterfaceManager Component • LUW scoped to an InterfaceManager • LUW may not span multiple IM’s • The same DataSet can reside on multiple IM’s • BO’s may be called from multiple IM’s • Can work with all DataSets in a LUW

  28. InterfaceManager Component • Example Constructor Code • // Set up the Transaction • ls_bo = ‘DDSEAF_Examples/BOCustomer’ • SQLCA.initialize('odbc', "UseContextObject = 'Yes',cachename='EASDemo'") • registerDataset('custpicklist', d_customerpicklist”) • registerDataset('customer', "d_customer", ‘’, ls_bo)

  29. InterfaceManager Component • // Registers a DataSet object - Much more flexible than a single DataWindow object • lnv_customer = create ds_customer • registerDataset('customer', lnv_customer, ls_bo, ls_bo)

  30. BOManager Component • Normally configured to manage all updates for a specific table • Supports DataWindow validation rules • Can apply data rules to the syntax of the DataWindow object prior to a retrieve • Supports the addition of custom logic

  31. BOManager Component • Extract only the columns that belong to them for updating • Multi-table updates, where rows have a 1-to-1 relationship, are automatic if all BO’s that manage the tables are registered with the DataSet at the IM

  32. BOManager Component • Example Constructor Code • // Set up the Transaction • SQLCA.initialize('odbc', "UseContextObject = 'Yes',cachename='EASDemo'") • // Set the dataobject • setDataobject("d_bocustomer")

  33. DataSet Object • Allows for extensions to retrieval logic • If a BO is not used then the DataSet object can be used to extend update logic • Allows for customization of generated HTML

  34. DataSet Object • Example Constructor Code • setDataobject('d_customer', 1) • setDataobject('d_customer_spanish', 2)

  35. InterfaceService Object • Client side service object that manages interactions between the client and an InterfaceManager component • One InterfaceService per LUW • LUW normally scoped at window level • DataSets are configured to use either a DataWindow control or a DataStore as the target

  36. InterfaceService Object • DataSets can be grouped • DataSets can belong to more than one group • Retrieves and updates can be done for: • A single DataSet or group • A series of DataSets or groups • All registered DataSets

  37. InterfaceService Object • Update process performs accepttext() and checks for required fields before starting the update • Only DataSets that have changes are sent to the server • Only rows that have been updated, inserted or deleted are sent to the server

  38. InterfaceService Object • Example Open Event Code • ll_rc = inv_interface.setConnection(icn_jaguar) • If ll_rc <> 1 Then MessageBox (this.ClassName(), "Call inv_interface.setConnection() failed!" + inv_interface.getLastError() + "~r~nRC=" + String(ll_rc)) Return • End If

  39. InterfaceService Object • ll_rc = inv_interface.setInterfaceManager('IMCust') • // Register the DataSet(s) • ll_rc = inv_interface.registerDataset("customer", "customer", "windowgroup", dw_customer, inv_interface.RETRIEVE_FULLONNEED)

  40. InterfaceService Object • Example Update code • ll_rc = inv_interface.update ("customer") • If ll_rc < 0 Then • MessageBox (this.ClassName(), & • "Call inv_interface.update() failed!~r~n~rn" + inv_interface.getLastError() + "~r~nRC=" + String(ll_rc)) • Return • End If

  41. InterfaceService Object • // Cast to key value to the appropriate type and add the Retrieval Argument • ll_key = long(ls_key) • ll_rc = inv_interface.resetArguments( "customer") • ll_rc = inv_interface.addArgument ("customer", ll_key) • // Perform the request for retrieval • ll_rc = inv_interface.retrieve ("windowgroup")

  42. SessionManager Component • Provides a way to store session specific information at the server • Written in Java for multithreaded support

  43. MessageManager Component • Provides standardized message handling for both server and client • Written in Java for multithreaded support

  44. DDSEAF_n_cst_resultsetservice • Provides conversion from DataWindow/Datastore to ResultSet style structure and back • Extracts all buffers from a DataStore/DataWindow and converts them to resultsets

  45. DDSEAF_n_cst_resultsetservice • Does so by isolating each buffer(6 of them) • DELETED • NEW • MODIFIED_NEW • UNMODIFIED_ORIGINAL • MODIFIED_ORIGINAL • MODIFIED_CURRENT • Finds all DDDW columns and converts their contents to a ResultSet

  46. DDSEAF_n_cst_resultsetservice • Reverses the process on the receiving end • Ensures that all status flags are properly set after being converted back to a DataStore /DataWindow

  47. InterfaceManager Component • Public methods • retrieve ( ref s_interface astr_interface ) returns long • All DataSets in the retrieval list are retrieved • update ( ref s_interface astr_interface ) returns long • All DataSets in the update list are updated • generate ( ref s_htmldwprops htmldwprops ) returns string • Request for HTML DataWindow interface

  48. InterfaceManager Component • Public methods • getregistered ( ref string as_datasetids[] ) returns long • Returns a list of all registered DataSets • getargumentdefinition ( string as_datasetid, ref string as_argnames[], ref string as_argdatatypes[] ) returns long • Returns the argument list and their datatypes for a DataSet

  49. InterfaceManager Component • Configuration concepts and commonly used methods • Configure database connection • SQLCA.initialize('odbc', "UseContextObject = 'Yes',cachename='EASDemo'") • Configure DataSets • If a DataSet object is NOT specified then a default one will be created and used for the DataSet

  50. InterfaceManager Component • Configure DataSets (continued) • Use customized DataSet object to alter default behavior • Retrieve only • DataSet is updated by the IM • Set data rules with a BO, Update via IM • Retrieve/update w/BO for update and BO for setting data rules. Data rules BO is optional

More Related