tags:

views:

382

answers:

8

I'd like to create some small websites using PHP as the programming language. I've looked at several frameworks but they all appear to be rather large and am not sure how well they will run in a shared hosting environment. I was wondering if anyone knew of frameworks that work well in shared hosting? I'm looking for something with MVC and ORM features and anything else extra would just be a bonus.

+9  A: 

ElisLabs codeigniter(http://codeigniter.com/) should fit the bill like a glove.

This is my framework of choice when i do php projects.

Mayowa
+2  A: 

CakePHP. I don't see why it wouldn't work in shared hosting.

+4  A: 

Although I personally love CakePHP, and I've done many projects for clients running on shared hosts and it runs just fine, if a light footprint is really important for you, CodeIgniter would be my choice.

Paolo Bergantino
+1  A: 

I really like CakePHP, it is simple and has pretty good documentation. I have set it up pretty easily on MediaTemple, I just had to change the webroot variable in the config file.

markwatson
+2  A: 

As has already been mentioned, CodeIgniter is a great PHP framework. It has a great user guide, community and a light footprint.

bradym
+2  A: 

Notch up another vote for CodeIgniter - it's really easy and quick to learn, and is very lightweight, so good on shared hosting.

John McCollum
+1  A: 

Since you are talking about small applications, it probably doesn't matter. CodeIgniter seems to be the fastest.

However for big applications (or ones that could become big (talking about load, not quantity of code)) I suggest not using a "general" frameworks at all. They may speed up development a lot, but in most cases they are real computer power killers.

According to - for example - some tests of Paul M. Jones frameworks eat up about 90% to 97% of the system ressources (CodeIgniter scored good by eating just 85%). That means that if your computer can handle 100 requests per second using a framework you'll have only 15 possible requests left before the server goes boom.

Of course the results will vary based on the application. The tests Paul performed were simple "Hello World" pages with no database and no other calculations. Obviously the "application / framework" ratio will change a lot if you add application logic.

Not trying to stop you from using a framework... Just trying to make you think before you start coding...

BlaM
+1  A: 

Kohana is a good choice too. Originally forked from CodeIgniter, it's now been rewritten as a PHP5-only, real open-source project that is optimized for speed, rapid development and flexibility.

Side note/disclosure, I was originally involved in the fork that formed into Kohana. CodeIgniter (at least about a year or two ago, when I was involved) is very not open to user contributions. I had several enhancements and bug fixes that I contributed patches for, that ended up rotting, basically, as they were ignored*. As a result, several people took up a huge interest in getting their contributions in, and while Kohana is based on all the same principles and ideas as CodeIgniter, the implementation is much better, and much easier to work with.

(*: not due to code quality, just do to simply not being interested because it didn't necessarily fit in the direct that Ellislabs was going since it was the backing for their commercial product. It was like if a change was made -- even if it made a huge improvement to the library -- that would have required them to rewrite/change anything they had built on top, it would be ignored.)

gregmac