There has been a growing trend to start offering RESTful services for any web product, and Joomla is no exception. With Joomla however there is no "preferred" way of writing RESTful services so everyone (that includes us) is trying to build their own component and plugin to enable RESTful services in Joomla. This blog attempts to list out the various approaches available and the benefits of using each.
Using the JSON document type (format=json)
This is perhaps the oldest and most common way to do JSON over REST. This method is supported inherently by Joomla and developers just need to provide a view.json.php into each of their views to expose the data from the model via JSON. Framework on Framework (FOF) goes a step further and you don't need to create this file if the default output from the model is sufficient to you.
- No extra extensions needed
- Present directly inside a component so very easy to use model methods