Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsCDO resources layout best practices
https://www.eclipse.org/forums/index.php/mv/msg/365663/890872/#msg_890872
We are dealing with a project that uses CDO repositories as the backend storage for our business model objects. We have many entities to persist, and we want to distribute them among resources in a logical manner. We think that for first level entities (the parents of the rest of the model) a unique resource is a good approach, using a naming convention. We have chosen to name our resource like this: /[nameOfEntity]/[versionOfModelEntity]/library.
This approach seems to work fine for us for those top level entities, but we have some that are referenced from several and different top level ones (to put it simple, they are shared horizontally among the model), and we need to maintain them individually, so we need a resource path for them.
Let's talk about pears and apples: two of our entities are (say) cars and walls. We store each in their corresponding resource according to the naming convention described above. Both have as an attribute a Color object, and our application allows the user to maintain (perform CRUD operations) on the colors library. Taking into account that colors are part of both cars and walls, and both cars and walls are stored in different CDO resources, ¿what resource should we use for the color entity? Is there any best practice to apply in this case? What about independent entities that are shared among even more (than two) top level entities? What CDO resource layout strategy could we use?
Thank you in advance!!
Regards,]]>Mariano Navas2012-06-23T09:32:48-00:00Re: CDO resources layout best practices
https://www.eclipse.org/forums/index.php/mv/msg/365663/890901/#msg_890901
You lost me somewhere in the middle :P
Maybe it would help me to see some concrete resource paths and objects according to your cars/walls/colors example.
Please also tell how you modeled Color (EDataType?).
Am 23.06.2012 11:32, schrieb Mariano Navas:
> Hi there,
>
> We are dealing with a project that uses CDO repositories as the backend storage for our business model objects. We
> have many entities to persist, and we want to distribute them among resources in a logical manner. We think that for
> first level entities (the parents of the rest of the model) a unique resource is a good approach, using a naming
> convention. We have chosen to name our resource like this: /[nameOfEntity]/[versionOfModelEntity]/library.
>
> This approach seems to work fine for us for those top level entities, but we have some that are referenced from
> several and different top level ones (to put it simple, they are shared horizontally among the model), and we need to
> maintain them individually, so we need a resource path for them.
>
> Let's talk about pears and apples: two of our entities are (say) cars and walls. We store each in their corresponding
> resource according to the naming convention described above. Both have as an attribute a Color object, and our
> application allows the user to maintain (perform CRUD operations) on the colors library. Taking into account that
> colors are part of both cars and walls, and both cars and walls are stored in different CDO resources, ¿what resource
> should we use for the color entity? Is there any best practice to apply in this case? What about independent entities
> that are shared among even more (than two) top level entities? What CDO resource layout strategy could we use?
>
> Thank you in advance!!
>
> Regards,]]>Eike Stepper2012-06-23T11:22:45-00:00Re: CDO resources layout best practices
https://www.eclipse.org/forums/index.php/mv/msg/365663/890962/#msg_890962
Thank you for your quick response.
Color is modeled as an EClass (the generated interface extends CDOObject). The only entity about which resource path we have taken a decision is Manufacturer. It's resource right now is "/manufacturer/1.0/library", due to the fact that we deal with manufacturers in the form of a library or collection of them (we import this collection from a legacy database). We have no decision made on the rest of entities until we know more about best practices or good tips to take into account. The problem is that if we assign a reference of a color to an entity and there is a containment relation between Color and another entity the parent will change, and this is not desirable. I don't know if it's now clear enough ... .
The point is: are there any best practices to take into account when deciding about the naming convention of resources in a CDO repository? Specially for types shared among several other entities (in the form of an attribute). Should we model this types as some specific kind of EMF strut or a plain old EClass would suffice?
In the examples of cars/walls/colors, the initial naming convention we are considering (as explained in my latest post) would output this result:
For cars: /car/1.0/library
For walls: /wall/1.0/library
For colors: /color/1.0/library
Thank you very much!!
]]>Mariano Navas2012-06-23T15:35:18-00:00Re: CDO resources layout best practices
https://www.eclipse.org/forums/index.php/mv/msg/365663/891371/#msg_891371
I saw in post msg_420093 some very valuable recommendations on the questions we have. We are going to take those into account. I think the best practices we were looking for are there.
Cheers!]]>Mariano Navas2012-06-24T20:44:07-00:00Re: CDO resources layout best practices
https://www.eclipse.org/forums/index.php/mv/msg/365663/891696/#msg_891696
> Hi again,
>
> I saw in post msg_420093 some very valuable recommendations on the questions we have. We are going to take those into
> account. I think the best practices we were looking for are there.
I'm using a proper NNTP client, do you have a clickable link for that post? Title+date would do, too ;-)