Right now, REST along with JSON are the predominant
players in the opensource Web Services stack. To that end, RESTful Web Services is a good book to start with. That being said, as friedo pointed out, REST is not the be all, end
all of Web Services.
Here are some of the pro's of of using REST/JSON:
- integrates well with AJAX
- JSON more perlish than XML
- CRUD maps nicely into the HTTP verbs
And here are some of the cons:
- badly designed services can put a huge load on your server (AJAX gone wild).
- Error handling hard to map well into HTTP response codes
- PUT and DELETE not supported by all servers
- POST/PUT tends to be in flux as to which is a CREATE and which is UPDATE
(for me, POST is an UPDATE and PUT is a CREATE, but apparently I'm in the
minority).
That all being said, REST/JSON/AJAX has
been a refreshing approach to building webapps for me.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.