Hi Deepal:

Deepal Jayasinghe wrote:
The important thing seems to me to decide exactly what you get if you
do a registry.get("/foo;comments").  I would think you'd get a
collection Resource which contains the comments as individual Atom
entries.
In this case the return type is Resource and that resource contains
links to the comments
On the wire, this is EXACTLY the same as when you do
registry.getComments("/foo").
In this case the return type is set of comment objects.
What I'm saying is that there should be absolutely no difference at
the protocol level.  Both of these calls should generate
There is a difference , the difference is in one case we call
registry.get whereas in other we call registry.getComments and the
results are two different.  And I can implement this if that is only for
comments , but the same thing is there for tags, versions as well.

Hm, that doesn't sound right to me.  See below.

The problem is this , when we call "get" method what we get is Resource
with its child list having paths , for example if we call "get" method
with "/c1/c2;comments" then the resultant Resource will have child list
that does not have information about the comments.  Therefore as I can
see calling "/c1/c2;comments" using "get" API wrong to me , I think that
should be changed to "/c1/c2;commentPaths" since what actually we get is
path , not actual resource.

Well, comments are just Atom entries, aren't they? As far as I can see there is NO reason to ever return a feed of "just paths" to comments - you'd return the comments themselves. In some cases you might want a "short" version of the comment (with a length limit) but for now I think we should just return the whole thing, just like most blogging software does. This simplifies the API, makes the results consistent, and removes the need for any "extra" metadata indicators like "commentPaths".

Can you give me a specific use-case for why you think we should do it differently?

--Glen

_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev

Reply via email to