A standard REST API - ODATA?

Posted by carl.williams on 24-Jul-2017 02:45

I recently attended the Kendo UI Builder 2.0 webinar (many thanks for this). It was mentioned that there is limited read ODATA support. Is this supported in OpenEdge via a new version of the JSDO?

What are the plans for extending ODATA to CRUD, etc?

We are looking at building a standard REST API to expose our application and REST seems to be more a series of guidelines and good practice rather than a fixed standard, eg. filtering, paging, etc.

Any thoughts appreciated.

All Replies

Posted by oedev on 25-Jul-2017 06:39

Thanks for mentioning ODATA, I've not really looked into it previoiusly and it's worth a look as we are in the same position in respect of being ready to start building a REST API on top of our ERP solution.

I've been more focused at looking at RAML and Swagger as potential products to be used for documenting any API, so would be interested in knowing if Progress are going to be doing anyhting in this area?

Can see two possible directions of integration;

1 - Can a Openedge REST API (e.g. Webspeed web handler) be parsed and the maching Swagger or RAML generated ?

2 - Can we parse a Swagger or RAML definition and generate a Openedge handler stub, including matching prodataset definition etc. ?

I'd also be interested in knowing if you are going to be using Openedge REST or Openedge Webspeed handlers for implementing your API's? The latter Webspeed route seems to be much lighter config wise with no downsides ?

Posted by carl.williams on 25-Jul-2017 07:02

We are using WebHandlers so that we can use all the REST verbs such as Patch. Only downside is it will take us longer to generate generic coding as a Class than using procedural.

Posted by Mike Fechner on 25-Jul-2017 07:06
Are you saying OO coding is taking you longer thran procedural coding? That’s hard to believe!
 
But if you think so, the Web Handler would only need to be the first bit of code called from the web. From there on you can continue to remain in the past and write procedures.
 
Von: carl.williams [mailto:bounce-carlwilliams@community.progress.com]
Gesendet: Dienstag, 25. Juli 2017 14:04
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] A standard REST API - ODATA?
 
Update from Progress Community
 

We are using WebHandlers so that we can use all the REST verbs such as Patch. Only downside is it will take us longer to generate generic coding as a Class than using procedural.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

 
Posted by carl.williams on 25-Jul-2017 07:10

It takes longer as I have not used Eclipse much or OO much so I have a learning curve. It took me 3 hours this morning to get the environment setup in the first place. I am not saying OO is slower in general but it is when you have to get up to speed.

Posted by Peter Judge on 27-Jul-2017 07:34
“Most” (or many, or some, depending on who you talk to)  people seem to be headed down the Swagger or OpenAPI route (rather than RAML).  I think both directions you mention would be interesting  - Swagger has a “codegen” module which  can easily be extended to add either webhandlers or DataObjectHandler mapping files.
 
Also, currently the “Mapped Data Object Services” use annotations in ABL to generate a Data Services Catalog which is similar to a Swagger doc is you squint a little. Obviously this would need extension/work to be fully Swagger compliant.
 
Posted by carl.williams on 27-Jul-2017 07:43

Thanks Peter.

I know that Mike Fechner / SmartComponents has been working on a Swagger / Business Entity integration which I will be looking into shortly. The ideal from my point of view would be Swagger generates the webhandlers and then roundtips changes to the webhandlers and any annotations.

For a public API a self-generating document is very appealing, with the ability to run sample requests and use codegen then to generate the client side to consume the endpoints.

Posted by Akshay Guleria on 21-Nov-2017 05:43

[mention:b4bd74b70d11452599ed9355a1d5195e:e9ed411860ed4f2ba0265705b8793d05] and [mention:4540e31b6b80426ab2d3d7441b7899aa:e9ed411860ed4f2ba0265705b8793d05] - Here is the post (code included) which perhaps solves your purpose -> community.progress.com/.../3389

Posted by marian.edu on 22-Nov-2017 04:46
isn’t that something Martyn was working on, or that’s more tailored to the SF extensions?

Posted by Mike Fechner on 22-Nov-2017 23:21

Martyn's work was primarily targeted for the SmartComponent Library back end. But can with some changes be applied to PSC's in the box Business Entities as well.

Posted by marian.edu on 23-Nov-2017 01:16
All clear now, just to avoid confusion though… openapi (oas) formerly known as swagger specs it not the same thing as odata, I do feel the odata model based approach makes more sense in 4gl business entities world than the services (api) approach in swagger ;)


Marian Edu

Acorn IT 
+40 740 036 212

This thread is closed