I actually did both #1 and #4. See #4 in action here http://blue.nist.gov/ss/DDE59FFBEDBB4464852572F100701422 where a little PDF is generated to print. I cannot show #1 in action - it's a protected gov system. If you want to see a Restlet web site (with all sorts of URLs), here is what I did to entertain myself: http://www.naviquan.com/
I do not think there is any correct approach. Folks do what's convenient (and easy and, very important, simple enough to use) and not what's theoretically/semantically correct (which is also debatable by the way). That's why, in my opinion, REST model has never really worked for classic web applications (I am not going to list now all aspects of it including human and historic factors of Internet development that contributed to this - perhaps, I will rant about this in my next cookbook recipe). Having said this, I would like to stress that among all ill fit frameworks and specs (including horrific Servlet/JSP/JSF, etc. etc.), the Restlet framework is most flexible and friendly. Serge William Pietri (via Nabble) wrote: > Rob Heittman wrote: >> I find that I've had a hard time implementing complete template-based, >> page-based UIs entirely on the server without making a mess. I think >> this is because I'm just conflating too many UI concerns in one layer. > > I've had that feeling recently, too. > > Would people be willing to share examples of how they've done this > with Restlet? For example, the other day we needed to create a print > view of one of our entities. Sticking with the user example, these > options occurred to us, in rough order of preference: > > 1. /user/1/print > 2. /user/1?view=print > 3. /user/print/1 > 4. /print/user/1 > 5. /user/1 (with a custom media type in the Accept header) > 6. /user/1 (with a POST that requests the print view) > > > The last 4 all strike me as various flavors of wrong. I'm ok with the > first two, but neither seems great to me, in that the URLs suggest > different resources, while we think of the print view as a different > representation of the same resource. > > Since none of the folks on my team feel like we fully get what a > RESTful web app looks like, I'd love to hear how more experienced > people do it. > > William > > > ------------------------------------------------------------------------ > View message @ > http://n2.nabble.com/Designing-restlet-applications-tp3084513p3126710.html > > To start a new topic under Restlet Discuss, email > [email protected] > To unsubscribe from Restlet Discuss, click here > < (link removed) >. > > -- View this message in context: http://n2.nabble.com/Designing-restlet-applications-tp3084513p3127279.html Sent from the Restlet Discuss mailing list archive at Nabble.com. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2363894

