JSDO From DotNet

Posted by maynardr on 07-Apr-2016 10:56

Hi

I am looking at accessing the JSDO via a DotNet class (For work in Pub Sub and Workflow).

I have tried two approaches:

Via RestSharp, where I make use of to the RESFTful endpoints with some success on GET messages, less with PUTs

Via ClearScript. This allows me to execute Javascript V8 in a DotNET class. Trouble with this approach is the dependency in JSDO libray (4.00, progress.all.4.-.js) on Kendo, and then on JQuery.

Has anyone written any DotNET class or application to make use of JSDO to get JSON data? If so how? Or is there a JSDO library  without the Kendo dependency?

Thanks

All Replies

Posted by egarcia on 07-Apr-2016 17:02

Hello,

I have not tried these approaches but here is some feedback.

You should be able to use RestSharp as a way to perform the REST calls to the OpenEdge backend since this is plain REST.

You would just need to send the same payload as the JSDO would do.

Regarding ClearScript.

We do not have support for running the JSDO with NodeJS.

However, it is technically possible to use the JSDO with NodeJS. A while back, we had a video on using the JSDO from Node.js.

I would suggest to bring this requirement to your sales person so that product management is aware of it.

Perhaps, you can also log an idea and explain how important this functionality is for your project.

Some technical info.

The progress.all.js library includes the code for integrating with Kendo UI.

However, you should be able to use progress.jsdo.js which does not include it.

The dependency on jQuery is for the usage of Promises. This is used by the JSDOSession object and is optional for the  JSDO object. The Session object does not use Promises.

There are NPM modules that can be used to provide support for Promises and also for the XMLHttpRequest object. However, I do not know if they can be accessed via ClearScript.

I hope this helps.

Posted by Mike Fechner on 07-Apr-2016 23:47

Did you consider using OpenClient for .NET as an alternative?

Posted by maynardr on 08-Apr-2016 03:40

Thanks, I will raise an idea describing what I am trying to achieve. NodeJS sounds like an idea also, I will try and find the video.

Thanks again

Posted by maynardr on 08-Apr-2016 03:41

Hi Mike.

I have not looked at OpenClient for .Net. I will try and find out more about it.

Thanks

Ray

Posted by Mike Fechner on 08-Apr-2016 06:28

You can add OERA\Support\prosiretrieve1.p to a .NET OpenCient proxy project and use the resulting assembly in .NET.

This thread is closed