abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject Re: Modeling Collections of Collections
Date Tue, 25 Sep 2007 18:03:42 GMT
You're in fairly unchartered territory as far as the standards are
concerned, so do what works best for your application, I would just
encourage you to find a way of doing it that can be generalized to other
types of applications.

- James

Dan Diephouse wrote:
> Well, I don't see any other ways around it really. I'm not about to have
> a Collection of Customers which has a Collection which includes Contacts
> and Purchase orders, which in turn are collections.
> 
> What about:
> 
> <link rel="purchaseOrders" href="customer/foo/purchaseOrders"/>
> <link rel="contacts" href="customer/foo/contacts"/>
> 
> You lose the accept info though. So once again, it requires foreknowledge.
> 
> - Dan
> 
> James M Snell wrote:
>> No, but that's a very application specific thing to do; if you're sure
>> others will be able to figure out what you're doing, then it's fine.
>>
>> - James
>>
>> Dan Diephouse wrote:
>>  
>>> Would it be completely wrong to do something like this?
>>>
>>> <atom:entry>
>>>  ...
>>>  <acme:purchaseOrders>
>>>    <app:collection .../>
>>>  </acme:purchaseOrders>
>>>  <acme:contacts>
>>>    <app:collection ../>
>>>  </acme:contacts>
>>> </atom:entry>
>>>
>>> - Dan
>>> James M Snell wrote:
>>>    
>>>> Well, the idea is that there is a one-to-one mapping from an entry to a
>>>> collection.  So for each collection you have, you'll have one entry.  I
>>>> don't have any suggestions for doing anything else :-)
>>>>
>>>> - James
>>>>
>>>> Dan Diephouse wrote:
>>>>  
>>>>      
>>>>> That seems to work well for one collection. What do you do if you have
>>>>> multiple collections? For instance a Customer with a collection of
>>>>> purchase orders and a collection of contacts? How might I distinguish
>>>>> between these two collections in the entry? Any other wisdom to
>>>>> share? :-)
>>>>>
>>>>> Cheers,
>>>>> - Dan
>>>>>
>>>>> James M Snell wrote:
>>>>>           
>>>>>> We had this problem in the Lotus Connections Activities component.
>>>>>> Each
>>>>>> user has a collection of Activities. Each Activity is itself a
>>>>>> Collection.  There is a top level My Activities collection.  Each
>>>>>> entry
>>>>>> represents an Activity.  Those entries contain an app:collection
>>>>>> element
>>>>>> that points to the activity collection uri, e.g.
>>>>>>
>>>>>> <entry>
>>>>>>   ...
>>>>>>   <app:collection href="...">
>>>>>>     <app:accept>application/atom+xml;type=entry</app:accept>
>>>>>>     ...
>>>>>>   </app:collection>
>>>>>>   ...
>>>>>> </entry>
>>>>>>
>>>>>> This approach has worked very well for us.
>>>>>>
>>>>>> - James
>>>>>>
>>>>>> Dan Diephouse wrote:
>>>>>>  
>>>>>>               
>>>>>>> I am pondering how to model collections of collections with APP
for
>>>>>>> more
>>>>>>> non-blogging oriented applications. For instance, lets say I
have a
>>>>>>> collection of customers, which have a collection of purchase
>>>>>>> orders. I
>>>>>>> can easily model the customers as a collection. Each entry
>>>>>>> represents a
>>>>>>> customer.
>>>>>>>
>>>>>>> But then what do I do about the purchase orders? The best solution
>>>>>>> that
>>>>>>> I can come up with is that I have another collection for each
>>>>>>> customer.
>>>>>>> Each entry in the collection would then be a purchase order.
>>>>>>> However,
>>>>>>> this has two downsides:
>>>>>>> 1. There is no great way to go directly from the customer to
the
>>>>>>> purchase order collection. The best solution I've come up with
is
>>>>>>> something <link rel="purchase-orders"
>>>>>>> href="service/customer-foo/purchase-orders"/>. Not sure if
thats a
>>>>>>> Good
>>>>>>> Thing or not.
>>>>>>> 2. Now my workspace has a gazillion customer/purchase order
>>>>>>> collections
>>>>>>> in it. I probably don't want to list those all out as that would
>>>>>>> take
>>>>>>> forever. The best solution that I've come up with here is to
just
>>>>>>> not
>>>>>>> list them and make item #1 be the best way to find the collection.
>>>>>>>
>>>>>>> Thoughts?
>>>>>>>
>>>>>>> - Dan
>>>>>>>
>>>>>>>                         
>>>>>             
>>>     
> 
> 

Mime
View raw message