I recently built a RESTful web service to integrate two web applications, and I thought I would document that effort for the benefit of others. If you need to implement a RESTful service, this tutorial will give you a quick start.
First off, I am happy to report that the CodeIgniter PHP application framework makes it very easy to build a RESTful service. CodeIgniter’s Model-View-Controller implementation translates very nicely into the requirements of building a RESTful service. The Controller handles the client’s request, the Model encapsulates all the logic for the CRUD data operations, and the View formats and presents the response back to the client. By relying on the framework to take care of the more mundane details, the actual code needed to implement your service is minimal. This lets you focus on delivering a good service.
Before we dive into the code, however, let’s set…
View original post 2,651 more words