• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Avoiding Mistakes With PHP On IBM i Platforms

    November 12, 2012 Dan Burger

    We all make mistakes. And for those who don’t, I make up for your perfection. There’s value in mistakes. Learning about mistakes is a good way to avoid mistakes. It’s as true with PHP as it is with skydiving. Because a lot of people in the IBM midrange community use PHP, and presumably many more will be learning about it soon, I hope this helps them.

    This is not to say people using PHP for Web application development are more likely to make mistakes or that it is easier to make mistakes in this environment. Please don’t jump to that conclusion. The intent is simply to save PHP developers some time and aggravation.

    The experts providing the advice in this article are Marcel Sarrasin, product manager at BCD International, an IBM i software vendor, and Alan Seiden, a consultant specializing in PHP and IBM i. As I already mentioned, I’ve made some mistakes every now and again. But picking these two guys to participate in this article wasn’t one of them.

    A perfect place to start is with the IBM i on the Power platform. Don’t let the legacy haters undermine the system and existing resources. Everything that needs to be done can be done on this platform and its enterprise-strength database. PHP brings multi-platform capabilities, but it’s an additive. RPG and/or COBOL are the real fuel as long as the applications written in those languages are well structured and well maintained. Throwing away valuable business logic is a mistake. If a company has solid applications, it must also have skilled developers, which makes it worthwhile to stay in that familiar environment. Use PHP to call those programs and make them components in the mix.

    IBM i shops that have decided to move forward with PHP as an in-house development strategy should avoid jumping into deep water immediately. “Pick a modest project that would solve a problem,” Seiden says. “Satisfying an executive need is always a good way to gain support. Don’t go at this alone. Get help. PHP has a very loyal community much like IBM i.”

    In other words, it’s a common mistake to over promise on the scope or time frame of a project and you are limiting yourself by working outside the community.

    A little more in that vein from Seiden: Install Zend Server Community Edition (from Zend Technologies) at no charge to get started. And get a year of free support.

    “Be patient. Don’t feel like you need to be a master to begin with. Start simple like with a script on a static HTML page, add PHP logic, and display information. Don’t be concerned about perfection in a first project. Just get some functionality out there and build some confidence,” Seiden advises.

    In more advanced scenarios when applications are complex, performance becomes an issue and skills are honed to higher degree, but that doesn’t mean they are mistake free.

    Poor coding practices, poor SQL optimization, and poor architecture can contribute to a program that falls short of expectations.

    BCD’s Sarrasin offers this list of advice, avoidance techniques, and tips for greater success:

    • Make sure CSS and JavaScript are optimized. Sometimes they are broken into small, individual files, which causes extra requests to the server, or the files themselves are bigger than necessary and should be minified.
    • Many developers and designers use image files that are way too large for the Web, and cause the page to render slowly. Images can also be replaced by sprites, which reduce the number of requests to the server. For example, when a list of records on the screen all have edit, display, and delete icons, a single sprite image can replace the icons.
    • Cache image files so the server doesn’t have the retrieve the file every time the image is requested.
    • Using gzip for compression can have a big effect on performance.
    • Realize that older browsers process JavaScript more slowly. For best results use modern browsers.
    • Know how to scrub your data and protect against SQL injection and Cross Site Scripting attacks. Locking down ports and using SSL are just some of the other security measures to be aware of.
    • Zend Server allows caching at different levels. For example, it can cache a country and state drop-down list or other types of lists that seldom change. As a result, the rendering is optimized. Zend Server also monitors functions and scripts for slow performance.

    Seiden adds a caution that although PHP is relatively lightweight, a successful public application increases the workload on the system. Plan for adequate IBM i capacity–resources such as CPU and memory–to avoid performance hits. Also take advantage of the performance improvements for DB2 SQL in v7.1. And avoid problems by staying current with releases and PTFs.

    When PHP programmers come from outside the IBM i environment, Seiden suggest trouble can beside-stepped by providing training on the i that includes commands and how to use CL, which he calls “the glue for combining PHP and IBM i.” Avoid situations where PHP programmers are dependent on someone to explain every aspect of IBM i operations. A blending of PHP and IBM i staffs, with each gaining knowledge of the other environment is a far better way to get things accomplished.

    RELATED STORIES

    Zend Expects Biggest PHP Confab Yet with ZendCon ’12

    BCD And Zend Expand PHP Pact

    PHP Web Development Gets RPG Summit Spotlight

    Zend Readies Framework 2.0, Pushes ‘Smart Start’ for IBM i

    Zend DBi Goes GA

    The Long and Short of Modernization



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

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Raz-Lee Security

    Start your Road to Zero Trust!

    Firewall Network security, controlling Exit Points, Open DB’s and SSH. Rule Wizards and graphical BI.

    Request Demo

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    AquaFold Power Tool Gets Hip to Big Data ASNA Unveils Mobile RPG Dev Tool

    Leave a Reply Cancel reply

Volume 21, Number 41 -- November 12, 2012
THIS ISSUE SPONSORED BY:

Infinite Corporation
New Generation Software
BCD
Computer Keyes
IntelliChief

Table of Contents

  • IBM Mothballs QLogic InfiniBand Switches, Power Systems Drives
  • IBM Deals On PowerSC Security Wares, And IBM i Hooks In
  • Big Blue’s Power Systems Get Some Itanium Competition
  • IBM Unveils New LTO6 Gear And A Storwize SAN
  • Where In The World Is Web Query?
  • As I See It: The Many Faces Of Creativity
  • IT Budgets Down In Europe, Up Slightly Globally In 2012
  • Managed File Transfers More Than Meets The Eye
  • Avoiding Mistakes With PHP On IBM i Platforms
  • Cloud Services Revenue To Reach $43.2 Billion In 2016

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Public Preview For Watson Code Assistant for i Available Soon
  • COMMON Youth Movement Continues at POWERUp 2025
  • IBM Preserves Memory Investments Across Power10 And Power11
  • Eradani Uses AI For New EDI And API Service
  • Picking Apart IBM’s $150 Billion In US Manufacturing And R&D
  • FAX/400 And CICS For i Are Dead. What Will IBM Kill Next?
  • Fresche Overhauls X-Analysis With Web UI, AI Smarts
  • Is It Time To Add The Rust Programming Language To IBM i?
  • Is IBM Going To Raise Prices On Power10 Expert Care?
  • IBM i PTF Guide, Volume 27, Number 20

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle