Hi,

you can structure your application in a way that you can have both:

- web services where all business rules are enforced

- access via RPG where all business rules are enforced

Just build a layer of access which enforces all the business rules. Put that into procedures grouped into a module. Build a service program(s) from those modules. I like to group everything for a single domain together into one service program. This service program can be used by your RPG programs on the same machine.

But there are no isolated machines anymore. So sharing your data with applications not living on the IBM i server is standard today. And for doing this you can use web services. So instead of developing a way for every language or framework just use web services when the data has to go outside the server.

And for building your web service you just take the previously created service program and build another thin web service layer on top of it. Now you are using all the business rules no matter how the data is accessed, natively or by web service.

Happy new year everybody!

Mihael


On 01.01.19 02:49, Booth Martin wrote:
Did that.  Fahrenheit to Celsius, Celsius to Fahrenheit, day-name for any requested date, return a list of Oceans, return a list of US Presidents and details of their presidency, a random list of ticket numbers, and details related to a selected ticket number. All from physical files in my development library on a couple of different i-series machines.  All these data are returned as json data to any browser pointed to the correct uri.  I also set up a web server on the i. The pages exist to request & display these data using HTML, JavaScript, and css.  All works pretty well, considering my novice status.

Next step looks to me to be consuming that same information with 5250.   I'm not liking what I am seeing so far.

And yes, I know I can use RPG to get the data directly from the files in my development library.  But that's not the point, is it?  I want to be able to enforce business rules and what is and what isn't available, within the i-series environment and yet provide useful data for various superusers who have their own specific needs.


On 12/31/2018 5:59 PM, Buck Calabro wrote:
Once you have some experience with the docs and with the concepts, you
can write your own web service that will expose some Db2 data that
your example needs - address, probably.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].