Progress
Open Client
Developer’s Guide
AppObjects
Each AppObject represents the encapsulation of some set of business logic deployed at a particular AppServer and it establishes a connection to that AppServer.
Methods
An AppObject has the following types of methods:
- Connection:
- Remote 4GL — Invoke non-persistent procedures, internal procedures, or user-defined functions on the AppServer.
- SubAppObject Class Factory — Create SubAppObjects that share the AppServer connection from this AppObject.
- Procedure Class Factory — Create ProcObjects that share the AppServer connection from this AppObject and run an external procedure on the AppServer persistently.
- SDOResultSet Class Factory— (Java only) A built-in method that creates a predefined ProcObject, SDOResultSet. SDOResultSet provides Java client access to a specified remote Progress SmartDataObject as an extended JDBC 2 ResultSet. For more information, see Using SmartDataObjects From Java Clients."
- Common — Provide management functions.
Example Java AppObject
Example 4–1 shows a partial sample Java class definition for an AppObject,
Account
. This proxy contains Remote 4GL methods to runAdd.p
andRemove.p
, and a Class Factory method that runsAccountInfo.p
persistently on the AppServer.
Example 4–1: Java Account ClassFor more information on how to specify the parameters for the AppObject constructors for a particular AppServer connection, see the "Connecting To a Progress AppServer" section in this chapter and in Programming Java Clients." For more information on the other types of methods, see the "Understanding Proxy Object Methods" section in this chapter.
Example ActiveX AppObject
The following Visual Basic subroutines and functions comprise the definition for a sample ActiveX AppObject,
Account
, where each method appears as it is displayed by the VB Object Browser asAccountLib.CAccount
:
- The Connection method that connects to an Application Service:
- A SubAppObject Class Factory method that creates a SubAppObject called tax:
- A ProcObject Class Factory method that runs and instantiates the persistent procedure
AccountInfo.p
on the AppServer:
- Remote 4GL methods to run the internal procedures
Add
andRemove
(defined byAccountInfo.p
) on the AppServer:
- Common methods in all ActiveX proxy objects:
For more information on how to specify the parameters for the connection method,
OC_Connect()
, for a particular AppServer connection, see the "Connecting To a Progress AppServer" section in this chapter and in Programming ActiveX Controller Clients." For more information on the other types of methods, see the "Understanding Proxy Object Methods" section in this chapter.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |