Hi all,
even though I don't mind the freemarker templates, I think Tom has a point with his remarks. However, I'm surprised about the conclusions. The obvious solution, as I see it, would be to chose a more "main-stream" REST framework and see how it deals with content transformations. Instead we're going for a do-it-yourself approach and start re-inventing the wheel.
Is there a reason not to look into using a more widely known and popular REST framework? This has been brought up before in this discussion, maybe we could pick it up there…?
Another thought on the JSONObject approach: One of the main arguments that started this discussion was, that you want to be warned when you change something in the java code. Now, if we use JSONObject, our IDE might show errors or do the re-factoring automatically. But now we break the client instead. What exactly did we gain by that?
And finally, two thoughts on learning curve and levels of indirection:
1) do we really reach a better learning curve by hacking the webscripts frameworks built in content transformation mechanism?
2) Isn't the level of indirection introduced by the JSON transformation itself, independently of the technology used?
Cheers,
Nils