Nathan
What you suggest is equivalent to run all database maintenance in DFU from
a not secured command line ;-)
Jim
There are no 100 words solutionL, there is however a lot of promises and
immediate Quick Fixes products that may remove your headache for a year or
two without solving the basic problem that is that we have a lot of
different devices connected to us via the internet and those we have to
serve in the future.
On the server side I don’t see any reason to learn old RPG dog’s new tricks
in regards to changing/leaning a new programming language. RPG runs under
ILE and ILE means that RPG can call OO modules written in other languages
if it is necessary. To me it would be a total waste of time. However many
old dog’s should maybe upgrade their skills in RPG if they hadn’t done it
into areas such as /free, SQL, service programs and procedures etc.
The catch here is that by doing so
a. It is fairly close to their comfort zone
b. It is less time consuming that learning a new program language
c. If they change program language, they have to learn /free format
programming and SQL anyway
d. The new methods can be implemented “as you go” and even within existing
code it only requires determination to do it – and occasionally a little
help which there are plenty of on the net.
Changing from 5250 UI to another UI is the big challenge especially if the
task is to create a new UI independent system. Unfortunately modernization
very often ends up in just another UI dependent system with monolithic
programs. Many people think that monolithic is a 5250 phenomenon but it
isn’t, most PHP, ASP.NET, IBM I UI modernization products is as monolithic
as an old 5250 program that has Model, View and Controller (MVC) as an
entity .
The only way to establish a UI independent system is to create a system
based on a Service Oriented Architecture (SOA) and that is I’m afraid bad
news because it is a boring process and even worse – you don’t get any
applause because you have moved a piece of BL from your 5250 program into a
procedure in service program but you risk a lot of criticism if it doesn’t
work.
However it isn’t a revolution because many of us actually are programming
in a SOA without knowing it and has been doing it for years. To give an
example on a SOA in practice it is just to have moved a commonly used price
calculation routine into a dynamical called program or as a procedure in a
service program. The price calculation program/procedure becomes a common
service/resource untied and unaware of who uses it (5250 or a batch
program) – so simple are a SOA even if it sounds complicated!
Somebody will probably attack me and say that this is not SOA because a SOA
requires a common independent messaging system between requester and the
service. I will say that they are lunatics because if messaging by
parameter lists between millions of ILE programs living under
QSYS.LIB/native environment isn’t common, what is then, XML if you want
JSON?
While the protocol between ILE programs are the parameter list, the
protocol in internet based communication may vary. But a key component is
the HTTP layer. In the higher layer is a request made by the HTTP GET
(URI’s) or POST (FORMS) that then result in a JSON or XML message is what I
call device independent messages.
The trick is to remove all the clever “technology strategy noise” because
there isn’t hardly any difference in asking for a price calculation service
in a RPG program, in an OS command or from the net:
RPG Dynamic call
getitmprc(custno:itemno:itemprice);
RPG Serviceprogram/Procedure call
itemprice = getitmprc(custno:itemno);
CL command call
GETITMPRC CUSTNO(&CUSTNO) ITEMNO(&CUSTNO) ITEMPRICE(&ITEMPRICE)
HTTP call with JSON response
http://www.myserver.com/cgidir/getitmprc.pgm?custno=1234&itemno=5678
{
success : true
,itemprice: 125.00
}
And externalize/publish your internal SOA service GETITMPRC can actually be
done in a few statements:
custno = pExtgetVar(‘custno’);
itemno = pExtgetVar(‘itemno’);
itemprice = getitmprc(custno:itemno); // your existing internal SOA
function
jsonNode(‘*object’);
jsonNode(‘*boolean’:’success’:’true’);
jsonNode(‘*string’:’itemprice’:%editc(itemprice:’9’));
jsonEndNode();
echoToClient();
******* YOU ARE NOW LEAVING YOUR RPG COMFORT ZONE AND THE SERVER
************
and the client side may be as simple as this (OO javascript) …
getitmprc(custno,itemno);
if (jsonData.success == false) {
Ext.MessageBox.alert('ERROR', '' +
jsonData.message);
return;
}
if (jsonData.success == true) {
document.getElementById(itemprice).value =
jsonData.itemprice;
return;
}
The principle of KISS (Keep it simple Stupid) still works, but in 100 words
you only get a fairytale :-)
On Fri, Feb 17, 2012 at 11:20 PM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:
From: James Horn
Now if you could just tell me in 100 words or less how to take all those
old front end programs with many formats in each one and make them
stateless in a month.
I kind of sounds like Henrik may have something that generates code based
on your DB tables, which may be of interest to some. But it sounds like
your question is how much can you get done in a month? That reminded me of
a couple things.
How many are familiar with Visual Foxpro? It has a nice interface for
creating "remote views" from ODBC data sources, including ones that connect
to IBM i DB. The "browse" command in Foxpro opens up a very powerful window
for query and maintenance of any DB table, which could theoretically be
used to maintain your database. You could probably set up maintenance
capabilities for hundreds of tables in a month. But would you want to?
You might be able to do something similar in Excel. Each spreadsheet could
link to a different IBM i DB table. Or if you prefer, each sheet in a
tabbed workbook could browse and maintain a different table. Just open a
workbook, then click the tab of the table you want to view or maintain. But
would you want to?
-Nathan
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.