Build Open Client applications
- Last Updated: August 23, 2023
- 4 minute read
- OpenEdge
- Version 12.2
- Documentation
Based on the work completed in the pre-planning phase, both the ABL developer and Open Client developer will have a roadmap of the work to be done. Development can start in parallel and will require less rework if each developer completes the work to which they have committed. The steps to building an Open Client application include:
- Develop ABL code
- Generate and share proxy files
- Develop Open Client code
Develop ABL code
The ABL developer will either expose existing code, ABL procedures based on the agreed upon business logic requirements or they may opt to develop new code. In either case, ProxyGen is used to create Open Client object types that can be used in .NET or Java user interfaces.
For Open Clients, the client code accesses the proxy in the client's native environment. As a result, a .NET client sees the proxy as a set of .NET classes, while a Java client sees the proxy as a set of Java classes. To use proxy objects, you must deploy the generated proxy along with the Open Client Runtime to all client application development and deployment systems. Any single Open Client interface maps an application to a series of object types.
Before building your client application, you must prepare your environment. The preparation depends on the build environment and the client type. After building your application, you can deploy your client application according to its Open Client type.
For more information, see .NET Open Clients or Java Open Clients.
Generate and share proxy files
There are two versions of ProxyGen:
- ProxyGen — The full version of ProxyGen, available on Windows
- Batch ProxyGen — On Windows and UNIX, a subset of ProxyGen functionality is available as a console application, called Batch ProxyGen. Batch ProxyGen operates only on previously saved Open Client interface definitions.
ABL developers must use ProxyGen (the full version) to define an Open Client interface for an Open Client proxy. Later, ABL developers can use either ProxyGen or Batch ProxyGen to generate the actual Open Client proxy. These proxy files are then sent to Open Client developers to use when developing .NET or Java applications.
- Application objects (AppObjects)
- Sub-application objects (SubAppObjects)
- Procedure objects (ProcObjects)
| Object type | Occurrences | Description |
|---|---|---|
| AppObject | One required per application | Encapsulates zero or more external ABL procedures as directly callable methods and zero or more ProcObjects as class factory methods |
| SubAppObject | Zero or more per application | Encapsulates zero or more external ABL procedures as directly callable methods and zero or more ProcObjects as class factory methods |
| ProcObject | Zero or more per applications | Maps to a persistent, single-run, or singleton procedure that encapsulates one or more ABL internal procedures and user-defined functions as directly callable methods |
The minimum requirement is one AppObject that encapsulates all external procedures for the application. SubAppObjects allow you to organize these external procedures into collections you find useful for your particular application. ABL developers may use SubAppObjects to help group functionality and limit access based on permissions.
Use ProcObjects for persistent, single-run or singletons
A ProcObject maps to an ABL external procedure that is executed as persistent, single-run, or singleton. The procedure's internal procedures and functions are then available for access by callers external to the procedure that defines them. On the application server, these callers can include other external ABL procedures that execute in the same OpenEdge session, or they can include clients of an application server including Open Clients that call these internal procedures and functions as methods.
ProxyGen maps each persistent, single-run, or singleton procedure that you include in an Open Client interface to a corresponding ProcObject, with the internal procedures and functions becoming its methods.
For session free applications, ProcObjects that encapsulate persistent procedures have limited utility and tend to interfere with session free application performance. Part of the value of persistent procedures is that they provide a means to maintain run-time context between the client and the application server. Much of the value from session free application services is that application server resources are more readily available to serve client requests. However, a persistent procedure binds an application server resource to the client that instantiates the procedure until the client deletes the procedure. This ties up a physical connection and reduces the application server resources available for requests from other clients, which can in turn reduce apparent application performance across the client domain.
Invocation determines how ABL procedures are runProxyGen allows you to distinguish between non-persistent, persistent, single-run, and singleton procedures for all external procedures that you include in your Open Client interface. ABL makes an external procedure non-persistent, persistent, single-run, or singleton by the way you invoke the procedure, not by the procedure's definition. You can include any OpenEdge external procedure in an Open Client interface as non-persistent, persistent, single-run, or singleton, with the restriction that a procedure with parameters in its main block cannot be run as single-run or singleton. For Open Client proxies, however, access to the functionality of a non-persistent procedure is very different compared to a ProcObject, and it requires different object management, depending on the session model and object types involved.
The net result of running ProxyGen is to create a project file, or
.xpxg file. This file includes the list of all
selected procedures and any customizations you applied to those procedures, for each
Open Client Interface object definition.