Now we will discuss some restful web services library.
Slim is simple yet powerful PHP 5 framework to create Restful web applications. It has many features like Enable or disable application debugging for debug API. If true, Slim will display debugging information for errors and exceptions. It provides developers to create complete PHP web service with only a single PHP file in quick minutes.
There are main features of Slim:
•Custom 404 page
•Custom 500 page
•Error handling and Logging.
This is another very simple php framework for webservice development. The Epiphany framework is 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 we believe lead to well written code but you’re free to use any style you’d like. The framework never dictates how you should write or structure your application.
There are following modules participate in Epiphany web services:
1. Route – A RESTful routing library to map paths to functions.
2. Api – An API helper module to create private and public APIs. This is both new and awesome.
3. Session – A multi-engine session library which supports native PHP sessions, APC and Memcached.
4. Database – A simple interface to PDO’s MySql driver.
5. Cache – A easy caching library which supports APC and Memcached.
6. Config – An ini based configuration library that supports overloading.
FRAPI is a RESTful API Framework that allows developers to rapidly develop RESTful APIs that are easily scalable and highly performant. FRAPI powers web apps, mobiles services and legacy systems, enabling a focus on business logic and not the presentation layer.
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 consists of two specific parts
1- administration interface
2- public API.
administration interface : In this section api developers can easily manage his apis.Its also allows developers can create API calls, generate third party API documentation, resources, actions, URIs- it allows developer to manage API errors, output formats and also test their APIs.
Public API: When developers is done creating and generating actions using administration interface,then web-service (API) becomes available to third party companies and third party developers to consumes. Public API really only creates a bridge between your data and third party developers without having you worrying about formatted data. The public API takes care of all request and response calls of your api consumers.
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.
Some Recess features are below listed:
•Recess is designed around the HTTP protocol and supports RESTful APIs out of the box.
•Recess uses declarative annotations to define relationships, routes, template engines, and user-defined behaviors with less code.
•Recess includes a full database ORM for powerful database queries without complicated SQL.
•Recess includes thorough diagnostics to help you find and fix errors faster.
•Recess Tools provides a GUI and toolset to expedite your development.
Zend framework provide full features rest API. Zend_Rest_Server is used to create REST server and with help of this class, you must supply a GET and POST methods, with a value that is the method you wish to call. Webservice arguments will be name of the argument or arg following by the numeric position of the argument. you can return a custom status, you may return an array with each status.
Guzzle is a PHP HTTP client and framework for building RESTful web service clients. Guzzle provides a lightweight framework for creating web service clients. Most web service clients follow a specific pattern: create a client class, create methods for each action, create and execute a cURL handle, parse the response, implement error handling, and return the result. Guzzle takes the redundancy out of this process and gives you the tools you need to quickly build a web service client.
Main features are:
• Extremely powerful API provides all the power of cURL with a simple interface.
• Truly take advantage of HTTP/1.1 with persistent connections, connection pooling, and parallel requests.
• Service description DSL allows you build awesome web service clients faster.
• Symfony2 event-based plugin system allows you to completely modify the behavior of a request.
• Includes a custom node.js webserver to test your clients.
• Unit-tested with PHPUnit with 100% code coverage.