A "Rich" Alternative for System i GUI Development
I believe that a System i rich client application should not be a GUI implementation of monolithic 5250 programs which we inherited from RPG III. In general the MVC (model-viewer-control) design pattern is an effective paradigm for System i rich clients. Programs running on the System i provide the business model or domain specific representation of the information which is acted upon. The rich client provides the view of the data / information and controls the user interaction with the model.
Given that you accept this premise, what are the ways in which the viewer-controller (rich client) "talks" to the business mode (System i programs)?
Initially SQL and the JT Open Java Toolbox relational / direct access data classes come to mind. Remember, the premise that rich clients are simple replacements for 5250 programs. The obvious approach to an old dog like me was to read and write files like I'd been doing for so many years. Avoid this trap!
There is plenty of information about the use of SQL in Java (JDBC) so I won't repeat it. The System i Information Center and all the "Java for RPG programmers" books cover the JTOpen relational (direct access) data classes. The JTOpen Java Toolbox also provides program calls (like the OPM model), data queue support and access to several System i APIs. These same knowledge sources cover these topics. In future entries I will show some rich client implementation of these tools.
Here are three other techniques for Java rich clients (and applications) to interact with System i resources that aren't as well document, which you may find useful. I am going to describe them in detail in future blog entries. I hope some of you will comment. Perhaps help make them better. Perhaps challenge them. They are:
- Remote method invocation (RMI) of Java classes on the System i by a Java rich client (or application)
- Remote method invocation (RMI) of Java classes which wrap RPG service programs (JNI).
- Create objects on the System i that represent parts of the business model and serialize them in the IFS. The Java rich client (or application) deserializes the objects and uses them.
Do you use other techniques? Have you other techniques to get data or information back and forth between traditional System i applications and Java programs (rich clients, System i applications or remote applications)? If so please feel free to add your comments.
Posted by Bill Blalock at January 30, 2007 5:55 PM

| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
We welcome your comments and opinions and encourage lively debate on the issues. However, Penton Media reserves the right to delete or move any content that it may determine, in its sole discretion, violates or may violate its Terms of Use or is otherwise unacceptable. For more information, see Penton Media's Terms of Use.