Hi, On Dec 29, 2007 9:51 PM, Felix Meschberger <[EMAIL PROTECTED]> wrote: > After the recent thread on scripting "everything" and some off-line > discussions around this matter, I come to the conclusion, that it is > about time to introduce the Sling Paradigm: > > Everything is a Resource > > If Sling would be enhanced to make the ResourceResolver more flexibel > and powerful by the addition of ResourceProvider instances to define a > virtual resource tree accessible (and iterable) through the > ResourceResolver [...]
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. 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. Now, I'm sure that REST is not the best architectural style for the internals of a small-scale Java application, but if we're trying to make (or keep) Sling a well-behaved component for a RESTful environment, we would probably do well to have those principles accurately reflected in the codebase. BR, Jukka Zitting