Results 1 to 4 of 4

Thread: Core PHP is fast or any framework is fast

  1. #1
    Join Date
    Nov 2010
    Posts
    115
    Thanks
    27
    Thanked 0 Times in 0 Posts

    Default Core PHP is fast or any framework is fast

    Hi All,

    Can any one tell me which is faster in performance, core php or any framework(Zend,codeigniter or any other).

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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

  3. The Following User Says Thank You to djr33 For This Useful Post:

    hemi519 (12-26-2011)

  4. #3
    Join Date
    Nov 2010
    Posts
    115
    Thanks
    27
    Thanked 0 Times in 0 Posts

    Default

    thanks for the info

  5. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by djr33 View Post
    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.
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •