Hey there,
Taffy looks really cool! I have never written a restful api before and I have couple beginner questions.
Question 1)
Using taffy to manage my service layer, will I be able to call methods on my components from the server as well as the client? Certainly one wouldn't want to have two separate service layers, right? So if I call from a js front end: "/students/235423" I get back a nice json response, but if I call StudentService.getStudent(id) from a cfml page, the same method would be run but instead of json, a native cf response (object, query, etc.) would be returned instead.
In my mind, this is similar to calling method on a normal cfc with access="remote" and specifying the returntype as json or not.
Is this how Taffy works or am I way off the mark here?
==================================================
Question 2)
Sort of related to question 1... not looking for an in depth answer here, but a thought or two if someone is willing to share.
Why write a restful api at all? Since cfml by default supports access="remote" which can return both json and cf data types (based on the returnformat specified), why bother with all the extra complexities of making it "restful"? Is the benefit simply clean, intelligible urls, or is there much more to it that I am missing?
Told you they were beginner questions!
Thanks a lot for your insight,
Brian