Are collections best represented as Resources or Restlets? For example, if the URI http://example.com/myresources/ represents a collection of myresource things, I would expect the server to return a list of URIs for these things. Is the collection also best represented as a resource?
Cameron. > Hello, > > I agree too. A restlet simply handle a request whereas a resource is > what can be handled via the Rest uniform interface (GET, PUT, DELETE, > POST, etc). > > best regards, > Thierry Boileau > > On Feb 8, 2008 7:07 PM, Rob Heittman <[email protected]> wrote: > > > > I would agree with those mappings. My understanding from previous threads: > > > > Restlet (and subclasses): part of the web application plumbing, long-lived, > > must be thread safe. > > > > Resource: ephemeral, created and destroyed on demand, need not be thread > > safe. Maps to one instance of a class of addressable items in the REST > > paradigm. > > > > I also tend to use Restlet (etc) to implement imperative styles (URIs > > accessed to produce certain side effects), and Resource to implement more > > functional styles, without side effects. > > > > - R > > > > > > > > > > On 2/8/08, Paul J. Lucas <[email protected]> wrote: > > > Is there a guideline when one should extend Restlet vs. extens > > > Resource? My rationalization is that: if X represents some kind of > > > "physical" resource, the one should extend Resource; if X represents > > > some kind of service, e.g., a "search service," then one should > > > extend Restlet. > > > > > > > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2651769

