SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: MVC frameworks

  1. #1
    SitePoint Zealot Dorsey's Avatar
    Join Date
    Feb 2004
    Location
    NJ
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MVC frameworks

    I recently evaluated several PHP framworks for a large team-based project, and wanted to share some of the results. Those evaluated were: Yii, CakePHP, CodeIgniter, and SevenKevins. The latter is more of a "kit" for building your own framework.

    The size of the code base for each of these is interesting:

    Yii - 13.6Mb, 1698 files in 336 folders
    CakePHP - 7.75Mb, 774 files in 352 folders
    CodeIgniter - N/A (another person did this one)
    SevenKevins - 792Kb, 187 files in 306 folders

    Other than 7kevins, those look pretty hefty. How much of the framework is actually used in a bare-bones web page? To answer that question, I created a simple page that displays the classic "Hello, World" string plus the results of memory_get_usage( true ). Here are the results:

    Yii - 6Mb
    CakePHP - 1.75Mb
    CodeIgniter - 750Kb
    7kevins - 512Mb

    I wasn't able to get a count of file hits, but I'd bet that Yii is the "winner" there, too.

    Any thoughts on this? I think that simpler is better, so we're going with 7kevins because it allows us to build out the framework as we need it without all the general-purpose things that we don't need but that are brought in as extra baggage.

  2. #2
    SitePoint Guru
    Join Date
    Jun 2006
    Posts
    638
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no Zend?
    And you might want to see how they work under load.
    You can have a script that takes 2 megs of ram when it runs once, and 4 megs of ram when it runs 10 times (instead of 20)

  3. #3
    SitePoint Guru bronze trophy TomB's Avatar
    Join Date
    Oct 2005
    Location
    Milton Keynes, UK
    Posts
    989
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    PHP Code:
    <?php
    echo 'Hello World';
    ?>
    256kb (which is only that high because I'm guessing it's an internal allocation by php).

    The problem is, it's apples and oranges. What you get with a framework is a feature set. Try developing my hello world script into a fully fledged site. It will take a lot more work than using an existing framework.

    You can't judge a frameworks worth on memory usage alone.

  4. #4
    PHP/Rails Developer Czaries's Avatar
    Join Date
    May 2004
    Location
    Central USA
    Posts
    806
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Counting the number of files is a pretty poor way to make a decision on which framework to use. I have never even heard of SevenKevins, don't know anyone using it, and the documentation is severely lacking (I just looked through it). What does it offer that the other frameworks you mentioned do not have? Any real advantages?

  5. #5
    SitePoint Member
    Join Date
    Sep 2010
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Exactly Czaries. Yii has been very promising for me and is easy and nice to use. It doesn't seams to have too many of the problems that other frameworks I have looked at has. However many people swear to codeignitor and zend as well.

    It all really depends on the kind of project you need to do, and one is not really better than another as there is so many different parameters it is impossible to really tell which one is a better framework.

    If you want it simple, just use a library instead.

  6. #6
    SitePoint Wizard
    Join Date
    Aug 2004
    Location
    California
    Posts
    1,672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SevenKevins? I downloaded it.

    FrontController in models/frontcontroller.php
    View class in models/view.php

    Is that dependency by directory position?
    Christopher

  7. #7
    SitePoint Guru bronze trophy TomB's Avatar
    Join Date
    Oct 2005
    Location
    Milton Keynes, UK
    Posts
    989
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    I'm surprised you got that far. I looked at the documentation (or lack thereof) and gave up.

    A good example why picking a framework based on memory usage and/or number of files is not the best way :P

  8. #8
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arborint View Post
    SevenKevins? I downloaded it.

    FrontController in models/frontcontroller.php
    View class in models/view.php

    Is that dependency by directory position?
    Had me puzzled as well.

    @Dorsey Where did you find this 7kevins thing in the first place? I never heard of it before and it seems like a very small project, compared to the others mentioned.

  9. #9
    SitePoint Evangelist
    Join Date
    Aug 2005
    Location
    Winnipeg
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LOL

    I gave up reading the first paragraph pretty much. Funny how a framework like 7Kevins would somehow end up in comparison with popular frameworks. LOL

    Cheers,
    Alex
    The only constant in software is change itself


Tags for this Thread

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
  •