1. Steen Jakobsen
  2. PowerBuilder
  3. Thursday, 2 September 2021 08:29 AM UTC

Hi my fellow PB friends,

 

Can I create a REST end point (PB application) so that other applications and services can call business logic written in PB ?

 

Thanks 

Steen

 

 

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 2 September 2021 20:26 PM UTC
  2. PowerBuilder
  3. # 1

Hi Steen,

Adding to what Bruce and Kevin said, there are tons of great Elevate session replays about using DataWindow Converter and PowerScript Migrator toolsets within SnapDevelop C# IDE (included with PB 2019 and newer) to rapidly create C# REST APIs...

https://www.appeon.com/conference/elevate-2020/session-catalog.html?room[]=C%23%20Dev%20Track

And yes, it is C# but you have the PB DataStore object so the programming is very PB like but you are getting industry-standard secure and scalable C# solution.  In other words, this is best of both worlds!

Best regards,
Armeen

Comment
There are no comments made yet.
Bruce Armstrong Accepted Answer Pending Moderation
  1. Thursday, 2 September 2021 20:00 PM UTC
  2. PowerBuilder
  3. # 2

Sure, that's what the DataWindow and PowerScript Converters are for.  There's even scaffolding available to help.  Just make sure you use the NonPBClient or AnyClient options.  That's because there are two forms of json the services generate.  If you select PBClient, they will generate a custom json data structure that includes state flag information that make it work better with a PowerBuilder client.  If you select NonPBClient, then you will get a more traditional json format that just about any client can use.  If you select AnyClient, the services will contain two sets of methods, one for PB Clients and one for non PB clients.

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Thursday, 2 September 2021 13:58 PM UTC
  2. PowerBuilder
  3. # 3
Comment
  1. Steen Jakobsen
  2. Friday, 3 September 2021 05:00 AM UTC
This is really cool. That is what i'm going with.

Thanks Mike
  1. Helpful
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Thursday, 2 September 2021 11:53 AM UTC
  2. PowerBuilder
  3. # 4

Here's a past Elevate session by PowerBuilder MVP Bruce Armstrong on creating a REST API using Snapdev:

https://www.youtube.com/watch?v=8M7xzVAuPFA

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Thursday, 2 September 2021 08:50 AM UTC
  2. PowerBuilder
  3. # 5

Hi Steen.

I believe that the best way to do that is using SnapDevelop. Your solution should be a ASP.NET Core Web API. But this isn't powerscript. You should write your code in c# (or migrate it if you have part of this business logic implemented in powerbuilder).

Andreas.

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.