[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hierarchical Collections



One of the things that seems to come up repeatedly when designing APP apps is the concept of hierarchical collections. I'm wondering if people think there is a best practice here and if folks think we should agree on a standard way of doing this.

Since I'm a practical guy, I thought I might lead with a few use cases. Other folks can debunk/expand on them if they wish.

A couple ideas have been floating around that I've seen:

1. Embed a <collection> in an atom entry

<entry>
   <title>SomeCustomer</title>
   ...
   <collection href="" href="http://example.com/customers/acme/contacts">http://example.com/customers/acme/contacts" rel="contacts">
     <atom:title>Contacts</atom:title>
   </collection>
   <collection href="" href="http://example.com/customers/acme/purchase-orders">http://example.com/customers/acme/purchase-orders" rel="purchase-orders">
     <atom:title>Purchase Orders</atom:title>
   </collection>
</entry>

In this case I'm using a rel attribute to describe what relationship this collection has to the atom entry. Granted my example does not follow the <link> rel attribute rules here as those values are not registered, but you get the idea.

2. Use <link> relationships

<entry>
  ....
  <link rel="some-defined-child-collection-relationship" href=""></entry>

For the customer/PO/Contact example I could define my own rel attributes. Downside here is that it'd be really nice to have a title inside the feed saying what this thing was.

3. Don't use AtomPub, use XXX (i.e. WebDAV)

Maybe APP is the wrong thing for this, but I'm really looking to take advantage of the Atom's ubiquity.

4. Other?

I'm sure I'm missing a thousand details here, so it'll be interesting to hear what the group has to say :-)

1. http://glendaniels.blogspot.com/2008/07/mule-galaxy-rolls-out.html
2. http://netzooid.com/blog/2008/07/01/open-repository-api/


--
Dan Diephouse
http://netzooid.com/blog