I am building a web app designed to provide users with file-sharing ability, this is a safe app as the service is paid and will be using Stripe Payment API
However I can't decide which php framework would be the best for this task. I am very clear that this can be done with both, but I want the framework to be light on the server and not eat allot of server resources like RAM and CPU as I am limited at this moment, but should the app grow higher then resources will be increased.
I looked at Code Igniter and CakePHP. In my view CakePHP seems much more lighter then CodeIngiter but I never used either one so I can't judge. All I need the framework to do is
Provide up-most security possible against XSS, Injections
Able to work with file system and amazon s3
Play nice with amazon s3 and provide easy upload method to s3
Provide simple template scheme
Provide fastest possible database and general response time
Work with Stripe Payment API
Work with PHP 5.3.x and MySQL 5.3.x as efficiently
This is really it, if you can provide some pro feedback on which one would do the best or just do great for the task of file-sharing and dealing with files in s3 please let me know. Thanks in advance.
I would suggest codeigniter. I have used both heavily and I really have a lot of issues with Cake. Cake is not the lighter of the two, I found that Cake wants you to do things cakes way otherwise you are in for a really sore time. This is not really how a framework should work. Codeigniter on the other hand hs a framework to support you but allows you to write unobstructed php all day as you need it. Cake is really good at getting in the way and has a much steeper learning curve. Codeigniter will let you do all of those things you need, I know for instance that there are handy functions like $this->security->xss_clean($your_data);
that return data cleaned of xss issues. So its support for stuff like that is super handy. Templating is less robust in codeigniter, but the reason I like codeigniter is that it stays out of your way and lets you code PHP. This is good, because you know how to code in PHP, whereas when you code in Cake, you are writing weird cake code. This has the nasty side effect of making the code hard to manage should more people come on to the team and its impossible to ask people who do not know cake for help with cake stuff. Also cake does not guarantee backwards compatibility, your installation is your forever, if you use say version 1.6 then it might not be possible for you to move to 2.0 without serious rewrites (which seems short sighted on their part.)
Cake will offer you more features though, so if your in a hurry it will help you along with large parts of the setup, provided your always cool with doing everything its way. If your not the best at database stuff cake totally abstracts that away. I personally hate that, because I'm serious about db fine-tuning and lots of things I want to do to make better use of the db cake just flat-out forbids. Codeigniter's freedom why it is the one I would pick. Its docs are great two. Oh yeah the docs. Codeignite's docs are so much better than cake, so that is a good reason to pick it too.
If you want something small go for Yii if it is still small at all or any other micro framework. The questions is if it offers you everything you need to get it done in time and is solid.
Cake had just two security issues in the last few years AFAIR, the latest one (1 year ago) has just hit ruby on rails. It is solid and has thousands of unit tests for the core.
What is a template scheme for you? Something like twig? There are plugins for virtually any template engine. But template engines are a waste of resources. Go for plain php/html views. I know that some template engines support caching to increase performance but thats pointless because cake already offers caching techniques and also full page caching. So you can cache any output. If you want to go for OOP views checkout the Ctk plugin for Cake.
I've written a plugin for storing files in any kind of storage system. It supports more storage engines than the few you list. And it was exactly written for the task you ask for. I'm storing files first locally and move them to S3 later.
I don't know if there is any free available plugin for the stripe API, I think you'll have to do a little coding own your own... ;) If you go for cake you can use this plugin as a base and maybe you would like to make it open source, in this case I would help you with it. But I'm sure that any php framework can made to work with this API.
There are not much new improvement done in CodeIgniter. To take advantage of the new PHP 5.3, I would recommend you to use CakePHP instead. They are actively working in version 3 which will fully support 5.3 .
The following post might help you making a good decision. http://philsturgeon.co.uk/blog/2012/05/laravel-is-awesome