Top 5 Reasons RPG Programmers like PHP
Date Posted: April 27, 2010 12:00 AM
Author: Jon Paris

I've been teaching PHP to RPGers for several years now, including my current series for System iNEWS. As a result I often receive emails from RPGers who "gave it a try" telling me how much they are enjoying this new world and describing their successes. As a teacher this is gratifying to hear, but it came with the realization that I don't recall receiving the same kind of stories from those to whom I had taught the basics of Java many moons ago. Given that IBM put a lot more money and effort into promoting Java to RPG programmers than they did with PHP, that got me wondering why PHP appears to have been so much more successful among RPGers than Java.

The following briefly summarizes my current thoughts on the subject:  

1. You can use PHP without rewiring your brain

What I mean by this is that if, like me, you have many years of procedural programming under your belt, the hardest thing about a language like Java is not the syntax, but rather that to be successful in Java you must understand and "think" in Object Oriented (OO) terms. While I understand OO in conceptual terms, I still can't think in it. If I could devote myself to doing nothing but OO programming for about 6 months that would probably not be a problem, but that is a luxury I don't have. PHP lets me program in a fundamentally procedural fashion while still allowing me to utilize the multitude of OO functions built by others.

2. PHP Programmers focus on getting the job done

When you talk to PHP programmers (via internet boards or in person) you'll find that they, like RPGers, tend to focus more on getting the job done and less on "architectural purity." Not that there aren't (rightly) such discussions, but it seems to me that with some languages the debates take so long that the requirement is obsolete by the time the architecture is finally in place.

3. Easy access to new technology

As new technology emerges it appears very rapidly in PHP. As a result, PHP literate RPGers can now say, "Yes, I can do that," to their users rather than the more familiar, "Sorry, RPG can't do that." And before anyone jumps up and says that RPG can do anything--yes I know--as one of the first RPGers to call C functions directly from an RPG program, I am very familiar with the techniques. However, most of us don't have the skills of, for example, a Scott Klement to dig into the underlying technology and work out how to surface it in RPG. As a result, even when such support appears, it is often many years after it has appeared in languages such as PHP.

4. PHP's error handling model is familiar

PHP's basic attitude to error handling resonates with RPGers. Namely, you can do as much or as little as you want. If you want to leave everything to the default error handler you can do so. Or you can direct all errors to the PHP equivalent of a PSSR. Just as in RPG of course, such broad brush error handling is rarely a good idea--but it does let you get scaffold coding in place quickly without having to worry about every little error that some other programmer decided you needed to handle. For more granular control, you can use PHP's try/catch which operates in a similar manner to RPG's Monitor/On-Error

5. RPGers like free things

And I don't mean "free" as in /Free--although most like that too. What I mean is that RPGers appreciate the huge amount of free educational and mentoring support that is out there in the PHP world. If you want to understand what I mean, take a look at the PHP manual at PHP.net. In particular check out the page on using the array() function to create an array. Notice how many user supplied examples there are? This is incredibly useful when you are trying something new. All of my early work on using web services came from examples such as these. When you exhaust all of the free resources (as if you could!) you can walk into any major book store and find 10 or 20 different PHP books on the shelves. That's a pleasant change!

Of course "free" doesn't end with education. There is a huge range of high quality PHP software out there for the taking, too. Big names like SugarCRM and MediaWiki spring to mind. If Mediawiki's home page looks familiar, you might consider that this free software is the driving force behind Wikipedia.

And there's more. . . .

Other features that attract RPGers to Zend's IBM i PHP implementations include the ability to manipulate data areas and data queues, access spool files, and much more. Even record level I/O is supported in addition to SQL-type access. You can also call your existing RPG programs and subprocedures. What more could you need?

We've barely scratched the surface here, but hopefully you get the idea. For more of my thoughts on the subject--or simply to gather ammunition to help persuade your management to move forward with PHP--you might also enjoy reading "Attention RPG Programmers: PHP Spoken Here," which is an article I wrote that appeared in the January 2009 issue of System iNEWS.


Jon Paris has been involved in IT for 40 years—his experience covering the spectrum from operations to compiler design. Jon joined the languages group in IBM's Toronto Lab in 1987, where he was involved in the launch of the AS/400. In early 1989, Jon was assigned to the architecture and planning group with responsibility for Cobol and RPG languages. He was one of the "fathers" of RPG IV and played a major role in its design. Jon left IBM in 1998 and with his partner Susan Gantner now runs Partner400, a company focused on developing and delivering application modernization education in the IBM i world. Partner400 is also a member of the System i Developer educational consortium, which runs the RPG & DB2 Summit conferences. Jon is a frequent speaker at user group meetings and conferences around the world and has a number of speaker excellence awards from COMMON.


Want to use this article? Click here for options!
Want to subscribe? Click here!
There are no comments to display. Be the first to add your thoughts!
You must log on before posting a comment.

Are you a new visitor? Register Here
 

around the forums

better data access for AS400 applications
Forum Name: Systems Management
21 May 2012 06:22 AM | Replies: 0
Selection error involving field *N.
Forum Name: SQL, Query and Database
18 May 2012 02:19 PM | Replies: 6
WINDOWS 7 with CLIENT ACCESS 7 R1
Forum Name: Communications/Networking
18 May 2012 08:43 AM | Replies: 1

ProVIP Sponsors

BCD

Join Our Community!

Subscribe today to iPro Developer! iPro Developer is packed with technical know-how for developers of IBM i, iSeries, AS400 and System i. Sign up now to get your full subscriber benefits including:

  • Code available for download
  • Full access to the online article archive (including all System iNEWS ProVIP content)
  • Downloadable ebook with past 6 months of articles
  • Discounts on eLearning classes, self-paced training, in-person events, and more!
iPro Developer Newsletters
  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips