× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



There was a debate on this at
http://imho.midrange.com/2007/09/08/the-rpg-cycle-jsf-would-like-it-but-cant
-have-it/. You can start on this comment if you don't want to read the
whole dialogue:
http://imho.midrange.com/2007/09/08/the-rpg-cycle-jsf-would-like-it-but-cant
-have-it/#comment-7114

This topic isn't really language specific coupled with the number of RPG
developers who would buy such a book is why there isn't one of this topic.

While it isn't language specific, some languages don't need as much
attention to abstract simply because it doesn't exist in all cases, or maybe
better stated, there are alternatives to developing "abstract-ness" in RPG
vs. Java. On that note, I have used API's to dynamically activate a service
programs sub procedure based on business logic. For example, if I am
receiving in XML web service requests with RPG, I may just want a single
"router" application to receive in the request and output the response.
Based on the SOAPAction I can determine which service program sub procedure
should receive the request and process it. Code sample below of a "router"
web service below:

RXS_readToFile(reqFile);
soapAct = RXS_getEnvVar('SOAPAction'); // soapAct =
'http://mycompany.com/addPurchOrd'

chain soapAct WSROUTE;
if %found(WSROUTE);
handOff.srvPgm = WSRSRVPGM; // WSRSRVPGM = 'PURCHORDSV'
handOff.subProc = WSRSUBPROC; //WSRSUBPROC =
'PURCHORD_ADDPURCHORD'
RXS_handOff(handOff: reqFile: rspFile);

RXS_outFromFile(rspFile);
endif;

This approach allows me to develop a generic "router" to handle all
communication aspects, and all procedures that would like to receive/process
an XML request simply have to conform to the agreed upon interface (i.e. the
parameter list). Note that there is a cost to dynamically activating,
though I don't know how big the price difference vs. regular activation at
the invocation of the program. The sub procedure getting called only knows
they need to receive in an XML doc, parse it, and provide a response IFS
file back to the requester.


Aaron Bartell
http://mowyourlawn.com

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of matt.haas@xxxxxxxxxxx
Sent: Thursday, October 04, 2007 12:25 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: Business Logic Servers ( was: MVC in RPG?)

Jake,

This topic isn't really language specific coupled with the number of RPG
developers who would buy such a book is why there isn't one of this topic.

Taking this approach, you need to break the problem down into functional
areas and create servers to work with those functional areas (in an order
entry program, you're going to have functional areas like dealing with
customer info, prices, rights, shipping, tax, and inventory) and each one of
these server programs must be able to operate independently of one another.
Any dependencies (like needing to check rights before
prices) would be handled at a higher level than each server.

Another way of looking at this is that you would have a program that deals
with screen I/O and that program would in turn call the functional servers
that you've created to do individual functions.

Matt


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.