I'm about to migrate code from classic APPServer, into PASOE.
So I tought I could consolidate 2 projects that came from 11.5. One is for ABL remote clients and also local clients, the other is for angular 2.0 clients, so it uses rest.
My question is how would it be possible to consolidate source code in one project as there are several routines duplicated, such project should have both facets?
Any light on the subject would be very appreciated.
My question is about if one project, defined as rest, could serve for ABL clients asking routines, the same routine that it serves for rest clients...
Where could I find such handbook? or info related to that?
but I want to have only one project with code for both kind of clients....
Perhaps I haven't figured out yet....
For instance, I got a procedure GetCustomers.p. can I use it at the same time as a source for rest, and call it with RUN GetCustomers.p on hServer..... ?
We do this al the time.
We have API's that contain business logic.
We have SOAP-routines that convert Soap-message to APi
We have REST-routines that convert Rest-messaeg to API
We have UI-routines that convert ui-input to API
We have Import-routines that convert import files to API
We have unit-tests that test our API
Could you share or explain the definition of one parameter in a .p or .cls that has the business logic, and how it would be exposed on rest? and that such conversion, how do you accomplish it?
We have centralized API's.
This api contains all the business logic for CRUD-operations on customers. The API uses a temp-table or dataset to hold the business entity.
In order to expose that API to a REST-service, we have created something like "restservice.cls". That class contains wrappers that transform the REST-message (JSON) to temp-tables. We've created generic wrapper code.
In order to expose the API to SOAP, we have created wrappers that convert the soap-message to our temp-tables/dataset.
Same for import/export.