Dec 28, 2009
I am developing a number of Web Applications and CMSes - and have old ones - that I would like to enrich with a RESTful API: The possibility to programmatically access library functions like, say, creating pages, moving them, deleting them, querying content, the things that an API does. What I am looking for is some kind of a web service construction kit, PHP based, that co-exists with an existing web application and provides the entire skeleton for a REST based web service with all the standard operations, and everything else important: Error handling, possibly authentication, etc.
View 3 Replies
Say, my web application has a class $address and the methods add($id), edit($id), delete($id), reassign($id), reassign($id, $user) and make_standard($id)`. The construction toolkit would allow me to create a, I don't know the right name, let's call it case, named "address", and register the abovementioned methods. The toolkit would then do all the magic necessary for me to make a call like (pseudo-code):
In my wet dreams, such a framework would also auto-generate documentation for the services it provides from the API functions and paramters it has defined, and some phpDoc blocks. Everybody can dream, right? The framework would have to be very unobtrusive which is why I'm shying away a bit from using a full-blown framework that brings along the functions I need as a sub-set. I might end up with one of them, but I'd really prefer a specialized, lightweight application for this purpose.