[progress Communities] [progress Openedge Abl] Forum Post: Re: [kendo For Angular] How To...

Status
Not open for further replies.
E

egarcia

Guest
Hello Arvind, You are welcome. > I am not using Kendo UI or Telerik platform to build web application. > I am simply using developer studio as IDE with CLI and from here I am trying to connect to OE database and > want receive values back to the web application based on what I send to OE database. Thank you for the additional information. A couple more questions. What version of OpenEdge are you using? Are you using PASOE? The simplest approach to connect the OpenEdge database and receive values to the web application is to enable REST access via the OpenEdge Data Service approach. This is a prescriptive approach where options to perform CRUD, Invoke and Submit operations are available. You can use any client to access this service. (This service type can also be used with the JSDO which then gives you access to Progress technologies that use it.) An alternative to using the OpenEdge Data Service, would be to enable REST and handle the mapping of URIs to the classes yourself. With this approach you can also add URIs to correspond to an element URI (/service/resource/ ) in addition to working with a collection URI (/service/resource). The OpenEdge Data Service approach uses collection URIs. The workshop link that I mentioned earlier provide videos showing how to do this with OpenEdge 11.6. Even though the workshop was done as part of the Mobile support using the JSDO, the concepts are the same: - Enable REST access to the OpenEdge backend - Use a client API to access the REST backend Please check the following videos in the workshop material: - Configuring Progress Developer Studio - Exposing OpenEdge Data as REST The first video shows you how to create and configure the project in Progress Developer Studio. The second one shows you how to create Business Entity classes to implement the functionality. Please check the document "Creating an OpenEdge ABL Service using OpenEdge 11.7.0 for information on creating an OpenEdge Data Service: community.progress.com/.../3363 Here is a summary of the steps (using 11.7.x): - Create an OpenEdge Project - I will use Sports as an example in the following steps. - Select Server. - Specify server:pAS for OpenEdge transport: WEB Select Create a Data Object Service (If you do not have PASOE, select Classic/REST/Create a Data Object Service.) Follow the wizard using the default values. Deploy as WebApp: Sports Make sure that oepas1 is selected in Supported servers. In the next page, you will see the info for the ABL Service. Your service name will named Service - in my example it is SportsService. You will also see the format of the URI to access the service. Specify the database to use by the project. Open the Servers view. Notice that the ABL Module Sports and the ABL Service are listed. Double-click on the oepas1 entry to access a view with details on the server. Select Open launch configuration. Specify the database to use by the server. Start the oepas1 server by using Start from the context menu on oepas1 in the Servers view. (Use right-mouse-click to access the context menu.) Select AppServer in the Project Explorer and create a Business Entity. Specify the name of the class. This is the name of the resource. For example "Customer". For operations select CRUD and Submit. Select database table Customer. Click Finish. A Customer.cls would be created. A temp-table with the schema is written to an include file. Please notice you can change the temp-table and the methods in the Business Entity to match your requirements. For example, you can remove fields from the temp-table, if you do not want those fields to be returned via REST or you can add fields that are not part of the database table but you want to return to the client. You can set a callback for AFTER-ROW-FILL to populate these fields. In Project Explorer, Defined Services, do right-mouse-click and use Edit on SportsService. Select Customer.cls to be available via REST. In the Servers view, notice that service is published and synchronized to oepas1. Access http://localhost:8810/Sports to check that the service is available. Access localhost:8810/.../Customer to retrieve values. Your client code then can use this URL to access the data. Please create a new thread if you have additional questions. I hope this information helps you in your project.

Continue reading...
 
Status
Not open for further replies.
Top