views:

550

answers:

5

Until now, I have always said that CakePHP is too bloated and slow. I don't really know that, I just saw "some" benchmarks. What I really want to know, is that if those two frameworks (Symfony and CakePHP) are too slow to be usable in a way that the user will get frustrated. I already know that those frameworks are slower than other alternatives, but that's not the question.

I ask the question because I want to create a project management web application and I still hesitate between a couple frameworks. I've had some trouble learning Zend, but imho I haven't tried hard enough.

So in conclusion, in addition to the first question above, I would like to ask another question:

If I want to create a project management tool (which is a pretty big project), which of the following should you suggest, considering the developement time, the speed of the resulting application, and the robustness of the final product:

  • Symfony
  • CakePHP
  • Zend Framework

Also I should mention that I don't know any of those frameworks, and that I want to learn one of them (at least).

+6  A: 

The problem with benchmarks, is that they normally don't lend themselves to the real world. Write a real application, and you'll see that all the frameworks are within about an order of magnitude of each other when it comes to speed. And they are all slower than if you didn't use a framework (and know how to program).

However, what you need to look at is the tradeoff. Frameworks sacrifice a little performance for the ability to reduce development time significantly. What's more important to you, raw unadulterated performance or reasonably rapid development time? Facebook wouldn't use a RAD framework for their site, but that's because the performance to them is worth more than the added development time. Likewise a small company with a single developer is likely to benefit more from a framework than the reasonably small performance hit (I say small, because the impact on each page view is minimal. The effect "adds up" with higher traffic).

What I'd suggest, is take a look through a bunch of frameworks. Try them (most have a "blog" tutorial). Get a feel for how they work. Pick one that you like, and then play around with it for a little while. Learn its coding style, and how it likes to do things... Most importantly, learn how it functions. Try to learn the "why" behind the details. The ability to use a framework is IMHO directly tied to the understanding of how it operates... Don't use something you're uncomfortable using unless you have to. Find one that "fits" you, and then stick with it until you are fluent...

ircmaxell
I'd like to add that the framework is almost never the result of a performance bottleneck. It is in many case other poor techniques being used. 1 bad css selector can kill your performance just as much as using a framework. I feel like this question is also like the discussing compiled language VS scripting languages. As we saw with hphp, it seems its only 30% gain, which means nothing for cases when you have less than 5000 servers.
Parris
A: 

Find related question here, http://stackoverflow.com/questions/2676819/speeding-up-cakephp

DavidYell
+2  A: 

The differences are going to be negligible because your slow pieces are always going to be I/O - Database, Filesystem, etc. Ensure you have a good data caching strategy and don't do anything too outrageously dumb in the code and it won't matter.

Justin
While it's always easy to point out that I/O will usually be the bottleneck in a web app (I agree in this case, by the way) I think you're just a hair off base with your conclusion that all frameworks are created equal.
Chris
I didn't say they're equal, just that it doesn't ultimately matter. You can create a slow site in any framework, any language, and you can create a fast, efficient and (in your mind) beautiful code in any framework and language. It ends up being what you are comfortable with and what you learn the best.
Justin
+2  A: 

Hi Aziz Light,

I recommend cakePHP v1.3 because it is faster and easily understandable. You will find very good help (documentation and tutorials) related to this framework. The documentation is well written. Even if you are stuck in somewhere you will be able to find a solution on stackoverflow or cakephp google group or by searching on google.

I have worked on both versions of cakephp (1.2 and 1.3) and I have also tried up a hand on Zend framework (I too tried my level best but got stuck in the framework when it came to the implementation of layouts).

But after spending more than a year on cakephp I am proud to say that it is the best framework to work with.

Gaurav Sharma
+2  A: 

Frameworks generally aims to better code organization, reusability of components, testability, and to generalize, application quality & maintenability. This can not be the more performance oriented choice.

I got sites running with symfony that are pretty fast, the benchmarks comes close to the original static HTML template.

Performance issue could happen more quickly when using a framework (and an ORM like Doctrine) than when putting spagetti code inside an HTML static page. That's sound normal to me : more treatements, more verifications, mode dependencies, more code to parse, etc.

If you mant to make application faster, they're is basically to ways :

  1. Get faster hardware, it costs, but can be worth it if this cost is under programmers & engineers cost, which is generally the case.
  2. Optimize software, the bigger step to this way is to use caching on multiple level : opcode, database query results, any heavy objects, html rendering (partial and whole).

With a well designed MVC application you can manage performance as an isolated issue, using profiler to views application's bottlenecks and treat them one by one (once again, optimization can be on hardware side too).

The choice of a PHP framework should not be made on various performance tests seens on blogs arcticles, they can not be objective. From my point of view, all major MVC frameworks can be used to build performant websites, it's all matter of optimization.

If you and your team better known Symfony, CakePHP or Zend, then go for it. You'll handle performance optimization once your application is functionnal, there are solutions for any frameworks.

If team experience is too wide and anyone has its own preference, then I would personnaly suggest Symfony, as its caching capabilities comes built-in with the framework (I don't know for others)

Benoit