WebHandler vs REST project - basic questions

Posted by marekk on 11-Mar-2018 17:15

Hi,

Can someone explain me what are the benefits of creating webhandler service over rest ones? Seems to be more flexible as written in ABL. How about other aspects e.g. performance etc. Both types deal with HTTP verbs.

In the project create wizard there is a description: "Creates an OpenEdge project with a WebHandler service that is used to create RESTful API powered by WebHandler class." - does it mean webhandler service is also of REST type? I am a bit confused.

Thanks,

Marek

Posted by Sanjeva Manchala on 12-Mar-2018 08:38

Hi Marek,
 
Yes, if you check that checkbox a catalog file will be created with schema and operations information, the same file will be used while creating client apps (KUIB, Kendo UI, Rollbase etc...) via JSDO.
 
Hope this helps,
Sanjeev
 

Posted by Sanjeva Manchala on 12-Mar-2018 11:55

Yes, If you don’t check that checkbox plain REST service will be created.

Thanks,

Sanjeev

All Replies

Posted by Sanjeva Manchala on 12-Mar-2018 02:42

Hi Marek,
 
Please find answers inline.
 
Thanks,
Sanjeev
 

Posted by Sanjeva Manchala on 12-Mar-2018 03:32

Seems inline replies are not reached the forum. So, resending:
 
>>Can someone explain me what are the benefits of creating webhandler service over rest ones? Seems to be more flexible as written in ABL. How about other aspects e.g. performance etc. Both types deal with HTTP verbs.
[Sanjeev]: Since WebHandlers are written in pure ABL, you can have more flexible while writing and customizing and also no need to of any mapper (like in REST service)
 
>>In the project create wizard there is a description: "Creates an OpenEdge project with a WebHandler service that is used to create RESTful API powered by WebHandler class." - does it mean webhandler service is also of REST type? I am a bit confused.
[Sanjeev]: Since Web Handlers support all HTTP verbs, you can assume as WebHandlers are also REST type.
Here is some analogy/mapping between REST and WebHandler Services:
Transport(REST) : Transport(WEB)
REST Service :  WebHandler
Data Object REST Service : Data Object WebHandler
Note: Transport is OpenEdge specific internal thing. Ideally both REST and WebHandler based services are RESTful services only.
 
Thanks,
Sanjeev

Posted by marekk on 12-Mar-2018 08:15

Thanks, Sanjeev for your explanation.

Let me ask one more question. In the mentioned wizard there is also a checkbox: Create a Data Object Service (Generate a JSDO catalog).

Is it to have JSDO object manipulation on the client-side, like with the REST services?

Thanks,

Marek

Posted by Sanjeva Manchala on 12-Mar-2018 08:38

Hi Marek,
 
Yes, if you check that checkbox a catalog file will be created with schema and operations information, the same file will be used while creating client apps (KUIB, Kendo UI, Rollbase etc...) via JSDO.
 
Hope this helps,
Sanjeev
 

Posted by marekk on 12-Mar-2018 11:43

That's clear. But if I will not mark this checkbox json file is not created?

Thanks,

Marek

Posted by Sanjeva Manchala on 12-Mar-2018 11:55

Yes, If you don’t check that checkbox plain REST service will be created.

Thanks,

Sanjeev

Posted by marekk on 12-Mar-2018 13:23

Many thanks, Sanjeev!

Marek

This thread is closed