Good treatment, Dave, not too long :-) I do agree with your thoughts generally ... except to harp on my only *strong* requirement, that the annotation based solution must remain a voluntary choice and not the only way to get things done. It should remain possible to achieve whatever annotations can achieve in a non-annotation way. This allows the basic API outline to work in places where annotations are not available or work differently enough to cause friction (pre-1.5 JVM backports, GWT, API ports to other languages, Scala ...) It is OK with me if the non-annotation approach requires verbosity or heavy lifting, it just needs to exist.
I can indeed see the benefit of writing many Resources more economically and intelligently with the right annotations ... and I also think, used consistently, this could help with my little dream of producing a machine and human readable REST interface specification that gives a large chunk of the enterprise value of WADL and WSDL without any of the associated misery. > So, to sum up what has been a much-too-long post, I'm convinced that > it's desireable to attempt to replace the unavoidable writing of > routing code with annotations on target methods, as long as the > annotations are clear, self-explanatory, and don't try to hide too > much magic. > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1611242