Now that we know what sort of API we are going to develop, we can move onto the implementation. In this chapter we will only implement a small sub-set of the API's functionality. Feel free to extend this to match the entire functionality of Dino Space, if you wish.
Most commonly, RESTful APIs either return their data in XML format or as JSON. Some APIs allow the consumer to specify the return type by adding
.json to the end of the URL. For the purposes of our implementation, let's stick to JSON, as it is simpler to convert data to JSON (simply by passing the data to the
Our API controller itself won't do very much; instead it will pass control to delegate controllers, which ...