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.
CakePHP. I don’t see why it wouldn’t work in shared hosting.
ElisLabs codeigniter(http://codeigniter.com/) should fit the bill like a glove.
This is my framework of choice when i do php projects.
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.
As has already been mentioned, CodeIgniter is a great PHP framework. It has a great user guide, community and a light footprint.
Notch up another vote for CodeIgniter – it’s really easy and quick to learn, and is very lightweight, so good on shared hosting.
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…
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.)
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.
Qcodo is another option to review.
Take a look at Sonic. It’s built to be really light and fast. The core framework is less than 3000 lines of code, and you can create an entire app with just a single 26kb file.
It has an extension framework set up to allow you to install extensions on top of it (ORM, Database, Cache, etc).