Zend Framework 2 – The Next Revolution in the World of PHP

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

When I first encountered the Zend Framework I was blind-sighted by the high level of abstraction, the clean code and the rich library. I was 18 years old then, and my OOP knowledge was limited to developing simple websites that utilized a couple of classes + Smarty. In theory, I knew everything about OOP but I had no conceptual idea how to take advantage of the power of this technology – I had only heard using classes and objects was cool. Zend Framework has played a major role in my professional development and has managed to completely shift my worldview, transforming my then idea of coding into something quite different. Zend Framework has taught me to think object-oriented.

Every coder, who is familiar with OOP in theory (but not, for instance, with design patterns), has the illusion that they have no need for community-wide approaches, that they are great and have no need to learn from anyone else. This is what I see in almost every PHP coder nowadays. Before I came across ZF, I too was a bone-headed beginner.

Let me describe а project which does not utilize a framework: it has a single class, often named either Main or Core, and contains various methods – from database connections to product information retrieval, to as far as user registration. This is the Mothership. It is thus often the case that the Mothership includes over 10,000 lines of code, and is the author’s ultimate pride. Some programmers measure their… lines of code, but in the source code, quantity != quality.

The transition from this obsolete style to object-oriented thinking can be very difficult (utilizing a couple of classes does not make your project object-oriented but rather an object-disoriented one).

When I found out a year ago that a new version of my favorite platform was under way, I was more than sure that there’d be a ton of new stuff to learn and I had the feeling that Zend was going to change the world of PHP once again.

So, what was wrong with Zend Framework 1?

Although I have very sentimental feelings toward ZF, I cannot ignore the fact that there are a lot of things in it that I dislike.

A clumsy module system

The module system inside Zend Framework was added at a later time. In earlier ZF versions no attention had been paid to modules, which meant that the module option was fitted in afterwards. Many important options had been omitted such as module configuration and a configured classes-loader. All these things were not that difficult to mend but they did get on people’s nerves.

Continue reading “Zend Framework 2 – The Next Revolution in the World of PHP”

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone