I’m evaluating PHP frameworks for several upcoming projects, with the goal of using the same framework for all of them. An unusual aspect is that they are NOT standard browser-based applications, they will all be accessed by custom apps that expect XML or JSON (currently undecided).
Most PHP frameworks such as Yii, CodeIgniter, CakePHP seem designed around the reasonable assumption that the client app will be a browser– e.g., using cookies to manage persistence, redirects after POSTs, etc.
While I’m sure I can get any of the above frameworks to do the job, are any of the major frameworks “better” suited to client-app agnostic application development?
Of the ‘big’ ones (CI, Kohana, Zend, Cake, Symfony) I think the newer Zend has the best support for RESTful webservices, but earlier versions of Zend framework had woefully lacking rest controllers. I’ve created my own for Zend and just use them.
If you really want a webservice tailored framework there are a bunch of smaller projects, none which I think have traction anywhere close to the tipping point to where I’d bet the farm on them (or use for more than a demo project).
My advice is stick to a framework you already know, build out your own rest controllers (if currently lacking). Some basic functions to take the output and convert it to XML, json, etc… may need to be created, but you’ll spend less time than trying to learn a new framework. Plus, with a biggie, you won’t be stuck with having to maintain an abandon-ware code base someone got tired of keeping up with.