I’m currently in a dilemma. A major App must be built in PHP so I’ve now the framework discussion.

As I’m a new team member and I’ve worked in the past with both frameworks I got the obvious question “which one I’d prefere?”.
I’ve to say that this discussion is my fault because I introduced Cake a few weeks ago. So my colleagues made some research and told me, that the main opinion about these frameworks is that Cake is for N00bs and Zend for skilled developer. This is shitt!

There are two types of frameworks:

  • White Box
  • Black Box

White Box
In this case the developer must be familiar with the internals of the framework. Basically the developer will extend behaviors by using subclases. This is called inheritance.

Black Box
For this type of framework the developer must not be familiar with the internals. Basically objects were created and behaviors were delegated between them.

In other words for non technical: With a white box you need to code e.g. the “user”. Using a black box you tell the framework “make user” and the code for the “user” appears.
From the performance point of view a white box framework would perform better. This is because a black box fw needs a lot of “features” that were not used in most cases.

Basically every project hast its requirements and dependencies. In my case requirements can be shortened to: “Build a C10K app as cost efficient as possible”. Thus hosting and locale are also really important factors.
On the one hand by using a white box framework the app will have a better performance so that machine power (Server) is less needed but the developing time will be higher than using a black box. On the other hand an app built with a black box framework will need more machine power. So now the break even point between machine power and developer time must be calculated. Anyway machine architecture is important in both cases!

But let’s go back to Zend & Cake.
Zend can be used as blackbox and whitebox. Thus an app will have different performance depending in which “mode” the frame work is used. A developer can use Zend like libraries “the white box style” or heavy weight “the black box style”.
Cake is black box BUT coded in the right way Cake can also achieve a good performance and reduce developing time. This is why I like cake. You also don’t need to bake the whole app thus you can also achieve performance increase. Also by tuning caching, Cake can achieve the needed performance. But now the developer must be familiar with Cake internals too.
Please also keep in mind that Cake2.0 will be released soon. And there will be optimizations regarding performance.

At the end what does this say about skills? In my eyes nothing. For me a good developer will never produce “Spaghetti code, will follow design patterns and produce as rapid as possible so that it’s cost efficient.

http://privatefunction.net/wp-content/plugins/sociofluid/images/digg_32.png http://privatefunction.net/wp-content/plugins/sociofluid/images/delicious_32.png http://privatefunction.net/wp-content/plugins/sociofluid/images/technorati_32.png http://privatefunction.net/wp-content/plugins/sociofluid/images/google_32.png http://privatefunction.net/wp-content/plugins/sociofluid/images/facebook_32.png http://privatefunction.net/wp-content/plugins/sociofluid/images/mixx_32.png http://privatefunction.net/wp-content/plugins/sociofluid/images/twitter_32.png