![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: Combining a web application and a REST application under a single URI?by Aristotle (Chancellor) |
on Jul 21, 2006 at 00:31 UTC ( #562745=note: print w/replies, xml ) | Need Help?? |
Yep, exactly. For the human-friendly pages with forms on them, and the URIs that handle them, you probably can’t get away with talking to the REST API directly, though. To be usable, the human interface often needs to handle updating multiple resources at once in some fashion, or may have functional aspects that can’t be associated with any particular resource in the system. Trying to build an interface that rigidly follows the resource structure of an app just makes for a mediocre user experience, at best. So I’d have the bookmarkable friendly URIs be capable of returning both human-friendly and machine-readable representations via Accept, and maybe also have them respond to programmatic access (by PUTting/POSTting with a request body with XML or JSON or something like that), but I’d have a separate URI space to handle the browser-based editing UI. Makeshifts last the longest.
In Section
Meditations
|
|