Hi All,
Can any one tell me which is faster in performance, core php or any framework(Zend,codeigniter or any other).
Hi All,
Can any one tell me which is faster in performance, core php or any framework(Zend,codeigniter or any other).
Frameworks are meant to change the way that you write code; by default, I assume that means they are slower because you're running a framework plus core PHP.
There's always the chance that a particular operation might be faster in a framework rather than core PHP depending on how it's written, but probably not in general.
So use a framework if you, as the coder, have a reason to do so, but it's not going to fix your site in performance.
I'm not positive about any of this, but it makes sense.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
hemi519 (12-26-2011)
thanks for the info
more specifically, a framework might do a particular task more quickly than code you wrote yourself would.
Zend, for example, has a lot of resources put into making it as efficient and capable as possible.
pros (of frameworks in general):
- "ready to go."
- provides functionality you might not know how to write yourself (or "basics" that most projects need but take a long time to write)
- typically abstracted enough that they can be used very flexibly (not limited to only one particular application).
- maintained frameworks have a group of people (not just you, and sometimes whole communities) helping to improve them/fix bugs/etc.
cons (of frameworks in general):
- learning curve: not only do you need to know PHP, you need to know all the functions, classes, and methods provided by the framework.
Good frameworks are complex, and learning how to use them can become a full-time job (some much more than others - many coders will "lock" themselves into a particular framework because of this - i.e., start thinking of PHP in terms of "Zend" or "Cake" only).- weight: a good framework is flexible and general-purpose, but needs more code to accomplish that.
- overkill: for many projects (e.g., most projects taken on by a single developer, especially a beginner), frameworks might be significantly more work than is actually needed for the task.
Last edited by traq; 12-26-2011 at 05:06 PM.
Bookmarks