Short List of RESTful API Frameworks for PHP

Kin Lane
Sep. 23 2011, 12:00AM EDT

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.

Tonic - Tonic 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 Framework - Zend_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.

Kin Lane I am a programmer and entrepreneur, with a focus on the business of APIs. I study how APIs are changing the business landscape, and the rise of API driven developer ecosystems. I share my insights by blogging on API Evangelist and ProgrammableWeb, and put into action as API evangelist for CityGrid.

Comments

Comments(19)

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".

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.

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

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.