Short List of RESTful API Frameworks for PHP

Kin Lane, September 23rd, 2011

Having a web API is an essential part of doing business online today.  We wanted to help get you started. So we took some time to pull together a list of the RESTful or RESTish (however you choose to view it) API frameworks, that can help you deploy your API faster.

Today we are going to take a look at seven RESTful API frameworks for PHP:

Dave - DAVE is a minimalist, multi-node, transactional API framework written in PHP. which contains an end-to-end API test suite for TDD, a Task model, an Active Database Model, and a stand-alone development server to get you started.  DAVE is an acronym that stands for Delete, Add, Edit, and View. These 4 methods make up the core functionality of many transactional web applications. The DAVE API aims to simplify and abstract may of the common tasks that these types of APIs require.

Epiphany – A micro PHP framework that’s fast, easy, clean and RESTful. The framework does not do a lot of magic under the hood. It is, by design, very simple and very powerful. The documentation provides a few conventions that will lead to well better code, but you’re free to use any style you’d like.  According to Epiphany,  the framework never dictates how you should write or structure your application.

FRAPI - FRAPI is a  high-level API framework that powers web apps, mobiles services and legacy systems, enabling a focus on business logic and not the presentation layer.  FRAPI handles multiple media types, response codes and generating API documentation. FRAPI was originally built by echolibre to support the needs of their client’s web apps, and now it’s been open-sourced.

Recess - Recess is a RESTful PHP framework that can be used by both beginner and seasoned developers. Recess is fast, light-weight, and has a very small footprint—ideal for LAMP development and drag-and-drop deployment to shared hosts. Recess is a modern framework that uses a loosely-coupled Model-View-Controller architecture designed and optimized specifically for PHP 5.

Slim - What began as a weekend project became a simple yet powerful PHP 5 framework to create RESTful web applications. The Slim micro framework is everything you need and nothing you don’t. Slim lets you build a complete PHP web service with only a single PHP file. Features include: RESTful routing, Named routes, Route passing, Route redirects, Route halting, Custom views, HTTP caching, Signed cookies, Custom 404 page, Custom 500 page, Error handling and Logging.

TonicTonic is an open source less is more, RESTful Web application development PHP library, where everything useful is a resource, not a file, not a CGI script, a resource, an abstract concept of something useful that the client wants to grab hold of.  Resources are located by URLs, URLs are cheap and form the universal addressing system of the Web.  Tonic helps you develop Web applications that embrace the way the Web really works, enabling your applications to scale, extend and work with other systems easily.

Zend FrameworkZend_Rest_Server is intended as a fully-featured REST server.  To call a Zend_Rest_Server service, you must supply a GET and POST methods, with a value that is the method you wish to call. You can then follow that up with any number of arguments using either the name of the argument or using arg following by the numeric position of the argument. When returning values, you can return a custom status, you may return an array with each status.

There are a number of Web and MVC frameworks out there that will also deliver a RESTful API, but the above frameworks focus more towards just delivering a RESTful API.

If you know of any RESTful API framework written in PHP that you’d recommend, please let us know.

Tags: Code
Both comments and pings are currently closed.

19 Responses to “Short List of RESTful API Frameworks for PHP”

September 23rd, 2011
at 12:57 am
Comment by: Elegant D » Short List of RESTful API Frameworks for PHP

[...] Source: PHP – Google Blog Search [...]

September 23rd, 2011
at 7:05 am
Comment by: john

You could also add Restler to the list – http://luracast.com/products/restler/

September 23rd, 2011
at 8:54 am
Comment by: Kin Lane

Thanks for adding John. I just read about restler yesterday….unfortunately too late for this post. Glad you commented on it!

September 23rd, 2011
at 2:49 pm
Comment by: Mike Greenberg

Is the Programmable Web blog REALLY unable to edit an article to include additional, relevant content after it’s initial publishing? Irony aside, I’m curious to know why this policy is in place. Especially considering that I loaded this specifically to verify that this specific RESTful API lib was given some attention, yet not included because it was “too late”.

September 23rd, 2011
at 2:54 pm
Comment by: Kin Lane

There is nothing preventing me from updating? Technical or policy. Its just a timing thing. I’m on to the python and ruby research already. I just had already submitted this for review by editor. When I have time I will circle around and update the PHP list with ALL suggestions for other PHP libraries made across all comment channels.

September 24th, 2011
at 12:15 am
Comment by: Arul

You should include Restler too! https://github.com/Luracast/Restler it can convert your public PHP methods as RESTful API.

Live Examples at http://bit.ly/RestlerLiveExamples should get you started in no time.

September 27th, 2011
at 6:15 am
Comment by: Greg

Apify http://www.apifydoc.com/

September 27th, 2011
at 9:58 am
Comment by: Kin Lane

Thanks Greg. Adding to the list.

October 10th, 2011
at 10:10 am
Comment by: Simon

I made a very basic restful server in PHP. The idea is to make it easy to understand the flow of a restful website. I’ll have to add more features later on.

https://github.com/simondlr/SimpleRest

October 10th, 2011
at 12:21 pm
Comment by: Kin Lane

Thanks Simon, adding to list as well.

October 22nd, 2011
at 2:24 am
Comment by: Fabrice

You can give a try to http://www.limonade-php.net

February 19th, 2012
at 5:13 am
Comment by: Zekeriah

Fat-free Framework is missing from this list. http://fatfree.sourceforge.net

April 10th, 2012
at 6:21 pm
Comment by: Today in APIs: Facebook SDK Security, Gnip Goes to China and Amazon In App Purchases

[...] A free, locally hosted API management solution — see also: API frameworks for PHP [...]

April 23rd, 2012
at 5:45 am
Comment by: Stefano Coletta

Another good client seems to be http://guzzlephp.org/

August 28th, 2012
at 7:20 am
Comment by: Pete

I was not successful in getting Recess to work. Additionally, the links on the main site, to the forums is broken. It seems to me that the code base is under developed and needs some maturing before it can be taken seriously.

October 3rd, 2012
at 3:11 am
Comment by: Kevin

DAVE is dead-ish. Here is a quote from the Github page: “I will not be doing much more work on this framework. However, many of the philosophies and syntax are used in the nodeJS successor to this project. Check it out @ https://github.com/evantahler/actionHero

October 11th, 2012
at 3:32 pm
Comment by: Kristian Matthews

I am developing a framework for creating a REST API using PHP and MySQL.

Development has only just begun and I’m looking for contributors, please visit the GitHub project:
https://github.com/PlugInStudios/api-framework

November 19th, 2012
at 8:09 am
Comment by: dennis

Would be nice to get a restFul ‘framework’ as a single simple class. Just an idea … Nice list for inspiration though!

December 25th, 2012
at 2:40 pm
Comment by: David

Take a look at Wave Framework – Open Source API-centric PHP Micro-framework (http://waveframework.com/)

Follow the PW team on Twitter

ProgrammableWeb
APIs, mashups and code. Because the world's your programmable oyster.

John Musser
Founder, ProgrammableWeb

Adam DuVander
Executive Editor, ProgrammableWeb. Author, Map Scripting 101. Lover, APIs.