Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which PHP frameworks are suited for web service only applications?

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?

like image 991
justkevin Avatar asked Feb 21 '12 22:02

justkevin


People also ask

What is the best framework to build a PHP web application?

Laravel – a popular PHP web framework with great extendability for high-quality applications. CodeIgniter – one of the most popular PHP frameworks with MVC support, great for creating lightweight web applications. Symfony – a modular PHP framework with a built-in debugging system and extensive documentation.

Which PHP framework is mostly used?

Pros of Zend/Laminas It's also the most used PHP framework by enterprises. Zend follows the PHP Framework Interop Group (PHP-FIG) standards, meaning that its code can be ported across to other frameworks without difficulty. Like Symfony, you can use just the components you need. You can use Zend to build RESTful APIs.

How do you know which PHP framework is used?

The easy way To instantly find out what CMS, framework or ecommerce platform a website is using, install the Wappalyzer browser extension . The extension automatically checks pages you visit and reveals the technologies the website is built with.


1 Answers

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.

like image 132
Ray Avatar answered Oct 13 '22 01:10

Ray