Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat am I not understanding about REST?
    primarykey
    data
    text
    <p>I'm building a framework and want developers who build with it to have the ability to allow parts of it to both share data with other sites and allow other sites to add/edit/delete data.</p> <p>For example, if someone makes a site that has book reviews, authors, quotes, code examples, comments, etc. the developer could make e.g. "book reviews" read-only for other sites and "comments" readable by other sites and writable by certain sites/users. The idea is to use the framework to build applications that can easily be interconnected with other applications.</p> <p>I envision enabling all interaction with the site via POST and GET which would look something like this:</p> <ul> <li><strong>/books.php?category=ruby</strong> (returns an XML collection of books about ruby)</li> <li><strong>/books.php?id=23</strong> (returns the XML for a specific book)</li> <li><strong>/books.php?action=add&amp;title=AdvancedRuby&amp;description=....&amp;securityId=923847203487</strong></li> <li><strong>/books.php?action=delete&amp;id=342&amp;securityId=923847203487</strong></li> </ul> <p>Other applications could also "discover and consume" what a certain site has to offer by doing this:</p> <ul> <li><strong>/discover.php</strong> (returns XML of all public classes and actions available)</li> </ul> <p>Really this is all I need to enable the framework to be a way for developers to quickly create loosely connected sites.</p> <p><strong>What I want to know is, before I begin implementing this, are there significant/interesting parts of REST that I do not yet understand which I should be building into the framework</strong>, e.g.:</p> <ul> <li>REST requires GET, POST, PUT and DELETE. Why would I ever need "PUT" and "DELETE"? Am I locking myself out from taking advantage of some standard if I dont' use these?</li> <li>My "discover.php" file functions similarly to a WSDL file in web services. I am surprised in descriptions of REST there seems to be no standardized way of discovering the services that a RESTful service offers, or is there?</li> <li>If a client website tries to e.g. add a book to a server website and does not get any "success" response back, it would simply try again until it got a response. The server website would simply not add the same book twice. This is my understanding of data integrity in REST, is there more to it than this?</li> <li><p>eventually I want to have multiple sites that have the same rich classes e.g. "BookReview" so that a client site would be able to execute code such as this:</p> <p><strong>$bookReview = new BookReview("<a href="http://www.example.com/books.php?id=23" rel="nofollow noreferrer">http://www.example.com/books.php?id=23</a>"); $book->informAuthor("a comment about your book review was posted on our site...");</strong></p></li> </ul> <p>and the server site would send an e-mail off to the author of that review. Is this type of type interaction a component of the RESTful philosophy or is REST simply the exchange of data via XML, JSON?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload