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 PUTing/POSTing 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.
My plan is to provide RESTful access via the Accept header types of text/xml and application/xml, and web access (menus, CSS) for application/xhtml+xml and text/html. The problem that I'm trying to solve now is that Firefox uses the following accept header: Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5. I guess this means my application will always have to provide HTML of some sort, unless the script asks only for XML, in which case I provide XML, in a "Just the facts, Ma'am" [1] format.
Alex / talexb / Toronto
"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds
1. Obligatory link to Snopes for the pedants in the crowd. The quote is actually "All we want are the facts, ma'am."
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|