Debate - How to Interface the PHP World
The Web Dev Zone is brought to you in partnership with Mendix. Discover how IT departments looking for ways to keep up with demand for business apps has caused a new breed of developers to surface - the Rapid Application Developer.
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:
- Feels awkward with interfaces flying around as separate repositories
- Not all frameworks are using PHP 5.3 yet (CakePHP 2.0, which was just released, targets PHP 5.2).
- 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