Professional PHP

PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.
« Google Hosting
A Comparison of the PHP and Java Job Markets »

Enterprise PHP

October 12th, 2004

Sandro Zic PHP in the Enterprise talk which has spawned much blog discussion. John Lim triggered the discussion by pointing out a slide in sandro’s talk that suggested that PHP is not enterprise ready and rebutting some of the points on the slide. Marco Tabini augments the Pro PHP Enterprise position. I’d like to continue this discussion (I’ve written on this before).

What does Enterprise Mean?

I was already thinking about this post on the weekend, when I went to my cousin’s daughter’s birthday party. Unsolicited, he offered several problems with PHP that prevented it from being used at his organization. The first he mentioned was that they use Oracle and using PHP with Oracle required re-compiling PHP. However, using a custom compiled version of PHP disrupted their Red Hat automatic update process. He had no desire to maintain PHP patches across his organization’s 15 and counting servers. The Java version of the Oracle driver were 100% java and thus the Java runtime could be maintained by an automatic patching process. Additionally, he had the impression that PHP required more security patches that Java. Another point that he brought up was that Java has a standard for authentication and that integrating the authentication systems of various PHP applications required modification of the applications themselves.

I think this conversation highlights some issues that Enterprise development is concerned with versus smaller more problem oriented development. In Enterprise development, integration between heterogeneous applications is a big problem, deployment costs are major concerns, and security is important. My own experience confirms this.

In Patterns of Enterprise Application Architecture, Martin Fowler defines the following general characteristics of enterprise applications:

  • Persistent data
  • a lot of data
  • access data concurrently (Transactional)
  • a lot of user interface screens
  • integrate with other enterprise applications

Fowler says that he can’t give a precise definition of Enterprise application, but he gives some examples of enterprise applications:

Payroll, patient records, shipping tracking, cost analysis, credit scoring, insurance, supply chain, accounting, customer service, and foreign exchange trading.

He also gives some examples of what enterprise applications aren’t:

automobile fuel injection, word processors, elevator controllers, chemical plant controllers, telephone witches, operating systems, compilers, and games.

The definition of Enterprise is elusive. I am tempted to define Enterprise Application as an application crucial to the day to day operation of a business.

Thus, I think the question of whether PHP is Enterprise ready depends on what kind of enterprise you have and what you are doing. For the most part, PHP is a niche language with a web focus. If you are running a web based business, PHP can be enterprise ready.

Integration

The size of the business makes a difference. The larger the business, the more important integration capabilities are going to be. Tthe need and ability to integrate with other applications is one of the more defining characteristics of an enterprise application.

The book Enterprise Integration Patterns begins:

Enterprise integration is the task of making disparate applications work together to produce a unified set of functionality. These applications can be custom developed in house or purchased from third-party vendors. They likely run on multiple computers, which may represent multiple platforms, and may be geographically dispersed. Some of the applications may be run outside of the enterprise by business partners or customers. Other applications might not have been designed with integration in mind and are difficult to chagne. These issues and others like them make application integration complicated.

The book goes on to define four styles of application integration:

  • File Transfer
  • Shared Database
  • Remote Procedure Invocation: CORBA, COM, .NET remoting, Java RMI, SOAP, XML-RPC, web services, etc.
  • Messaging: WebSphere MQ Family, BizTalk, TIBCO, JMS, MSMSQ, etc.

Is PHP Enterprise ready? Perhaps the answer depends on the style of application integration favored by the business. Can PHP work with messaging systems? How about support for transaction based systems, such as CICS?

International PHP Magazine promises a future article comparing Enterprise PHP and J2EE. I am looking forward to this article. I wonder where the PHP equivalent of the JMS API and the JTS API and the integration with the tools that provide these services? PHP has only recently achieved some sort of standard unified DB API in PDO. I am not sure that PHP is ready for this type of integration.

I think that JSR 223 defines PHP’s niche role in larger Enterprise systems. The integration heavy lifting is done by Java, while PHP fills a niche in the larger corporate ecosystem as a web presentation tool.

Is PHP Enterprise ready? For some, the answer to this question will be “is JSR 223 enterprise ready?”

I’ll also add one more integration issue. That is integrating the work of multiple developers. PHP needs namespace support. I got in trouble in WACT for using some common class names like Template and View. This shouldn’t matter. As a framework developer, I shouldn’t have to prefix all my class names with WACT_ just because someone else might use the same name. As an application author, I shouldn’t have to worry about namespace conflicts between different third party libraries or frameworks that I might want to use. autoload does not solve this problem.

Regarding integrating authentication systems. I too feel this pain. What is the solution here?

Deployment

At my last job, we estimated that the cost of deploying a feature change in a client/server environment was an order of magnitude larger than the cost of actually developing the feature. Deployment is a big deal.

In talking to my cousin, deployment of a Oracle capable version of PHP was an obstacle against using PHP. He mentioned having to install a development package from Oracle before the PHP could be compiled. (is this right?). Having to compile PHP is a big deal for some people (for every patch? on how many servers?).

Why can’t PHP have a 100% PHP Oracle driver? I think part of the answer to this is performance. Recompiling such a beast on each request would be bad. Not because of the runtime overhead, which would probably be small, but because of the compile time overhead. Standard default generic installed everywhere PHP needs an opcode cache. APC should be a core part of PHP, not a PECL module. There is no reason why this should not be the case.

How many PHP modules and PECL modules really have to be written in C? With a standard opcode cache, some could be implemented in PHP and thus be far more deployable.

Take as a premise that Enterprise means integrating many third party applications and we go pick out a half a dozen top notch PHP application and integrate them. Ask how many php.ini options could we really change and still keep all of the differing PHP applications functioning? PHP needs a more consistent runtime environment with less .ini variability.

If an ISV offers a PHP application for sale, right now they have to make a tough choice. Sell the software with the source code to a larger market and risk unauthorized modification, inspection and distribution, or sell the software strongly encrypted and protected and require the deployment of an extra runtime component and shrink their market. Worse, there is more than one encryption format and they are not compatible. PHP needs the ability to distribute and execute plain old compiled byte code. This is an important middle ground between these two options.

One of the things my cousin mentioned was that deploying the java Oracle driver was as simple as dropping a .jar file into a directory and changing an XML file. PHP needs a built in standard package format. I should be able to do this:

include “/path/package.tgz/path/file.php”

(Only that the .tgz shouldn’t be necessary. I only put it there for illustration purposes.)

Additionally, I should be able to install a multi-file PHP application by simply dropping the file somewhere into the document root. Another example with the same extension caveat:

http://www.mysite.com/application.tgz/path/page.php

Ironically, JSR 223 defines how PHP files can be bundled into a Java package, yet PHP has no packaging mechanism of its own.

It is important to make deployment in PHP as painless as possible. This means a consistent runtime environment and the ability to package multiple files for deployment.

Deployment is an important issue for enterprises, ISVs, and even open source projects. The easier deployment becomes, the farther PHP can spread.

I have said before, that due to network effects and the need to integrate I think PHP has the potential to dominate as a platform for packaged web applications, both commercial and open source.

Security

I won’t talk much about security, but I will talk a little bit about stability. I want to ask what kind of automated test suite PHP has, how can I run it, and what kind of code coverage does it achieve?

Is PHP Enterprise ready? Definitely, depending on what kind of enterprise and what kind of application you have. Is there room for improvement? Definitely.

Filed Under

  • PHP

Related Posts

  • Zend Core for IBM technical roadmap
  • Difficult deployments
  • Why is PHP Popular?
  • A Comparison of the PHP and Java Job Markets
  • PHP Framework Consolidation?
You can leave a response, or trackback from your own site.

18 Responses to “Enterprise PHP”

  1. Jeff Moore's Blog » A Comparison of the PHP and Java Job Markets says:
    10/16/2004 at 4:38 am

    [...] on Marco Tablini’s discussion of the PHP programmer availablity and my earlier attempt at defining enterprise PHP. Out of curiosity, I cataloged the required skills for 1 [...]

  2. Jeff Moore's Blog » Difficult deployments says:
    11/2/2004 at 7:35 pm

    [...] ware from being used. Dependencies are best avoided and minimized rather than managed. more on PHP deployment. Comments &raquo [...]

  3. Ryan King says:
    10/12/2004 at 10:14 pm

    Regarding the lack of a packaging mechanism in PHP….

    I believe PEAR can fill this role. A package need not be distributed through pear.php.net in order to make use of the PEAR packaging mechanism. Binarycloud, Horde and others are doing this already.

  4. Steve Dix says:
    10/13/2004 at 12:01 am

    “He mentioned having to install a development package from Oracle before the PHP could be compiled. (is this right?).”

    Well, it was about two years ago when I last worked with Oracle/PHP. You needed to compile against the oracle runtime libraries. It may have changed since.

  5. Christopher Thompson says:
    10/13/2004 at 12:12 am

    I think you need to take another step further back and recognize that there are two main types of “enterprise.” The old systems centric enterprise and the new web centric enterprise. I honestly don’t think PHP has much of a place in the old enterprise for many of the reasons you mention. To borrow a phrase, I think Java was designed to be the duct tape of the enterprise. It’s C++ with a nod at the web.

    The question is: do you want to build to an old systems centric architecture or a new web centric architecture? I think PHP should leave the old systems centric approach behind and place its bet on web centric. Let Java and .NET prop up all those old Unix and Windows apps for another generation or two until the world is fully web centric.

    That’s why I have concerns when PHP folks quote Fowler. I really believe he is the guru of where we have been, not where we are going.

    What I think that what PHP needs is a framework that has the same effect on the PHP landscape that something like Struts has had on the Java landscape. I’m not talking about a Struts port which I think is so wrong in PHP. I mean something that is a foundation for the ideas that other frameworks build off of. Something that is a safe bet for a company to build its applications on because it provides direction on how to solve many of the problems you list above, but in a web centric PHP way.

    I also think there is a scalability to PHP that doesn’t get talked about, but is part of it’s success. PHP is good for everything from a single Contact Us form to an entire enterprise wide application. If there was a framework that was as scalable in that way as PHP is, it would allow beginners to start out right.

    I think your comments about WACT show that if you try to fight PHP, like with namespaces, you end up unhappy. I haven’t gotten into WACT because it seem both pattern happy and template system focused. Most of the other frameworks try to build Struts rather than building something that meets the goals of Struts in PHP. Having built many web applications from the small to ones that would be considered enterprise, I have a glimmer of what such a thing might look like.

  6. Lukas says:
    10/13/2004 at 5:01 am

    I very much agree with Christopher. More and people realize that monolithic architectures slow down your ability to innovate drastically. Moreover you cannot easily incrementally upgrade let alone switch solution supplier. The new enterprise world is where PHP fits in perfectly. In the old it can only due small glue work.

    As to a common framework: I see this as really hard to achieve from the approach most PHP developers are going at it. Stuff like JSR-170 have a much better chance of having the potential of improving this situation. We have no hope of defning standards by code as we all prefer to retain the flexibility we need to do good stuff rapidly. We dont have the time to do things right ™, our job is to finish the job quickly (because that is also what the new enterprise world is about). However well written out standards have the chance of being adopted.

  7. Full(o)bloG says:
    10/13/2004 at 6:26 am

    php enterprise case studies
    marco tabini di php|architect fa un appello a tutti gli sviluppatori/analisti/etc di fargli pervenire case studies ben documentati di applicazioni php in ambiente enterprise. Per una precisa e dettagliata definizione di enterprise date un occhio a quel…

  8. Alex Pagnoni says:
    11/24/2004 at 8:07 am

    Have a look a this PHP 5 architecture:
    http://projects.carthag.org/index.php?content_page=iconnect/index.html

  9. Lux says:
    12/10/2004 at 1:03 pm

    On the remote procedure front, I’ve just launched a new project which implements RMI for PHP. The project is not just software, but also a series of specifications, so others are free to create their own implementations of it, or extend it in cool ways, etc.

    http://www.phpbeans.com/

  10. Senthil Nayagam says:
    3/17/2005 at 11:25 am

    Hi,
    article was interesting and thought provoking.

    what php has achieved without any godfather company backing is really great(java-sun, .net- microsoft, IBM etc).

    i work for a micro multinational, php has given my organisation the parity to take on bigger competitors. with off the shelf regular webservers, are able to do manage a million hits a day, all ecommerce.

    the same implementation on java, microsoft ,ibm, oracle or any other platform would have costed atleast 30-100 times more on licensing, hardware , support costs alone.

    Long live PHP.

    recently heard, mysql was dumped from php5 as big blue offered in some megabucks for php to support its db technologies

  11. Alex says:
    12/13/2005 at 9:24 pm

    Mr. Senthil Nayagam, FYI Java was not succesfull because it had a company backing it. Please learn some history and get your facts right.

  12. Charles Woodmore says:
    2/9/2006 at 5:43 am

    PHP (”Personal Home Page”) was intended for non-professional programmers, people who would have found Java, C# (.NET) “too complicated” for adding a little bit of dynamic content to their home pages. During the dot-com boom of the 90’s many of these PHP advocates found work in enterprise situations which lent their voices some degree of authority. This caused managers in these enterprizes to actually take PHP seriously. An accumulation of ad-hoc workarounds to attempt to ameliorate some of the most eggregious shortcomings, over several releases, has made PHP seem almost reasonable for heavy lifting.

    There’s no question that someone can put together a small web application faster with PHP, but beyond that, you are going to spend more money trying to make a square peg fit in a round whole.

  13. Nobody says:
    2/13/2006 at 4:40 pm

    Mr. Senthil Nayagam, FYI Java was not succesfull because it had a company backing it. Please learn some history and get your facts right.

    Alex, exactly where did Mr. Senthil Nayagam say that Java was successful only because of a company backing it? Java people like you can be so stupid sometimes.

  14. Simon says:
    5/25/2006 at 8:06 pm

    “There’s no question that someone can put together a small web application faster with PHP, but beyond that, you are going to spend more money trying to make a square peg fit in a round whole.”
    Charles, you obviously have no commercial PHP development experience :)

  15. Sandro Groganz » Blog Archive » A Jakarta for PHP says:
    12/27/2006 at 2:31 am

    [...] This is something which is missing in the PEAR installer, I would even go so far that something like the Jakarta project in total is mssing for PHP. Maybe it is now a good point to start something like this as an official PHP community effort, given the recent discussons on Enterprise PHP. [...]

  16. alvaro.aguirre.cl » Blog Archive » Comprendiendo la arquitectura de Zend Framework says:
    7/6/2009 at 1:43 pm

    [...] es uno de los más versátiles frameworks para desarrollo en PHP. Conocidas son las intenciones (1,2) para convertir a PHP en un lenguaje que permita el desarrollo de aplicaciones de nivel [...]

  17. Enterprise PHP » elink media blog says:
    8/24/2009 at 6:55 am

    [...] post is particularly interesting, because of the writing itself and one of the user comments. Martin [...]

  18. Alvaro Aguirre » Blog Archive » Arquitectura Zend Framework says:
    2/15/2010 at 8:22 am

    [...] es uno de los más versátiles frameworks para desarrollo en PHP. Conocidas son las intenciones (1,2) para convertir a PHP en un lenguaje que permita el desarrollo de aplicaciones de nivel [...]

Leave a Reply

Click here to cancel reply.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

code: use [code=php][/code].

Comment Preview

    Subscribe Feed
    Share Subscribe to this blog…
    Share Bookmark or share this page…
  • About

    My name is Jeff Moore. I'm a PHP programmer living in San Francico and working for a startup.

    More about me…

  • Categories (Home)

    • Agile Methods (14)
    • Mac (14)
    • Misc (17)
    • Open Source (14)
    • PHP (98)
    • Software Design (29)
    • Usability (14)
    • Web Design (20)
  • Recent Comments

    • Programming Language Trends via Google  19
      Craigslist pva, jessica, Scott [...]
    • Looking Towards the Cloud  35
      bentonville multiple listing, cosmetic dental, Sam Brodish [...]
    • PHP versus ASP  8
      Marhta Blight, Ravi, Ryan Brooks [...]
    • How to Transfer Mac OS X Application Data between Computers  59
      Website Migration, harry the computer support guy, Dotty Salvage [...]
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)  157
      lehuuphuc, Robert Parthemer, Lingerie Intimate [...]
    • PHP Games  25
      jessica, Tennille Cranor at Chilli Plants, Lucas Ortell [...]
    • un-PEAR-ing  5
      jessica, Eugene Panin, Arnaud [...]
    • The Legality of Republishing RSS Feeds  23
      kevinxiao, Marissa Miscovich, Quick Student Loans [...]
    • Faster Page Loading  4
      jessica, angular cheilitis, Aaron Rosenfeld [...]
    • PDO versus MDB2  15
      jessica, kevinxiao, Gavin [...]
  • Recent Posts

    • ZendCon: Writing Maintainable PHP Code
    • Looking Towards the Cloud
    • Holiday Tech Support
    • Closures are coming to PHP
    • php | tek Wrapup
    • php | tek 2008
    • Sarah Snow Stever
    • Benchmarking PHP’s Magic Methods
    • The Endpoints of the Scale of Stupidity on Video
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)
  • Site

    • Archives
    • Log in
  • Search