From CakePHP to Zend Framework


By ivan.jovanovic - Posted on 31 March 2008

Zend framework - CakePHPIt was years ago when I started coding first PHP pages. What a mess was that :) I was beginner, web development was not at the level it is today. The web development tools offer was scarce, AJAX was not so far future but again it was the future :) And beside all of that we were still coding, rushing towards new technologies and development methodologies.

Then, I remember, I did not have enough knowledge about OO programing practice, and PHP also didn't have enough to offer in the OO development paradigm. Java was in expansion, and PHP was announcing version of 5 where object could have more Java like treatment. Then I made a pause in my web dev story for couple of years because I devoted myself to my faculty. When I returned back I fell down in the world of MVC frameworks. And things were much easier then.

In short, MVC (Model-View-Controller architecture approach) isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other. In MVC, the Model represents the information (the data) of the application and the business rules used to manipulate the data, the View corresponds to elements of the user interface such as text, checkbox items, and so forth, and the Controller manages details involving the communication to the model of user actions such as keystrokes and mouse movements.

As a beginner in MVC I was looking for something instant, that would enable me to make fantastic web sites with a click of the mouse, lot of frameworks promised it and among them I selected CakePHP. I will not run into details of the framework because it is not about its details but its philosophy. And it was really instant with its scaffolding, automagic, Active Record implemented in model layer that enabled very easy implementation of table relations, cool view helpers, lot of predefined relation that save you a lot of thinking about them ... and a lot of other things.

After a time I evolved, needed more space for ideas, needed more room to think about the architecture of the application and make it work for me. I knew from the start that Zend Framework was the solution. It falls into the group of glue frameworks where you have a bunch of components that are programmed to cooperate but are not constrained by architecture. Therefore it is left free to the developer to combine them in order to map the problem the best way in code. From the other side CakePHP is called fullstack framework because it is architecturally organized the way it is and developer has little room to avoid the constraints of such organization. There are lot of discussions on web about the Glue vs. Fullstack frameworks where can be read lot more about the topic.

Several months ago I joined the Tilllate team and got a chance to work with Zend Framework beside other technologies. I proved my concept of dominance of Zend Framework above other frameworks. OO development is much easier, its learning curve is a bit "slower" but gives you lot more power, flexibility of architecture gives you possibility to produse more diverse solutions ... and lot more. It is needless to say that it is not perfect, that it has a lot more work so it can provide developer all the confort that we need, but for the advanced PHP web development it is really the best solution on the market.

And at the end I would like to say that CakePHP guys did great job with it, and it is great to have such a piece of software, I use it even today for lot of things and this is not against CakePHP but about my evolution line and how Zend Framework and I matched along that way. One smart friend of my said once "For smart man, the sound of a fly could be a music" so this is the case here, use one or another where you find appropriate, but always know limitations and qualities of both in order to make good decision in every situation.

Trackback URL for this post:

http://blog.ivanjovanovic.com/trackback/7

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Potentially problem-causing HTML tags are filtered.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.