angular 2 connection with progress(backend) - Forum - DataDirect Connect - Progress Community

angular 2 connection with progress(backend)

 Forum

angular 2 connection with progress(backend)

This question has suggested answer(s)

I am creating small single page application(SPA) using Angular2 but I am stuck in connecting progress db from angular2 type script. 

I will will be great help If someone can please let me know how to connect to progress db from angular 2 script?

All Replies
  • Hello,

    Are you looking for ways to connect to the OpenEdge database?

    Are you using DataDirect?

    I am assuming that your question is about accessing the OpenEdge backend in general. You can use the AppServer (PASOE or Classic AppServer) with REST support.

    Please provide more info on this.

    To connect to the OpenEdge backend from a JavaScript client, you can create a REST service that connects to the AppServer and the database.

    There are few options to choose from:

    - REST by doing visual mapping of the URLs to classes

    - REST by using WebHandlers, where the mapping is done programmatically and with a configuration file.

    - OpenEdge Data Service: A REST service using prescriptive approach where the mapping of URLs to classes is done automatically. A catalog.json file is generated with the schema and operations of the resources to access from the JSDO, Kendo UI DataSource and Kendo UI Builder.

    Once you have enabled the OpenEdge backend for REST access, you can use either an HttpClient API, XMLHttpRequest or the JSDO (JavaScript Data Object) in JavaScript.

    Here is a link to a workshop that explains how to create OpenEdge Data Services.

    Even though the videos are for working with Mobile from a while back, the concepts are the same.

    Check the video for "Exposing OpenEdge Data as REST":

    community.progress.com/.../2568.a-sexy-ui-for-progress-openedge-using-jsdo-oe-mobile-template-and-kendo-ui-with-sorting-filtering-and-paging

    For a simple example using the JSDO, you can take a look at the following example:

    oemobiledemo.progress.com/.../example001.html

    The following sample program using Angular also help you:

    community.progress.com/.../3124

    Please notice that this example uses callbacks via subscribe() for async operations.

    The JSDO would use use jQuery promises if available.

    We have items in our backlog to provide for JavaScript Promises and/or Observable support.

    I have also posted this information on the other thread.

    Please let me know your have specific questions.

    I hope this helps.