Working with RESTful Services in CodeIgniter

The modern web is full of APIs. Many interesting sites have been created by mashing up data sources from multiple “Web 2.0″ sites.

Net.Tuts+ has a new tutorial on Working with RESTful Services in CodeIgniter. I found it to be quite an interesting read, as it covers both accessing RESTful APIs and creating your own.

If you have been following the CodeIgniter From Scratch series you will know by now that it is relatively quick and easy to put together simple web applications, such as blogs, CMS systems, brochure sites, etc. One thing you may not have thought about is using CodeIgniter to create an interactive API. After trying several existing REST implementations, I found they not only lacked simplicity but were missing most of the features you would expect from a RESTful implementation; so I built my own. This tutorial will show you how to use this code to set up your REST API, and gives example of how to interact with it from your web application.

I’m always amazed by how simple it is to create fairly advanced applications with frameworks like CodeIgniter. It does take a little bit of practice to get used to coding within the guidelines, such as properly utilizing the MVC structure, but once you get the hang of it you can whip things up really fast.