PHP 5.4, Zend Framework 2, Zend Studio 9

A lot of things are moving in the PHP ecosystem, but it seems to me that those things are going a little bit out of control and I’ve a few philosophical questions…

PHP 5.4

Hey great, we’ve traits and a built-in web server. Hemmm what about the damn UTF8 support? It’s 2012 and still a substr can split a character in half! And I don’t think the whole world is still using ANSI or ISO-8859, everyone now uses UTF8 and working with UTF8 inside PHP is always a pain. Traits and that web server were really more important?

At least we’ve a useful new feature: array dereferencing, something python had since maybe 10 years (along with the utf8 support…). I’m not telling python is better otherwise I won’t be using 99% PHP since 12 years.

Zend Framework 2

I hated pretty much every MVC framework out there but ZF is really much more than just an MVC framework (also if not so many people can see that). I used its MVC only a little so I won’t talk about that but I loved the entire ZF1 project, it was just perfect, really easy to use, simple code so the documentation is something useless and it was also really easy to include a single element in your project. That was great and it’s ended.

ZF2 is surely a great software but the devs seems not to remember that PHP was born with simplicity in mind and ZF2 is millions light years beyond simplicity:

  • you won’t ever be able to use a single component (let’s say you just want to use zend\db) without having to deal with the autoloader
  • today we’ve ZF2 beta3, I always knew that “beta” meant “API freeze” and instead from beta2 to beta3 something like EVERYTHING changed! I was writing some code using Zend\Db and I had to throw it all in the garbage because Zend\Db was completely rewritten for beta3. This make me think of a pre-alpha, not a beta.
  • ZF2 is a complete rewrite of ZF1 and thus I bet it will be a hell of bugs for a long long time, in fact I just started using it in real life and I found 2 blocking bugs (blocking for me obvious), one about Zend\Db (unable not to quote values) and one about Zend\Locale (unable to get territory list), both were perfectly working in ZF1
  • ZF bug tracker is like the most silent western movie, you can’t ever hear a voice, that’s just a bit disappointing
  • ZF2 code is so complex that it’s nearly impossible to go through it just to find how a method works so if there won’t be a really great documentation it will really end in a developing pain

Keeping in mind all of the above, would you go back to ZF1 for your new project knowing that in 18 months you’ll have to completely rewrite everything ’cause ZF1 will be out of support? The answer is no but we’re stuck in a limbo.

And a question for the developers, do you really think that pushing things so high about complexity is a good thing for the success of ZF? I’m not so sure about that. ZF1 could be used by every junior dev out there, I wouldn’t say that for ZF2.

Zend Studio 9

At the moment Zend Studio is IHMO the most updated (9.0.2 already supports PHP 5.4) and feature rich PHP IDE but I still can’t understand if the devs are actually using it, just a few examples:

  • Most of the time I’m on ZS it compiles, indexes and refreshes the workspace, completely eating my cpu and sometimes preventing me from saving a file until the indexing process is finished.
  • GIT is widely used now that really big PHP projects are all over the world (anyone said Magento?) but the GIT plugin for ZS is incomplete and caused me some big problem in the testing phase. One feature missing is the support for GIT submodule, but there is not a single project I’ve ever worked on that didn’t have submodule => I’ve to use an external GIT client and this really bothers me

Probably those problems are Eclipse’s problems but that’s not the point.

Conclusions

It’s a long way to the top…

8 thoughts on “PHP 5.4, Zend Framework 2, Zend Studio 9

  1. Pingback: Linux, PHP, MySQL, Windows, C# » PHP 5.4, Zend Framework 2, Zend Studio 9

  2. Okeowo Omololu Remi

    You’re right Zf2 is vastly complicated, i use Yii when my projects in ZF1 was taking time,looking at ZF2 it looks a bit bearable,but am hoping for a good tutorial. nice insight by the way

  3. Alfredo

    Sono un Consulente Giuridico Informatico (nonche’ programmatore php dal 1999) e posso garantirvi che: essendo (voi programmatori) a conoscenza di tali informazioni andreste incontro a delle responsabilità civili (dove vi richiederebbero un risarcimento danni e la ripetizione del vostro compenso) in caso sviluppaste un progetto basato su framework con tali bug (come ZF2) e di incerta mantenibilità (ZF1), dopo la presentazione di uno dei problemi elencati in fase production (dove la qualifica del fatto si configura come danno).
    Per liberarvi da tale responsabilità dovreste informare della situazione attuale di ZF il cliente prima dell’inizio dei lavori.

    Inoltre, se stipulate un contratto di manutenzione del codice con il vostro cliente, questa (la manutenzione) dovrebbe essere supplementare alla stessa mantenibiltà del codice da parte di Zend.
    Deve risultare scritto da qualche parte nel contratto di manutenzione, altrimenti gli unici responsabili di eventuali danni o malfunzionamenti sareste solo voi, a maggior ragione se circolano voci del genere in rete.

  4. Bughunter

    This is no trolling: if you know python, why exactly are you still using PHP 99%??? Would be very interesting to read! Thanks!

  5. Remy

    GIT problem I think can be solved with Eclipse git project that Zend Studio is using anyway. I installed that plugin separately and since that haven’t had that many problems. I even installed Nightly build repo as I needed some features that were not available in stable (Github tasks to be more specific).

Leave a Reply

Your email address will not be published. Required fields are marked *