Should You Teach an Old Dog, New Tricks?

My mother has two Irish Setters, Laddie and Katie. Laddie is an old dog. He has problems with his joints; he can barely get up off the floor on his own; even walking is painful for him. Katie is a young dog. She is lively; she runs around playfully; she greets my mother by jumping up and licking her face.

RPG is the old dog near the end of its life -- Java (on the AS/400) is the young dog just coming into its prime.
Due to Laddie’s condition, my mother has to stay pretty close to home. Laddie is a “high-maintenance” dog. He can no longer go to the kennel if my mother has to go out of town. In my opinion, he is more trouble than any dog is worth. Of course, my mother considers no course of action other than making Laddie as comfortable as possible until he passes away, in his sleep, lying peacefully on his fluffy dog bed. It will be a sad day when this happens, but it is inevitable, as we all know that all things must eventually come to an end.

You may wonder why I’m telling you about my mother’s pets. Well, to me, Laddie is analogous to RPG and Katie to Java. RPG is the old dog near the end of its life. Java (on the AS/400) is the young dog coming into its prime.

For a long time there has been debate in the AS/400 community about RPG and whether it has outlived its usefulness—especially in a world where, increasingly, applications need to be deployed to multiple interfaces that include green screens, the Web, and client/server GUI.

For the same reasons that RPG is a great language for implementing 5250 interactive applications, it is not so great for implementing client/server GUI applications. There have been attempts to make RPG more suitable for creating server-side applications that can be accessed through multiple interfaces, Web and otherwise, but these attempts have achieved only limited success.

In the article entitled “RPG’s Place in the Revolution” in the February 7 issue of MIDRANGE Systems we looked at how RPG could be used in concert with Java to build modern e-business applications, and the author, a former member of the RPG architecture team at IBM, came to the conclusion that both RPG and Java have a place in the modern AS/400 shop.

In this issue, Mark Buchner, MIDRANGE Systems’ application development columnist and noted expert in the area, takes a divergent viewpoint. He dissects the genesis of RPG, why it was a great language in its time, and why today, you should seriously consider abandoning RPG for a more modern language. Although Mark concludes that Java is the new dog, he emphasizes that it is Java’s object-oriented characteristics—as well as its “write once, run anywhere” environment—that makes it an ideal language for AS/400 shops with an eye toward the future.

For years computer science academics have been saying that object-oriented technology and component-based development were the next big thing. Yet, since the principles of object-oriented programming were pioneered by Alan Kay and Xerox’s PARC team and their Smalltalk language, only a small cadre of programmers has embraced true object-oriented programming.

So why move to object-oriented programming now? As Mark Buchner says, “Timing is everything. Like many technologies, the compute power, technical infrastructure (operating systems and middleware), and basic agreements among interested parties (standards, both agreed to and de facto) were not there in the past. They are today.”If object-oriented programming techniques were in wide use in the 60s and 70s, when all of that non-Y2K-compliant code was being written, an untold amount of money and time could have been saved. To fix the Y2K bug in an object-oriented application, all you would have to do is change the implementation of the date object to support four digits, instead of two. Any object that referenced the date object would then automatically take advantage of the new implementation. Presto! No Y2K crisis. Certainly this is an oversimplification of the fix, but I think you get the point.

This reason alone should be compelling enough to prompt many people to consider switching to object-oriented programming. If you need more convincing, consider the increased productivity of object-oriented programming—compared to procedural programming—due to its reuse of objects.

Just as the demise of the COBOL language was predicted many years ago, saying that RPG has reached the end of its useful life is most likely premature.

In any case, a prudent IS manager should take all the evidence under advisement and choose a programming language based on its strengths and weaknesses. I am not saying you should give up RPG, but please don’t rule out Java either.

Related Editorial:

  • Application Development Moves Forward with Objects
  • "Virtual RPG Machine" Will Aid Porting
  • Must Read Articles