Hi Jukka, Am Freitag, den 04.01.2008, 13:55 +0200 schrieb Jukka Zitting: > > Everything is a Resource > > > Taking a different angle on this, we should better define what a > "Resource" in Sling really is? We're claiming that Sling is "based on > REST principles", which certainly suggests that Resources would be > "RESTful". However, looking at the Resource interface now I have > trouble making that association. Most specifically, the adaptTo() > method is an anathema to the Uniform Interface principle in REST.
In what respect is this method an anathema ? I understand the adaptTo() method such, that this method allows to get the resource in different presentations (to stay with the REST terminology). As such, I certainly think, that this method perfectly matches REST. What other roperties of the Resource interface makes you think, that we might be violating the REST principles / architectural style ? > Also I find the idea of an "iterable resource tree" to be at odds with > REST principles. REST resources are accessed using identifiers and > resource relationships are represented through links, not through an > externally imposed tree structure. Maybe we can take a relaxed view on this. REST AFAIU does not prevent enumerating resources, right ? So iterating the tree effectively is taking a path P1 and finding all resources P2 such that P1 is a prefix of P2 and the rest of P2 not being P1 is just a simple name. I don't think, this violates REST either. Regards Felix
