ICS Finds the Sophisticated Side of PHP
Published: May 29, 2007
by Alex Woodie
One of the attractions to PHP on System i is the low skills barrier to entry. Anybody who has written a lick of procedural PHP on any other platform can develop System i applications. But one of the lesser known advantages of PHP is its capability to scale up into the realm of object-oriented (OO) development to create more sophisticated applications. OO development was the basis for an award given to System i consultancy Independent Computer Services (ICS) by Zend, the company behind PHP.
ICS is a multi-faceted IBM business partner based in northern Alabama. In addition to selling System i servers and services, Hewlett-Packard printers, Cisco Systems routers, and Microsoft products, the company develops an RPG-based application used in the diesel engine parts and services industry.
While ICS is well versed in high technology, its own business processes left something to be desired. When one of its 12 to 15 service technicians went out on a call and the customer requested a quote, it required the technician to either call ICS headquarters to get the information or make a note to fulfill the request after returning to the office. The system was largely paper-based--and anything but foolproof. "Sometimes it fell through the cracks, and that's what we wanted to eliminate," says Tim Holt, ICS' software development manager.
The ICS solution was to write a new Maintenance Contract Workflow application that service techs could use while in the field. It allowed customer requests to be entered into the system and to be tracked. The company wanted to make the new application as easy and intuitive as possible to use, so it decided to make it Web-based. The responsibility of developing the new workflow application fell to the company's Web developer, Charles Abbott.
Abbott, like many younger programmers out of college, has more experience developing in languages like Ruby, Ruby on Rails, C++, and PHP than RPG, which he has been writing and learning for about two years. When it came to deciding which development language to use for the new customer service workflow application, which would be developed on a Linux box but eventually run on ICS' System i, it wasn't really a hard decision.
"The biggest reason for choosing PHP was I wanted to develop a framework for future development, and it was easy to code in," Abbott says. "With PHP's object-oriented capability and since it's completely Web-based, it was something easy to write the model-view-controller (MVC) framework."
Object orientation is a fairly recent addition to PHP. Support for data object types was introduced with the release of version 5.0 in July 2004. While most people think of PHP as an easy-to-learn procedural language (much like RPG), developers are increasingly using PHP's object-oriented capabilities to develop more advanced and extensible applications.
Abbott's biggest goal with the ICS Maintenance Contract Workflow application was to create an MVC framework that would install dividers between the application's business logic, its user interface, and its data store, allowing each one to be pulled out and overhauled without affecting the other constituent parts. Abbott spent about six weeks developing the customer service workflow application, with most of that time dedicated to the MVC framework.
When the Maintenance Contract Workflow application was done, Abbott had created a way for ICS users to create and access maintenance contracts from a Web interface. The application keeps track of the various lifecycle stages of a contract, and makes it easy for users to download PDF copies of the contracts and make changes if necessary. It also alerts key personnel of changes in the stages of contracts using automated e-mail functions and PDF documents, and if a contract stays in one stage too long, the system takes steps to notify users that things are lagging. All user-facing screens use AJAX techniques to keep the screen-refresh times low and force it behave like a locally running, fat-client app.
In April, Zend issued its PHP Innovation Challenge. When Abbott saw the news, he decided to enter the contest. "The day I saw the newsletter, I contacted Jim [Dillard], the IBM alliance manager at Zend. "I poured a lot of my heart into that, the framework mostly. Honestly, I didn't expect to win. I knew there would be some tough competition out there."
As it turned out, Abbott was the tough competition. Because so few System i developers are using PHP's object-oriented capability yet, his sophisticated Maintenance Contract Workflow application stood above the rest. Abbott's prize for winning the top award, as judged by a panel of experts from IBM and Zend, is a free 19-hour course on PHP that would normally cost $800, in addition to the public recognition of his achievements.
Dillard, who was one of the judges, says the folks at Zend were not expecting such sophisticated PHP applications running on System i so soon. "I wasn't expecting any object-oriented PHP applications until later this year," he says. "If you look off this platform, plenty of people are using MVC and OO capabilities."
Abbott's achievement is a testament to the flexibility and power of PHP, Dillard says--the flexibility to start with simple procedural syntax, and to gradually build up to more powerful and sophisticated applications using OO capabilities. Other languages are not so forgiving, he says.
"If he had used Java, he would have had to jump to this level," Dillard says. "One of the stumbling blocks of Java is its OO capability, whereas one of the things people like about PHP is its simple and fast and easy to use, and provides a way to get to OO."
Abbott's experience with creating the Maintenance Contract Workflow has benefited ICS, too. The company, which is moving the application from Linux to i5/OS, plans to use the framework as a basis to build more internal business processes, and it also gave ICS the confidence to move forward with modernizing its green-screen diesel engine and parts applications with PHP.
For Abbott, the experience has given him confidence in his own abilities and a newfound respect for System i's capability to run PHP. "When I was first introduced to the box, I was a little scared of it," he says. "After I got used to it, I really enjoyed it. I think it's a great fit. I believe PHP can be used to write good business logic."
Post this story to del.icio.us
Post this story to Digg
Post this story to Slashdot