IT DRILLDOWN
 
NEWSLETTERS
 

CIO.com updates, insights and advice on technology, management and your career.

 
 
 
LEADERSHIP
 
CIO Executive Programs
The Leader in Face-to-Face Education for Senior Executives

Offering regional and national programs, CIO (and CSO) events bring together some of the most respected names and thought leaders in information technology and security. Presented by CIOs and other senior level executives, these invitation-only programs offer timely topics and strong networking. Learn More »

 
CIO Executive Council
A Peer-Advisory Service and Professional Association for CIOs

Portfolio Management Maturity Model at Chevron - Presentation & Discussion

November 13, 11:30 AM - 12:30 PM ET (GMT-4)

The fundamental goal of the model is to help IT become a business partner and earn a seat at the table. Core to the model is to establish a five year IT strategic road map that is owned by the business. Presenter Janinne Franke is manager of strategy, planning & optimization at Chevron's corporate department & services. She will share processes and lessons learned from developing and implementing the model.

More / Register »

Learn more about the CIO Executive Council »



 
 
RESOURCE CENTER
 
 
 
SUBSCRIBE TO CIO
 
Are you involved in setting the direction for your company's IT budget or strategy?

Apply today for a FREE subscription to CIO Magazine!

 
 
 

PHP's Enterprise Strengths and Weaknesses, Take 2

Zend's John Coggeshall responds to CIO.com's earlier PHP article with his own list of the Good, the Bad and the Ugly of PHP application development.

 

March 14, 2008CIOEditor's note: Some readers disagreed with the points made in our previous article, You Used PHP to Write WHAT?! in our series of the pros and cons of each dynamic language. We invited John Coggeshall, senior member of Zend Technologies' Global Services Group, to provide his own enumeration of the dynamic language's suitability for enterprise computing—both its advantages and disadvantages.

Just as a carpenter will tell you that it is much better to use a screwdriver rather than a hammer to secure screws into a wood plank (although arguably both would work), an experienced programmer will say that certain languages are better than others at certain things. So, in the digital toolbox of the developer, where has PHP been designed to work best? And where is it, perhaps, not the best tool for the job?

PHP was designed to solve what I (and others, such as PHP's creator, Rasmus Ledorf) call "The Web Problem," by which we mean the challenges found in the creation of dynamic server-side applications on the Internet or on an intranet. PHP was created to—and continues to evolve to—solve this single problem, which perhaps is the biggest reason why it's been a (if not the) Internet programming language of choice for such a long time. In fact, PHP is the fourth most popular programming language in the world, according to the TIOBE Programming Community Index, above C++, Perl, Python and Ruby. (In all fairness, this probably represents the reality that more people are writing web applications and are turning to a language designed to solve that problem.)

While other languages can surely be used to solve The Web Problem, in this article I explain why PHP is the premier solution for server-side Web scripting.

The Web Problem and PHP

Unlike most programming languages, PHP was designed to function within the challenges of Internet development, which include statelessness, heterogeneousness, typelessness, and the short shelf life of transactions (that is, after all: a typical Web request lasts only a fraction of a second).

For example, PHP is a loosely typed language, which means a variable can switch from one data type to another. This is often a point of criticism for PHP, as developers coming from a traditional background would consider such a behavior sloppy and unpredictable. However, for The Web Problem, such behavior makes sense; after all, the data has no type coming in or going out so why should it have a fixed type in between? The biggest reason might be to add rigidity to the application, but I would argue such rigidity applies only to object oriented programming itself—and to that end PHP does support type hinting for complex types (such as classes, arrays and interfaces).

The Web's stateless nature affects one architecturally significant difference between PHP and other Web languages. Without state, your "Web application" isn't really an application at all. Rather, it's a collection of atomic, individual and completely disparate scripts working in unison to represent a holistic application with no direct way to communicate with each other. To further complicate the matter, multiple copies of a single script can run concurrently for different users; you have to distinguish individuals from each other. (That's where cookies come in, incidentally.)

Plus, each Web request script typically is built, runs and is destroyed within a fraction of a second. Only in a unique set of circumstances would a "traditional" development language be suited for this environment.

Every development language has a different solution to this notion of state. In Java, state is created by maintaining a persistent virtual machine backend. using an application server, to which each front-end Web request must communicate. The application server almost always requires dedicated hardware resources and can be a single point of failure. Plus, it is inefficient to open a second network connection for every incoming network connection, which often then results in a third network connection if the application server business logic must communicate with a database backend.

PHP takes a more simplistic approach because it was designed to live and die within the context of a single Web request. PHP instead relies on standard HTTP technologies, such as GET/POST variables and cookies, to "remind" a given PHP script what its state was (often stored in a database backend, although commercial products such as Zend Platform provide enterprise-ready session clustering alternatives). This architectural simplification has a significant impact on overall application complexity and performance—an impact that could not be achieved in a language originally designed assuming state and a long-running process.

Next: Platform Support and Security

Loading...
 
 
ABCs
 

Just the basics, please. Sometimes we all need a refresher or we need to make sure our team and our colleagues are all on the same page.

Over 25 tutorials on everything from business intelligence to virtualization.

 
 
FEATURED SPONSORS
 
 
 
SPONSORED LINKS
 

Best Practices in Choosing and Consuming Managed Security Services

A Guide to Messaging Archiving

2008 Google Communications Intelligence Report

The Impact of Messaging and Web Threats

Comparing Google and Other Leading Messaging Security Solutions

Universal Search in Healthcare Organizations

Google Case Study: Agile Software

Universal Search in High Tech Organizations

Enabling Enterprise 2.0

Renowned Engineering Institution Chooses AMD Processor-Based Servers

Extending the Enterprise Network Through Mobility

Industry Analyst Report: Top Hosted Exchange Vendors in 2008

Log onto Hitachi True Stories, films inspired by the next great achievement

CA delivers deeper insight into your assets, resources, projects & services so you can make more informed IT decisions

Manage your IT more effectively

Request a Novell/Microsoft deployment workshop and kit

Request a Novell/Microsoft deployment kit

Let Hubspan's managed service tackle your business integration challenge so you can focus on your core business

Strong Authentication. Secure USB data storage. One Device

Build up or Tear down? See how UC makes sense with Nortel. Calculate your UC ROI

Dell Latitude: Battery life up to 19 hours. Learn more

TDWI Report shows strong validation for investing in predictive analytics

Improve delivery of product information to customers.

E-LOAN Maintains Reputation as a Privacy Leader with Symantec

Information Security: Data Drains and How to Prevent Loss

A Guide to Understanding Hosted and Managed Messaging

Google Apps Premier Edition Helps Indoff Manage E-mail More Effectively

CapGemini Cut Call Center Costs with Google Apps Premier Edition

Comprehensive Review of Security and Vulnerability Protections for Google Apps

Deploying a Google Search Appliance is Not your Typical IT Implementation

Google Case Study: Pioneer Investments

The Case for Universal Search

Universal Search in Financial Services Organizations

Efficient by design: Watch this flash demo of the Quad-Core AMD Opteron Processor

HP and Oracle deploy unbreakable computing infrastructure at Replacements, Ltd.

Keep proven data center technology. Evolve with Brocade

Motorola AirDefense can identify and exterminate your rogue APs. Learn more

CA's IT Security centralizes your identity management to turn security into a proactive, business-building tool

Efficient - Flexible - Compliant

Is there a secret to Sharepoint® Security? www.SharePointSecured.com

Request a Novell/Microsoft deployment workshop

Keep your valued customers through tight business integration - it's a lot easier than you think

Simplified business collaboration, we make the connections so you don't have to

Compuware.com - See how we make IT rock around the world

Discover PMI's credentials and career path tools

SOA Educational Library at the TIBCO SOA Resource Center

Grassroots Data Governance with SAP MDM

Security and Trust: The Backbone of Doing Business over the Internet

7 Requirements of Data Loss Prevention

Data Loss Prevention: Keeping Sensitive Data Out of the Wrong Hands