A REST-like Administrative API
However, for the associated administrative system for managing content items, a REST-like API (not religiously RESTful - see my earlier post for an explanation of why) would solve a bunch of problems. It would make it easy to define the URIs for any given action in a consistent way across applications and would also allow for the testing and calling of ALL model methods using a single, very simple controller. Over time I could also add support for multiple response formats so this could be the basis for everything from lightweight scaffolding to a remote API for Flex applications.
The first step was to come up with the necessary URI templates for defining access to both single objects and collections of 0..n objects (comparable to the difference between a DAO and a Gateway). I decided on different templates for the two to make it clear whether you were operating on a single object or a collection . . .


