Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
Scott,
I appreciated your well considered reply. It motivated me to track
down various IBM i manuals, redbooks, and articles, and do more
reading about stored procedures and UDTFs.
I also pulled out the source code for an RPG program I wrote 20 years
ago, which I think is still in use today at about 250 credit unions
in the US, and supports over-the-counter teller transactions. The
program uses about 30 database tables and 1 5250 display file. And I
considered what it might take to separate the code, so that the
database I/O and business logic could be evoked by say a PHP client.
I concluded that it would be a lot easier to separate the screen I/O
and application control logic, from the business rules and database
I/O, than to rewrite the business logic in PHP.
This is more for Eric Lehti's benefit and others who may be
considering marriages between PHP (or something comparable) and RPG.
If I were modernizing a CRM package, I'd use my own ILE framework for
handling browser I/O, and database I/O. And drop the notion of a
marriage between PHP and RPG.
Stored Procedures and UDTFs do seem like a viable option, but may
extract enough pain, that folks may flip-flop back and forth between
the alternatives of building stored procedures or just rewriting the
"business layer" in PHP, depending on the particulars of each
situation.
In business applications, the same tables are used for both inquiry
and maintenance. And may or may not include calculated field values
where the logic would be easier to implement in stored procedures as
opposed to SQL selects. With stored procedures, both input and
output parameters are passed on the same call. And depending on
whether the database is used in an inquiry or maintenance context,
the call-level interface may change. So you end up writing multiple
stored procedures, or extending parameters to cover multiple
contexts.
So it seems to me, that in the long run, if one were really bent on a
marriage between PHP and RPG, something of a client-server
request-response protocol would be better. Where the structure of
requests and responses were more flexible. And where the state of
RPG servers might be persistent for individual users in some
applications, but support multiple users in other applications.
Nathan.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 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.