Published on System iNetwork (http://systeminetwork.com)
The Inevitable(?) Rise of PHP
By rsanders
Created Feb 12 2009 - 18:16

PHP should be the language of choice for dynamic web apps on IBM i
By:
Chris Maxcer [1]

As any longtime IBM i-focused pro knows: technologies, languages, frameworks, and strategies come and go, but core RPG holds strong—a foundation forged from unflappable business logic. That is not to say that even the most modern RPG-developed applications won't face challenges or opportunities, but still, it's clear that in some organizations the RPG foundation isn't set to grow; and moreover, it might even have to survive a jackhammer or two chipping away at it.

This is where PHP can come to the rescue.

And isn't that—come to the rescue—a loaded phrase? You bet it is. It paints a picture that is entirely false for many companies who understand and value their RPG applications, and yet it's also true. Somewhere in between the extremes of green-screen love and rescue lies the real power of PHP.

What Is It?

PHP is a widely used, general purpose scripting language for web development. You can embed it in HTML, build dynamic, database-driven web pages, and create standalone graphical applications. It's relatively easy to learn and use. More than 22 million Internet domains deploy PHP, including Yahoo! and Facebook. The total PHP developer community is estimated at close to 5 million, and it includes a rich application ecosystem with thousands of free and open source PHP applications.

We've been covering PHP for about three years—a little when Zend Technologies started offering its Zend Core for i5/OS in 2006, and a lot more as i-focused pros have caught on. (If you missed Jon Paris's "Attention RPG Programmers: PHP Spoken Here [2]" (ID 62702), dig up your issue and read it ASAP.)

In the meantime, more than 12,000 IBM i customers in 150 different countries have downloaded Zend's PHP solutions for running PHP apps on IBM i.

Making the Leap from Useful to Ubiquitous

While PHP can be useful to i-based organizations, there's a big leap between installing it to run the free help desk software solution Mantis/400, for example, and leveraging PHP as a strategic language on IBM i. Still, there's a growing sense that while PHP has a long way to go—awareness is still remarkably low, it turns out—we very well may be on the cusp of the next (real) big thing to hit the IBM i programming world.

Before PHP can promise answers, what are the questions? Why is PHP so cool? Where does it fit? Will it replace RPG? (Was that a real question?) And what about the Big Blue trojan horse? There are so many questions; here are a few answers.

Will PHP Replace RPG?

We should get this notion straight right away—PHP is not going to replace RPG. So where does it fit?

"It is a collaborative thing with RPG just as it is with Java. There's never been a valid reason to throw away good RPG code—or skills for that matter. RPG is still a terrific language for business," says Jon Paris, an RPG expert and former IBMer who provides mentoring and education consulting.

"But," he says, "it is unlikely that IBM will offer a direct RPG web interface—or if they do it will not be in a meaningful timeframe. In fact, I really wish they would either give a definitive 'Yes' or 'No' to a native UI with direct RPG support. There are so many users deferring moving to PHP in the hope that IBM will expand RPG and 'save' them," he explains.

One of the early proponents of PHP is Mike Pavlak, who first put the promise of PHP to work while he was the director of information services for Trippe Manufacturing. Zend noticed his passion as a proponent for PHP and snapped him up. He's now a solutions consultant for Zend.

"If PHP replaces anything, it would replace DDS," Pavlak says. "Let's all have a going away party for DDS. SQL-DDL can replace DDS for physical files and logicals, PHP and HTML can replace DDS for the interactive processing. Oh, and for the half dozen or so of you out there who use DDS for reports, there is this thing called the 'print' button on the browser," he says.

As for RPG, PHP will complement, not replace, RPG. "There is way too much intellectual property languishing in billions of lines of RPG code to just throw it away," Pavlak says.

How Does PHP Complement RPG?

"I see customers doing all kinds of things, but the most prevalent is restructuring of applications to take advantage of PHP as a dynamic and graphical front end," Pavlak says.

"For example, one customer has taken PHP and written web service calls back to the green screen for a specific business process. The green-screen process was extremely stable, and they did not have to reinvent the wheel. I was just chatting with my sister who works for a company that is migrating folks from Oracle on VAX to Linux. She told me that she is having trouble getting representatives from the user community to test the applications and get the systems migrated. In this economy, with millions laid off, I am not surprised. So why put all those folks through the pain and suffering of a full-scale testing cycle when all you really need to do is test the UI? Don't change the business logic, just make it look better, contemporary, and relevant," he explains.

"OK, I hear you green-screen guys out there touting the wonders of the green screen. I love it, too. There's nothing I'd like better than to go back to dumb terminals, but the ship has sailed, and like Kodak film, it is time to get over it and get with the contemporary technology—use the green screen where appropriate and use the browser everywhere else!" Pavlak says.

ibuildings, a company in the Netherlands that offers PHP services, training, application development, and professional services, has recently started investing in IBM i-focused knowledge and experts. The reason? The company is seeing increased demand for PHP in the IBM i world. But, for what, exactly?

"Currently, we see PHP on System i being used by early adopters and those that in some way were already familiar with PHP. I believe that PHP stands a good chance of becoming one of the major platforms for web-enabling System i applications," says Ivo Jansch, CTO of ibuildings.

What Makes IBM i Work Particularly Well with PHP?

"There are a number of factors that play a role in the rise of PHP on System i. First of all, there is an increasing demand to create web interfaces for traditional System i applications, and PHP is one of the most used languages for web development," Jansch explains.

"Second, PHP on System i comes with a set of tools that allow it to not only build a web front end, but to seamlessly integrate elements of the System i environment. PHP can directly manipulate job queues, talk to the DB2 database, run RPG programs, and even read and manipulate traditional green-screen applications directly from the code," he adds.

"The third, and perhaps most practical reason, is that PHP is easy to understand for System i developers. The difference between, say, Java and RPG/Cobol is huge, and RPG and Cobol programmers struggle with adopting a language like Java. PHP, on the other hand, is a lot closer to what they are used to. In PHP, you are not forced to program object oriented like Java, but you can start out procedurally and gradually learn the language. This means that the learning curve for PHP for System i developers is much less steep," Jansch says.

This last point is worth saying again: RPG programmers can build PHP code procedurally and slowly ease into object-oriented concepts—if, and when, they want to take advantage of OO strategies.

For Paris, PHP is all about achievability: "Many RPGers like myself will never get to grips with Java to the degree that is needed to build the next generation of applications, but they can deal with PHP," Paris says.

Is PHP Really Free?

Most free and open-source solutions come with an interesting problem for enterprise users: the core software is usually free, but who's going to support it? What happens when a scattered open-source community releases new versions? Will something break?

The enterprise answers come from companies that build expertise and bundle the solutions for easy consumption. They make money not by selling the software, but by selling add-on services (installation, support, education, etc.). And such is the case with Zend.

Zend Core for i5/OS basically is a certified PHP distribution that includes PHP bundled with Zend Framework, Apache, MySQL, and i5/OS-specific resources with an automatic and configurable update mechanism. Designed specifically for IBM i, Zend Core for i5/OS includes an i5 toolkit to access DB2 and applications running on IBM i. As for support, the company offers a few different levels.

With or without support, it's hard to beat the low cost of entry into PHP programming on IBM i. And that, it turns out, is contributing to the rise of PHP.

"You do not need me to tell you the economic meltdown is occurring worldwide. There is no country, that I am aware of, that has not been impacted," Pavlak says. "The economy is driving CIOs to cut costs. With less immediate cash rolling around, open-source solutions end up looking really attractive."

In terms of IBM i, he says, "When you can minimize the risk of moving to a new solution by staying on the same hardware you have trusted for years, there is tremendous value."

Plus, the cost to develop PHP apps on IBM i is compelling.

"IBM is all about giving PHP away. I mean, you have to pay money now—per seat—to develop solutions in RPG and Java using IBM tools, yet it costs the i5 customer nothing to develop solutions in PHP," Pavlak says.

What about RPG and PHP Developers?

For some RPG developers, there's little need to learn PHP. For others, it may be critical; though the idea is to leverage their existing skills (and salary) to continue delivering valuable business tools. Few RPG programmers would be interested in leaving their jobs to churn out cheap PHP code just because it's trendy.

However, there's a possible risk here, too. A CIO could start running a PHP-based application and hire low-cost PHP "experts" to keep it running or to add enhancements. Meanwhile, graybeards retire or get laid off.

There's also the flip side: IBM i-based companies that are looking for their next generation of RPG experts but aren't finding them.

"Despite IBM's best efforts, replacing those resources with entry-level RPG folks just isn't happening quick enough," Pavlak says. "But starting a PHP developer, fresh out of school, under the guidance of a veteran RPG/i5 developer can yield tremendous synergies as they both learn from each other. I truly believe this can be successful, but management must be firm and have patience because the RPG developer did not learn RPG overnight. And while PHP can be much easier to absorb than Java, it will still take time and effort," he explains.

It's Not Just a Zend World

Of course, it's important to note that while Zend is the key enabler of PHP in the IBM i world, the ecosystem is growing. The most prominent example of this is BCD's WebSmart PHP, which is a rapid application development tool that generates PHP code. It includes a variety of tools, templates, and wizards to make developing PHP applications easy and fast. The point? Obviously, previous BCD WebSmart ILE customers now have a transition product to add PHP applications, but others have options that can help them create PHP code quickly through tools conceived with RPG developers in mind.

The Big Blue Trojan Horse

It turns out, there really is a Big Blue trojan horse. As of February 5, IBM started preloading Zend Core as an installation image included with IBM i 5.4 and 6.1. This move covers several important angles. First, it signals that IBM truly sees Zend Core and PHP as valuable technologies for its IBM i customers. Action talks louder than words, right? Second, by offering Zend Core preloaded (customers have to install it themselves) IBM is breaking through a barrier of entry. The barrier wasn't cost—Zend Core for i5/OS was free before—the barrier was difficulty or perceived difficulty in getting an installation image onto a company's System i. Some customers ran into corporate hurdles that either stymied the download and installation or provided enough of a pain to stymie programmers who wanted to try it.

IBM and Zend are including one year of Zend's Silver support, which offers web-based support, hot fixes, and product updates. Zend Core will continue to be licensed and supported by Zend Technologies.

Odds are, this move will result in an appreciable boost of PHP action in the IBM i world.

But inevitable? We'll see.

Chris Maxcer is news editor for SystemiNetwork.com. "Jon Paris made a comment that didn't make it into the body of this report, but his point is a good one," Chris notes. Here's the comment: "So much depends on whether IBM unambiguously supports PHP, or not. If the message from IBM is simple, for example, 'Don't wait for us to update RPG—use PHP if you don't feel Java is for you,' then PHP could become very widespread."

© 2010 Penton Media, Inc.

Source URL: http://systeminetwork.com/article/inevitable-rise-php

Links:
[1] http://systeminetwork.com/author/chris-maxcer
[2] http://systeminetwork.com/article/attention-rpg-programmers-php-spoken-here