10Dec/12

The Great RPG Programming Survival Guide . . .

By Pete Helgren

Guest Blogger: Pete Helgren, Programmer/Team Lead at BSF International

“Knowledge is good” was the motto of the infamous Faber College in the movie Animal House and to us midrange folks, it’s a motto we can take to heart. If you’ve been around the midrange community since the late 1990s then you have either faced, participated in a discussion about, or took a stab at what has been euphemistically called “5250 modernization.” If you haven't, you’re probably near retirement, or you’ve already retired (whether you’re on the job or not!). The fact is, the world has changed quite a bit since the S/36/38 and early AS/400 days and if you’re not dealing with users who are demanding GUI applications then you’re very lucky indeed!

Even for those who breathed a sigh of relief when they managed to jump on the GUI bandwagon with something like VisualAge RPG the respite was short. Soon it was the Web interface that commanded our programming attention and then, nearly an instant later, mobile applications. There were plenty of programmers who bailed at this steep learning curve and went back to PORPG (plain old RPG). I can't blame them, it's been a “drinking out of the fire hose” experience for me during these years and there have been times when I said, “Enough!”

But during these economic times you certainly want to be marketable, at least until a realistic retirement age (like 70 or 80), so the challenge is to pick “winners” in the great “Programming Survival” game. You don't want to be voted off the Island too early. So you'll need to adopt the motto “knowledge is good” and act on that motto to survive.

Here are my 2012-2013 “Good Knowledge” programming picks and why:

JavaScript – This client-side language, which was much maligned earlier in this century, has made quite a comeback. The JavaScript libraries that are available now have smoothed the difficulties in making Web apps work across browsers. We’ve moved back to the client/server, multi-tiered solution but rather than dealing with proprietary “fat clients” our fat clients now have names like Firefox, Safari, Chrome and Internet Explorer. Standards have made the job of scripting easier – and with the newer HTML5 standards, it’s amazing what can be done on the client side.

AJAX – No client/server solution should be without it. It’s the communications technique of choice when it comes to exchanging data with a server.

JSON – If you’re a heavy user of JavaScript you might as well complement that with data that comes back as an object when parsed at the client. Honestly, if you use JavaScript you ought to be using JSON to format your return data (or sending data, for that matter).

You Have Options

That trinity of programming power should be in your bag of tricks, but what’s an RPG programmer to do? Well, you have options!

1.) Learn JAJ (JavaScript, AJAX and JSON) by the seat of the pants. This has been my style for the past 20 years and it serves me well. The Internet offers a ridiculous amount of information on the three tools above and you'll have more examples (good, bad and ugly) than you can possibly deal with.

2.) Learn JAJ by formal instruction. I’m a classroom learner so when I’ve gone as far as I can go with the “seat of the pants” approach, I take classroom instruction. Web delivery of instruction is rapidly improving, so it’s become a great secondary way of technical instruction. I like to annoy my instructors in person, so I tend to lean to the classroom side.

3.) Stick with RPG! Yeah, you can do that too and your learning curve will be much smaller than a full-blown foray into new languages. Depending upon the approach, you may have more or less success in avoiding JAJ.

The Best Way to Get Started

Ok, approach 1 and 2 are going to require a great deal of flexing of the synapses. So what is the best way to get started? The best way to get started is to check out www.w3schools.com. This is a great site for just about anything that involves Web development. Even if your plan is to “go mobile” in your development focus, you can't avoid the triumvirate of JavaScript, AJAX and JSON. Bite the bullet and jump in.

Option 3 has its own challenges and you can avoid a steep learning curve by carefully choosing among the different approaches. Web development is very possible in RPG and a popular approach is CGIDEV, which is an open source project authored by Giovanni Perotti. I recently wrote a series of articles on mobile application for iProDeveloper.com and CGIDEV figured into the mix nicely when sticking with RPG. Giovanni has a bunch of other RPG/Web utilities on his site, so check them all out. There are also a few other RPG-based Web frameworks such as powerEXT and OpenRPGUI.

Mobile Apps

Mobile apps can be either a custom tailored Web app, designed for a mobile user or a native application, one that runs as a client on a mobile device and may or may not have a server-side component. I’ve found that the open source Cordova project (also known by its prior name: PhoneGap) is a great way to get long mileage out of a mobile Web application by taking it native through a clever use of its framework. You can create a Web application and then Cordova can put the finishing touches on it to take it native. Lots and lots of choices here but if you go the open source route, be ready for a wild ride! There is no way to avoid the need to constantly update your skills and your code base if you stray into the world of open source. While I was finishing up the content for a session for the fall COMMON conference I had to change version references (and code) twice! Release levels are a constantly moving target and just when you settle with a stable version, a new version is released that has some new feature you have been waiting for. DOH! Open source requires vigilance and constant learning. Be ready (for me, that’s where the fun is).

In general, most mobile Web development tools require you to learn HTML, JavaScript, CSS or PHP and most native mobile Web development require you to learn Java (for Android devices) or Objective C (for Apple devices).

But what if you’re a RPG programmer and your users are asking for an affordable integrated mobile solution that can run on Apple and Android devices and you really don't have the time to learn new skills first? Well, I'm constantly on the lookout for new IBM i-based solutions and I tripped across a solution from LANSA that you should know about. Although I had heard about LANSA in my midrange comings and goings, I never worked with their development tools. When I heard they had a native mobile app development solution they immediately came back on my radar. If you are a RPG programmer, then take a look at LongRange. This is a very cool framework/tool that pretty much eliminates the need to learn JAJ, HTML, CSS, PHP, Java or Objective C (and there is no LANSA language involved either, just RPG or COBOL). I've used the tooling for the iPhone and it is pretty sweet. I haven't yet tried it with Android. They also have a free tool called LongReach that allows iPhone users to access shared data on the IBM i

So, get yourself some “good knowledge” and tools then get out there!


Related Posts

About Pete Helgren

Pete Helgren is Programmer/Team Lead at BSF International, with over 25 years of system 3X/AS400/iSeries/IBM i experience – including extensive knowledge in the ILE RPG, PHP, Java, Ruby/Rails, C++ and C# languages. In addition, he’s a GIAC (Global Information Assurance Certification) certified Secure Software Programmer-Java and an MCSE (Microsoft Certified Solutions Expert). Pete is currently Secretary of the COMMON Board and is active on several COMMON committees. His passion has always been in system integration with a focus on Open Source applications and integration activities on IBM i. Pete is a frequent speaker/trainer in RPG modernization, Open Source integration, mobile application development, Java programming and PHP and actively blogs at petesworkshop.com.
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.