REST isn’t my personal favorite, partly because I really don’t want to put things in a URL-string that is so easily manipulated ... unless it actually makes sense (and is possible) for the user to reasonably specify a RESTful URL-string entirely on his own. (Or when it is both meaningful and harmless for me to build clickable hyperlinks.) Otherwise, I tend to define a single /api entry-point and to use JSON in both directions. The API simply implements a remote-procedure-call type of interface, and the URL-string means nothing.
A good example where REST might make perfect sense is in, say, a list of songs on a music site. In that case, a URL-string of /song/nnnn, where nnnn is a song-number, might be just what the doc ordered. But if it is strictly meant to be a program-to-program interface, I don’t ordinarily choose that route.
-
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.
|