Thursday, February 10, 2011

How should we be developing applications for the IBM i today?

This is a response to a discussion started by Gary Lewis on Linked In - http://lnkd.in/EUFmNi

We have been working on this specific subject since 1998. Here’s a little historical and contextual framework:

While we have built RPG based re-engineering tools since 1987, in 1999 we started a project to develop tooling to completely re-engineer an RPG application into an event driven MVC model with a web/gui front end. Oddly enough this was inspired after we wrote a tool to put RPG into SYNON at the request of IBM way back then. The objective of the new project was not to just to technically achieve a modern GUI on as/400 based system, but to produce reworked code that was more maintainable than previously, and also adopted the most mainstream technologies for development and deployment.

It has been a long road that includes writing an IBM Redbook on the subject (click here) and various technology/development partnerships including Rational, Oracle, Microsoft, MyEclipseBlue, Fiserv, Mapics, SSA Global, and various other end user companies. We have built technologies for generating View Controller layers in Java Servlets and generated HTML, RCP on Eclipse. Java Swing fat client, JSON/Web2.0 dynamic web client, EGL JSP's, JSP and JSF using Spring/Hibernate, ASP, Silverlight, Flex, and more recently RPGLE. We have tried and tested almost all tactical technologies such as wefacing, emulation, special files, Dynamic Screen Mangement API’s, even CGi as part of the R&D effort. Also know we have assessed these approaches on many of the largest existing as/400 apps on the world, a good number of which are our customers.

Now let me share our findings and evolved best practices by answering your points more directly. These results are not just about technology fads or personal preferences, but the accumulation of literally 12 years of R&D specially on this subject, just so we can build sellable tools reengineer effectively into this new environment. I won’t elaborate on why with all points, but just to give you an example of lessons learned: What we discovered was that when building increasingly sophisticated UI’s as technologies and user requirements advanced, a critical mass was soon reached where the code used to render server generated screens became too complicated to maintain productively. Turn it on it’s head and build the view and Controller in a modern language(using event driven languages tightly integrated with screen actions like VB), and ongoing maintenance and development was much simpler and could be deskilled significantly for typical business apps. The reason target IDE & Technology was a big part of the R&D is that what made the as/400 big in the first place: The development ecosystem productivity PLUS the reliability, scalability etc. So any company that would potentially buy our re-engineering tooling would have that expectation built into the requirement.

Gary's questions included:

How would the application architecture look like?

Model View Controller – VC in any modern UI language, Model in RPGLE-Free, and DB2/i for all the good stuff

Should we just use the IBM i as a database?
no. Business logic/Model layer too

Should business rules be in the DB, stored procedures or application logic?
Application Logic – this can be implemented and used as stored procedures simultaneously. Implementing in the DB works for pure constraints, but the dev tooling and process is slowed down by over engineering where you put business logic

Where should the application logic reside?
User driven and system, Navigational logic in the Controller, Conditional navigation logic in the Model – This should not always be strictly adhered to in all instances.

What language and IDE would you use?
VC : VS2010, MyEclipseBlue, and the one that has impressed us the most in 12 years: Oracle ADF
Model: RDp

DB design - Should we use surrogate keys?
Only on new databases where possible.

1 comment:

  1. This is similar to what I feel. But the question is implementation. How do we create the model logic in RPG?

    ReplyDelete