fhs
Volume 9, Number 10 -- March 10, 2009

PHP Saves Company Millions by Refurbishing Old ERP System

Published: March 10, 2009

by Alex Woodie

A $1.7 billion construction company has saved millions of dollars in license fees and years of time by refurbishing a 30-year-old RPG-based ERP system with Zend Technology's PHP development tools rather than buying a new, brand-name ERP package in the seven figures. The two-year programming effort for APi Group of Minnesota paid off when its IT staff replaced all of the old 5250 green screens with Web interfaces, at a fraction of the cost, time frame, and pain of a full-scale ERP migration.

The APi Group was founded in 1926 as A.P.I. Inc, a small insulation contracting company that also distributed machinery. In the 1980s, the company started diversifying its holdings in the Midwest, and took its current name in 1997. Today, the St. Paul, Minnesota, firm is a holding company for dozens of smaller companies in the construction, safety, and fire suppression businesses, employing more than 9,000 people at 150 locations.

The company has grown primarily through acquisition, which has put special stresses on its information systems. More than 20 years ago, when it was a much smaller company with revenues in the neighborhood of $30 million to $40 million, it installed an RPG II-based ERP system on a System 3/x machine to help run its businesses. That ERP system was based on a no-name package developed by a very small software company that eventually went under. But after hiring the main programmer, APi Group succeeded in heavily customizing the package to do exactly what it needed it to do.

The old ERP system worked fine, except for one area--a major green-screen perception problem among the users of recently acquired companies. "There was huge pushback," says John Horner, the company's programming manager. "Even if we bought a smaller company that was running on Quicken or Timberline, to take them from a Windows or Web screens to an old green screen, they would just scream. The learning curve on it was huge. They didn't want to go on it. It was a constant problem."

About four years ago, the company decided it needed a more modern-looking computer system. First, the company considered migrating to a very well-known ERP package developed by a major vendor. However, the cost of the new system and the scope of the project kept growing. "Finally the president said we're not going to pay that much money, and basically pulled the plug," Horner says.

Next, the company decided to try out IBM's modernization roadmap, and see where it led. WebSphere, HATS, and other tools were played around with, but didn't take APi Group anywhere. "To me, it's screen scraping, and it doesn't do much for you," Horner says.

Finally, it was Horner who introduced APi Group to PHP. "When I came in (about two years ago), I had experience with PHP. I put a little demo together on what it can do. They bought in all the way, and said 'We're going to rewrite our application in PHP.'"

In fact, Horner's group of developers would use a combination of Zend's PHP development tools, a strong dose of SQL, and stored procedures written in RPG to completely change how the ERP system presents data, but without altering the underlying logic. They eventually succeeded, after learning some valuable lessons in enterprise PHP development along the way.

Lessons in AS/400-PHP Development

When Horner and his crew of a half-dozen IT workers set out to refurbish the ERP system, they wanted to minimize the impact to their AS/400. "We call a lot of our old stuff for the heavy-duty processing that we don't want to recreate," Horner says. "We don't want to re-create the program that generates paychecks. There's no reason to. Why reinvent those wheels?"

Instead, the focus was on refurbishing the user interface, which brought its own set of complications. The crew set out from scratch, hand-coding each screen to work with the underlying ERP system. With thousands of screens to convert, they quickly found a better way.

"Early on, we took a lot of lumps trying to write all this PHP," he says. "What we were finding is that 90 percent of it is the same stuff. The difference between an employee maintenance screen and a customer maintenance screen is just fields. So we kept building them, creating these building blocks, until we finally came up with these very powerful generators, both on the RPG and the PHP side."

The generators, which were developed in part with help from outside contractors, enabled Horner's group to rapidly generate the new PHP system. The programmers would enter the required information--including which stored procedures to call and which fields they want on the screen--into an array, call the generators, and it would automatically create everything needed, including menus, security, stored procedures, and connections to the AS/400.

"We had to create hundreds if not thousands of programs," Horner says. "We didn't have much of a choice other than to put on our thinking caps and say 'How can we get through this many programs in a short period of time?'''

In the end, the use of generators and the data dictionary enabled Horner and his group to fly through the screen generation. "It was a whole learning process of how this should really be done. I wish we could have started over again, because it would have taken half the time," he says.

As it was, the PHP development effort at APi Group, which is just wrapping up the project's first stage, was completed in about half the time estimated for the ERP migration. What's more, the PHP route was only one-tenth the cost, which corresponds to millions of dollars saved.

A Mix of Old and New

One of the important factors in redeveloping the old RPG program instead of dumping it for something new was the trust that APi Group has for the AS/400 server. "I'm a '400 guy," Horner says. "I love the reliability and robustness of it. It just works. With Zend bringing PHP to the '400, it's the best scripting language in the world with the best database in the world. It's like the best of both worlds."

While the combination of DB2/400 and PHP may be a good one for all sorts of uses, it doesn't eliminate the potentially touchy issue of how best to connect these two technologies. The question of whether to use native RPG techniques or SQL to access data from the AS/400 was a topic of consideration for the APi Group, as it is for every AS/400 developer trying to branch out from the traditional tools.

"We originally started this project on a Linux box, and used an ODBC driver to call AS/400 stored procedures, knowing that Zend was bringing it to the AS/400. We were kind of waiting for that," Horner says. "But there's no way we could have ran this on a Linux box for our whole company, with stored procedure calls through ODBC."

SQL is simply too slow to support the enterprise-level data access needs of APi Group, Horner says. "I keep hearing how great SQL is. We tried to do all SQL, and the lights dimmed sometimes when we ran processes," he says.

There are certain things that RPG does very well, and accessing data from DB2/400 is very high on that list. "You can't beat record level access," Horner says. "You'd have to build the exact perfect index on each file to make it run efficiently [with SQL], versus RPG, which just handles it."

To Horner's way of thinking, it's not an either/or scenario. "You use both of them," he says. "They both have advantages over the other one in certain areas. To me, this is going to save RPG. This is what RPG needed. RPG doesn't present data very well. OK, it's terrible. But what it does is get data efficiently."

APi Group subscribes to Zend Platform, which gives it several capabilities above and beyond the basic Zend Core PHP programming tools. One of these is the code caching mechanism, which helps reduce the load on the AS/400 by pre-caching compiled PHP objects. PHP compiles on the fly, but Zend Platform allows it to perform more like a pre-compiled program.

Even without Zend Platform and the code caching, APi Group's PHP software would run without any problem, Horner says. The company currently, has about 450 users on the new PHP system, with plans to eventually ramp that up to about 1,200 internal users. The current system handles about 25,000 hits a day without breaking a sweat. Just the same, the company is planning to upgrade its current System i Model 520 to a newer machine next year, which will give the PHP system even more overhead.

Horner marvels at the fact that PHP is basically free. Yes, the company spends $7,000 per year to get the benefits of Zend Platform, but the company could turn that off, move to Zend Core (which now ships with i OS 6.1) and not suffer much of a performance hit.

The end effect of being able to Web-enable a 30-year-old, highly customized ERP application for a fraction of the cost of installing a new ERP system is huge to a company like APi Group. "You think about a company like us, which keeps buying companies, keeps adding users. If we moved to [the leading ERP brand], our software cost never goes down. With PHP, we just stamp another company out, and the cost of software keeps going down."

"It's a perfect solution," Horner continues. "It doesn't cost anything. You get somebody who knows PHP, knows systems, knows how stuff should be written and designed--that's what you're going to pay for. To me, it's an absolute no brainer."




                     Post this story to del.icio.us
               Post this story to Digg
    Post this story to Slashdot


Sponsored By
ARCAD SOFTWARE

Experience a New Dimension
in Change Management

                                            · If your current CM can't handle ILE, SQL, .net,
                                               or multi-platform deployment. . .
                                            · If you also need to manage critical data changes. . .
                                            · If your maintenance costs are way up, and
                                               you are getting less in return. . .

We can help. Let us show you how ARCAD's advanced solutions,
large and active R&D team, and responsive customer support will
give you new capabilities and ongoing ROI.
Call for a Web demo today!

800-676-4709
www.arcadsoftware.com
Ask about our migration specials


Editor: Alex Woodie
Contributing Editors: Dan Burger, Joe Hertvik,
Shannon O'Donnell, Timothy Prickett Morgan
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

Sponsored Links

BCD:  Reaching your IBM i Web modernization goals is a lot closer with BCD
WMCPA:  24rd Annual Spring Technical Conference, April 1 & 2, 2009, Delavan, WI
COMMON:  Join us at the 2009 annual meeting and expo, April 26-30, Reno, Nevada


 

IT Jungle Store Top Book Picks

Easy Steps to Internet Programming for AS/400, iSeries, and System i: List Price, $49.95
Getting Started with PHP for i5/OS: List Price, $59.95
The System i RPG & RPG IV Tutorial and Lab Exercises: List Price, $59.95
The System i Pocket RPG & RPG IV Guide: List Price, $69.95
The iSeries Pocket Database Guide: List Price, $59.00
The iSeries Pocket Developers' Guide: List Price, $59.00
The iSeries Pocket SQL Guide: List Price, $59.00
The iSeries Pocket Query Guide: List Price, $49.00
The iSeries Pocket WebFacing Primer: List Price, $39.00
Migrating to WebSphere Express for iSeries: List Price, $49.00
iSeries Express Web Implementer's Guide: List Price, $59.00
Getting Started with WebSphere Development Studio for iSeries: List Price, $79.95
Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
Getting Started with WebSphere Express for iSeries: List Price, $49.00
WebFacing Application Design and Development Guide: List Price, $55.00
Can the AS/400 Survive IBM?: List Price, $49.00
The All-Everything Machine: List Price, $29.95
Chip Wars: List Price, $29.95


 
The Four Hundred
Getting Dizzy from Dynamic Infrastructure

The Economy Gives the Server Biz a Flat Tire in Q4

Infor Battles Customers in Court Over License Fees

As I See It: Isolation

Global IT Spending Barely Ahead of 2008; Some Regions Showing Strength

Four Hundred Guru
A Bevy of BIFs: %XLATE and %REPLACE

Send Messages Unto Others

Admin Alert: Things I learned About IBM Maintenance Contracts

Four Hundred Monitor
Four Hundred Monitor's
Full iSeries Events Calendar

System i PTF Guide
March 7, 2009: Volume 11, Number 10

February 28, 2009: Volume 11, Number 9

February 21, 2009: Volume 11, Number 8

February 14, 2009: Volume 11, Number 7

February 7, 2009: Volume 11, Number 6

January 31, 2009: Volume 11, Number 5

TPM at The Register
AT&T wants to run your data center

Gartner: PC sales, except netbooks, to slump in 2009

Citrix taps VMLogix for fake server jukeboxing

Taiwan bails out memory makers

Lenovo erects Atom tower

Forrester: Fake servers like recessions

HP babysits small biz servers

Dell plays with virtual data centers

Server market gets second opinion on Q4

SGI lays off another 9 per cent

Virtualization soars on Big Blue Power boxes

AMD: 'At heart, we're a design company'

EMC facing DoJ probe

Gartner: PC sales, except netbooks, to slump in 2009

THIS ISSUE SPONSORED BY:

Maximum Availability
ARCAD Software
Guild Companies
Safedata
VAULT400


Printer Friendly Version


TABLE OF CONTENTS
DB2/400 Storage Engine for MySQL Now Available as Public Beta

PHP Saves Company Millions by Refurbishing Old ERP System

ManageEngine Goes On Demand with Data Center Tools

RSA Cracks Down on Security Threats with enVision 4.0

Kisco Adds Fax Support to WebReport/400

News Briefs and Product Shorts:

Blog Food for the RPG Programmer: Tastes a Bit Like .NET . . . HiT Touts Real World Work of IBM i Data Provider . . . New Tip Sheet for RDE and WDSc Programmers Arrives . . . PlanetJ Gives WOW an AJAX Refresh . . . Tolly Report Shows Reflection 2008 Outperforms Competitors, Attachmate Says . . .

Four Hundred Stuff

BACK ISSUES




 
Subscription Information:
You can unsubscribe, change your email address, or sign up for any of IT Jungle's free e-newsletters through our Web site at http://www.itjungle.com/sub/subscribe.html.

Copyright © 1996-2009 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc., 50 Park Terrace East, Suite 8F, New York, NY 10034

Privacy Statement