dorsey — 2010-09-18T13:16:51-04:00 — #1
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.
pcspectra — 2010-09-21T13:32:15-04:00 — #2
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
tomb — 2010-09-19T05:53:13-04:00 — #3
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.
vali — 2010-09-18T14:33:09-04:00 — #4
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)
tomb — 2010-09-21T05:02:10-04:00 — #5
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
czaries — 2010-09-20T11:41:12-04:00 — #6
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?
kyberfabrikken — 2010-09-21T10:05:41-04:00 — #7
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.
arborint — 2010-09-21T01:45:14-04:00 — #8
SevenKevins? I downloaded it.
FrontController in models/frontcontroller.php
View class in models/view.php
Is that dependency by directory position?
dreamconception — 2010-09-20T21:06:02-04:00 — #9
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.