Mitch Pronschinske is the Lead Research Analyst at DZone. Researching and compiling content for DZone's research guides is his primary job. He likes to make his own ringtones, watches cartoons/anime, enjoys card and board games, and plays the accordion. Mitch is a DZone Zone Leader and has posted 2576 posts at DZone. You can read more from them at their website. View Full User Profile

Debate - How to Interface the PHP World

10.24.2011
| 3427 views |
  • submit to reddit

The PHP community was reacting to Lukas Smith's "Interfacing the PHP world" for most of last weekend.  Here was his introduction to the problem:

I have done a few tweets in the past weeks hinting at wanting to create a set of common interfaces for things like logging, caching etc. Now I pondered this some more and there are a couple of problems which I am not yet sure how to overcome them. Obviously the goal would be to make it easier to drop in components from one library/framework into another. If you want to see a concrete case where such interfaces could help just have a look at the recently created Doctrine Search project which needs an HTTP client.  --Lukas Smith


Here were the three roadblocks that he saw:

  1. Feels awkward with interfaces flying around as separate repositories
  2. Not all frameworks are using PHP 5.3 yet (CakePHP 2.0, which was just released, targets PHP 5.2).
  3. All the frameworks that just went stable will likely want to push their specific method names.


One commenter suggest a Java-like strictness:

A) Interfaces in the main PHP tree therefore all have to abide or die, that is how Java gets its notoriety. The SPL was a good start

2) Else start something like Apache Commons for Java which is the Switzerland, and allows drag and drop or reference implementations.

PHP needs that kind of dictatorship that Java has in order to move forward.  -Stephen (first comment on Lukas' blog)


Herman Radtke decided to write a full blog response arguing against Lukas' idea entitled: "Please Do Not Interface the PHP World"

And then finally you have Lukas responding with a longer blog post entitled: "Why Bother?"

It's a pretty major propositon to start 'interfacing the PHP' world.  Catch up on the conversation and let us know what you think

 

 Source:  http://pooteeweet.org/blog/0/2008#m2008

Tags: