Page 10 of 12

ZNF project closes—Why I abandoned it and PHP

ZNF was an open-source framework for building enterprise web applications in PHP5 based on the model-view-controller (MVC) design pattern.

After three years of development, the other project manager Graziano and I acknowledged that it was challenging to continue the development and maintenance of ZNF. Therefore, we decided to discontinue 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 in three years. However, the main reason why I decided to discontinue the project was another: I could not stand PHP anymore.

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 creating 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. 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.

One month in Bergen—Life of a software engineer in the most beautiful city of Norway

26th of July-26th of August. I have been in Bergen for exactly one month, and my life has changed dramatically…

I live in a cosy flat in the city centre, close to all the attractions of the city. It has three rooms, one bathroom, and two little storage rooms. The kitchen has gas stoves instead of electric hot plates, something rare here in Norway since cities have no gas networks, and this makes me feel a little bit at home. Unfortunately, there is no living room, but my room is large, about 16m², and has a sofa.

I share the flat with other two nice Norwegian guys, Thorolf and Willy. The life at home is a bit different from what I am used to having in Italy or during my Erasmus. People spend most of the time in their rooms. Sometimes they come to the kitchen to prepare some food, but they even eat back in their room. Kind of weird to me, but I was told that Norwegians tend to be reserved and that this behaviour is normal…

The company where I work is not so big, and sometimes I feel like I work in a family-managed business. It is located in the city centre so that I can be at work in 10 minutes with my bicycle. I have flexible working hours, but in general, I work from 9:00 to 17:00.

I work closely with Mikal, the guy who helped me in finding this position. We will have to develop an entirely new project about surveillance systems starting almost from scratch. The way is long, but we want to do the things in the right way, as Ian Sommerville teaches in the Software Engineering book. 🙂 We agree on the goals of the project, but we have diverging opinions about its implementation. As you may know, I am a believer and advocate of free software, but Mikal is an enthusiastic Microsoft fan. While I recognise that some of the Microsoft solutions could do better than the free/open source alternatives, I am a bit concerned about becoming a locked-in company. Anyway, the final word on the technology is always up to the technical leader so that we will see.

Soon I will receive my first salary, and I am looking forward to feeling some economic stability in Norway. Here the cost of living is a bit higher than in the rest of Europe. The rent of the room costs 3000 NOK (about 375 EUR) per month, which is not so much more than in other countries, but a half litre beer, for example, costs 50 NOK (about 6 EUR). The salary, however, even normalised to the cost of living, can be considerably higher than in the rest of Europe.

My parents sent me a package of 30 Kg, which took almost one month to be delivered. It was stopped by the customs at the Italian border because of some “missing documentation”, but it made it through in the end. Now I can finally eat some decent food. 🙂 I do not like a lot of things about my home country, but I still believe that Italy has the best cuisine in the world.

I came to Bergen with few contacts left from my Erasmus exchange and the short trip I had here in Easter, but this was more than enough to get to know lots of new people. The bad news for me is that most of them have just left or are leaving soon. Thank you Mauro, Silje, and the other guys at the “Auberge epagnole”, you have been very gentle. I hope to keep in touch with you and to see you again, maybe here in Bergen or maybe somewhere else in the world.

And by the way, Silje taught me a little bit of Norwegian (and I taught her a little bit of Italian). At the moment I can only say childish sentences like “Jeg heter Alessandro og kommer fra Italia” (My name is Alessandro, and I come from Italy), but I hope to improve my skills soon.

I have also registered to Facebook, a social network which is popular here. Everyone I met so far has a profile there, and it seems like this media is going to be a usual means of communication in the future, at least here in the North. I see Facebook as a useful tool, but I still prefer to get to know people the old way: face-to-face, possibly in front of a glass of wine. 🙂

Anyway, I see that I have written too much this time, and my stomach is reminding me that it is time to eat something. I will keep you posted!

Addio Italia: finalmente a Bergen

Questi ultimi giorni sono stato piú impegnato del solito, poiché mi stavo preparando ad un cambiamento piuttosto significativo nella mia vita.

Fino a qualche mese fa ero ancora un semplice studente desideroso di terminare gli studi, e vivevo con la mia ragazza a L’Aquila, non lontano dalla mia famiglia. Oggi invece sono un lavoratore a tempo pieno e vivo a Bergen, in Norvegia, lontano piú di 3000 km dai miei affetti.

Perché questo cambio radicale? Dopo essermi laureato ho iniziato a ricevere diverse proposte di lavoro, tra cui un dottorato di ricerca nella mia università (senza alcuna garanzia di borsa di studio), cosí come alcuni posti da ingegnere informatico a Roma o Milano. Purtroppo accettare queste offerte avrebbe significato diventare oberati di lavoro e sottopagati, almeno per alcuni anni. Amici e colleghi continuavano a dirmi che era normale, che ci sono passati tutti. Io non avevo nessuna voglia di accettare questa prospettiva.

Fortunatamente ho ricevuto una proposta dalla Norvegia, che è di gran lunga piú gratificante di tutte le altre che ho ricevuto dall’Italia. E cosí ho preso una scelta: non completamente cosciente del passo che avrei fatto ho deciso che sarei tornato nella città che mi aveva già ospitato per un anno.

Quanto rimarrò qui? Chi lo sa… Ho voglia di girare il mondo, quindi non è detto che la Norvegia sia il Paese dove mi sistemerò, ma per il momento ci resto e prendo il meglio che mi viene offerto. Mi mancheranno diverse cose dall’Italia: la ragazza, la famiglia, gli amici, il clima, il sole, il mare, la cucina, la moto. 😉 Ma per il resto però credo proprio di aver fatto la scelta giusta. Qui ho molto da guadagnare e poco da perdere.

Addio Italia, hai perso un cervello e hai guadagnato un turista.

Goodbye Italy—Finally in Bergen

Lately, I have been more busy than usual, as I have been preparing for a significant change in my life.

Until some months ago I was still a mere student willing to graduate soon, and I was living with my girlfriend in L’Aquila, not far from my family. Today instead I am a full-time worker and live in Bergen, Norway, more than 3000 km far from my loved ones.

Why such a radical change? After getting my Master degree, I started receiving some job proposals, among which a PhD research fellow position at my university (without guarantee of a scholarship), as well as some positions as a software engineer in Rome or Milan. Unfortunately, accepting these offers would have meant becoming overworked and underpaid, at least for a few years. Friends and colleagues kept telling me that it was normal, that they all went through this. I had no wish to accept such perspective.

Fortunately, I received a job proposal from Norway, which is much more rewarding than the others I received from Italy. And the end I made my choice: not completely conscious about the future I decided to come back to the city which had already hosted me for one year.

How long will I stay here? Who knows… I would like to travel the world, so it is not sure that Norway will be the country where I will settle, but at the moment I stay here, and I take the best it is offered to me. I will miss many things from Italy: girlfriend, family, friends, weather, sun, sea, cuisine, motorcycle. 😉 But otherwise, I think I made the right choice. Here I have a lot to gain and little to lose.

Goodbye Italy, you lost a brain and gained a tourist.

Canon EOS 350D

Recently I “retired” my old Sony CyberShot camera because I switched to a new shining Canon EOS 350D. It is a digital SLR camera, something that I have been dreaming about for a long time…

I do not have so much experience yet, but I am already having fun with it. Playing with the depth-of-field makes me feel creative. 🙂 You can have a look at my pictures on my Flickr photostream. Comments are welcome!