LimeSurvey API

While I can’t say anything nice about LimeSurvey’s user interface, it does have a decent API.

When I was searching for open source survey software the API was what made the decision to go with it, easy. We needed to have the ability to pull the survey results out of LimeWire and have them display on another site.

The API is based on JSON-RPC and they’ve made it pretty easy to get started. As is laid out in the example, the first thing to do is download the jsonRPCClient from jsonrpcphp.org.

Once I had a connection to the API, building out the app was a matter of choosing a design pattern and going from there. To help with scalability, Abstract Factory was the design pattern I went with for this project. domnikl on github has some great resources for design patterns in PHP, if you need something to get you started.

In fact, the most difficult thing about this project was something seemingly trivial. I need to modify a .csv response to an associative array. I remember thinking that it shouldn’t take as much time as it did, so I’ll post it here for anyone who comes across a similar problem.

Brad

Brad Payne is currently the lead developer for the Open Textbook Project whose work focuses on open source software using PHP (LAMP). When not contributing to other developers’ projects on github, he builds his own. Through exploiting API’s and with a penchant for design patterns, he helps BCcampus implement new technologies for post-secondary institutions. Prior to his current position at BCcampus, Brad worked in IT at Camosun College and the BC Ministry of Education.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

*