ZNF project closes—Why I abandoned it and PHP

I am sorry to announce that the ZNF project is now discontinued. After almost three years of development, the other project manager Graziano and I realised that it was unfeasible to continue the evolution and maintenance of the project.

Several combined reasons lead to this difficult choice. First of all, I got a position as a software engineer in Norway, while Graziano started his own business in Italy. The design and implementation of ZNF were time-consuming activities, and they could not be carried out in the ever decreasing spare time. Moreover, the project did not have any external financing. Despite the handful of firms which based their business on ZNF, the project received only one donation of 7.75 USD in three years. However, the main reason why I decided to discontinue the project was another: I could not stand any more PHP.

PHP 4 was a poorly designed scripting language suitable only for quick and dirty hacks with web pages. On the one hand, the language had an intuitive syntax, provided a lot of functions, and offered support for various database management systems. The weak typing system together with the flexible parsing engine (that most of the times revealed spurious code only with the E_ERRORS = ALL directive) made the language popular among unskilled developers. On the other hand, however, the language had limited support for object-oriented programming (i.e., lack of support for information hiding, encapsulation and abstraction). The coexistence of both procedural and object-oriented programming lead to substandard source code. The PHP Extension and Application Repository was also developed the wishy-washy way, with core packages not even compliant with the quality guidelines.

Despite all that, PHP 4 acquired popularity and almost every cheap hosting provider started to support it. Soon after, PHP 4 content management systems started to spread, such as PHP-Nuke and phpBB. I wrote my first PHP 4 code for an assignment of a Bachelor course of web development at the University. I liked the syntax of the language, but I hated the mixture of both procedural and object-oriented programming, and I thought it was probably a good idea to invest some time on other scripting languages… Until PHP 5 was announced.

PHP 5, and especially its brand new Zend Engine II, promised to introduce full-blown support for object-oriented programming. Being young and inexperienced, I thought that this would mean breaking with the past and create a language and a set of packages providing all features in an object-oriented fashion. Because of that, I decided to give PHP 5 a chance and started working on ZNF when PHP 5 was still beta. With hindsight, I would not make the same choice again.

Firstly, PHP 4 ended up to be supported for three years after the first PHP 5 stable release. The majority of hosting providers then ignored PHP 5 for way too long. They should not be blamed after all: most of the customers were likely to run PHP 4 content management systems like Joomla, Drupal, or WordPress, so why upgrading to PHP 5 and risking compatibility issues as long as PHP 4 was supported? As a consequence, ZNF lost a big potential user base.

Secondly, the vision behind PHP 5 turned out to be different from the one I expected. PHP 5 kept as much as possible of the compatibility with PHP 4, including the mixture of both procedural and object-oriented programming. Key new features such as input filtering were added to the language as functions rather than classes. Not to mention that support for namespaces and Unicode is still missing and that errors can be handled in at least three different ways (i.e., trigger/handler, PEAR error stack, or exceptions).

Considering all these reasons, I guess it is not difficult to understand my disappointment. 🙂

The ZNF project is not searching for new maintainers. The website will be accessible for some years unless unforeseen events occur. Feel free to fork the project, as long as you respect the LGPL 2 license. Special thanks for their contribution to the project goes to Tomasz Kuter, Denis A. Konovalyenko, Emad B., Christian Kassab, Markus Wigge, Valentin David, and J. Chalmers.

Update 15 February 2017

Just for fun, I migrated ZNF to PHP 7. Surprisingly, I only had to replace ereg() with preg_match() and upgrade all dependencies (PEAR and Smarty) to do so. It is remarkable that our 12-year old legacy code could be migrated to the latest version of PHP in just a couple of hours 🙂 If you are interested in these patches, feel free to contact me.

5 Comments

  1. I gone through your framework and article today during a search.
    The approach of php towards object orientation is half hearted.

    Some time they go with the C++ Style Then go with Java Style.

    Exception handling,variable scope and data-type strictness etc are are very confusing.

    I used try-catch but no exception was cached although i have coded to get an exception.

    Their are may times i have seen that i have declare a local variable inside a loop and i am able to get its value out side it.

    So my better thought is to go with some other language like java and .net at least when it comes for object oriented approach.

  2. It’s a pity that such a promising framework is declared finished. I follow your opinion that it was not wise by the PHP team how they handled the PHP5 transition. But I don’t see why this should render the whole developement useless. Looking at Symfony, Cake and the like shows that a real huge request is there. – Think about joining the party again!

  3. I share many of your grievances with PHP4. One of my great laments about web development outside the enterprise is that we have a real “tool ghetto.” If you think the situation is bad for PHP, just look at what Python developers are forced to deal with. It actually has many mature modules for things like database access, but most hosting services can’t be bothered to install the compiled packages! Python cannot even effectively get off the ground because the hosts won’t touch good modules that are not even questioned when they are written for Perl or PHP!

    I think the only way that things can move forward is if the PHP team, Zend or Google sponsor a few dozen good student developers to do a serious port of the key PHP applications to PHP6 when it comes out.

  4. Hi Alessandro,

    I’m sharing your opinion about the way PHP “evolved”.

    Its a pity when such good development efforts ‘re going to waste just because of “wrong” platform or language. Good luck, man.

  5. Hello Alessandro,

    I want to say thanks for ur investigation of time onto ZNF. Me discover this Framework some month ago and it was the only one which fit’s to my needs. Im impressed by this and me like the codestyle, for me itz very transparent. I wish you much of luck for the future. so im german, sorry for my english 🙂

    good luck,
    Robin.

Leave a Reply

Your email address will not be published.

*

Send this to a friend