Create ABL services
- Last Updated: March 3, 2023
- 3 minute read
- OpenEdge
- Version 12.2
An ABL service exposes the functionality contained in the business logic layer as APIs for client applications to consume. Each service is bound to one of the following PAS for OpenEdge transports—REST, WEB, SOAP, or APSV. You can create multiple services for the same business logic, each serving a specific type of client application.
Create REST services
REST services are the preferred way to integrate ABL business logic with client applications. REST services are scalable and easier to develop, because they use standard HTTP request and response mechanisms.
The REST and WEB transports in PAS for OpenEdge enable you to develop REST services; however, we recommend using the WEB transport because it provides more flexibility and supports all HTTP content types.
To create an ABL service based on the WEB transport, you use a Web Handler as
the service interface. A Web Handler is a custom ABL class that inherits the OpenEdge.Web.WebHandler class and contains methods that
map to HTTP verbs (HandleGet(), HandlePost(), etc). When you create the service, you
define a list of URIs that get associated with the Web Handler. At runtime, when a
client application makes a request to a URI, the request is passed to the associated
Web Handler and processed by the method that corresponds to the HTTP verb used in
the request (GET, PUT, POST, or DELETE). To learn more, see the Use a WebHandler documentation.
Create Progress Data Object services
Progress Data Object services are specially configured services that use either the WEB or REST transport to enable client access to OpenEdge data and operations. Although they can be used by a variety of web and mobile client applications, they are optimized for use with JavaScript Data Object (JSDO) clients. The JSDO is a client side library whose purpose is to provide an easy to understand API for querying, creating, updating and deleting Progress Data Objects and invoking server-side business logic.
To learn more about creating ABL services, see Develop services in the OpenEdge documentation. To learn more about JSDO, see Overview of Progress Data Objects.
Write ABL procedures to manage request and session context
You may want your application to handle context in a client request before the request is processed by an ABL service. Context is any data that needs to be persisted over several interactions between a client application and the service. This includes things like user profile, role information, language preferences, etc. In PAS for OpenEdge, you can manage request and session context by writing event procedures—procedures that are triggered on events such as session startup/shutdown, session connect/disconnect, and agent startup/shutdown.
PAS for OpenEdge provides two application models for client applications to communicate with a PAS for OpenEdge instance: session-free and session-managed. In a session-free model, each request from a client is processed in an independent session by PAS for OpenEdge. Any context that needs to be maintained over several requests must be supplied with each request. Conversely, in a session-managed model, multiple client requests can be handled within the same session.
To learn more about managing context, see Programming for a PAS for OpenEdge application model in the OpenEdge documentation.
Deploy ABL services to PAS for OpenEdge for testing
After you have developed ABL services in your OpenEdge project, you can test them either by deploying the services to a PAS for OpenEdge instance in your local OpenEdge development environment or as part of a CI/CD pipeline, where the services are packaged into a web application and deployed to a remote PAS for OpenEdge instance.
A Developer Studio for OpenEdge installation includes a development version of PAS for OpenEdge that you can use for testing. This video provides an overview of using PAS for OpenEdge in Developer Studio for OpenEdge:
Application migration from OpenEdge AppServer to PAS for OpenEdge
If you are migrating your application from the Progress OpenEdge AppServer (classic AppServer) or the WebSpeed Transaction Server to PAS for OpenEdge, you will need to make a few simple code and property changes. To learn more about these changes, see Learn About Migrating Classic AppServer Applications to PAS for OpenEdge.