Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » CDO resources layout best practices(What are the best practices to take into account when it comes down to divide a CDO repository into different resources?)
CDO resources layout best practices [message #890872] Sat, 23 June 2012 09:32 Go to next message
Mariano Navas is currently offline Mariano NavasFriend
Messages: 3
Registered: June 2012
Junior Member
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,
Re: CDO resources layout best practices [message #890901 is a reply to message #890872] Sat, 23 June 2012 11:22 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6441
Registered: July 2009
Senior Member
Hi Mariano,

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?).

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


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,


Re: CDO resources layout best practices [message #890962 is a reply to message #890901] Sat, 23 June 2012 15:35 Go to previous messageGo to next message
Mariano Navas is currently offline Mariano NavasFriend
Messages: 3
Registered: June 2012
Junior Member
Hi Eike,

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 ... Smile.

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!!
Re: CDO resources layout best practices [message #891371 is a reply to message #890962] Sun, 24 June 2012 20:44 Go to previous messageGo to next message
Mariano Navas is currently offline Mariano NavasFriend
Messages: 3
Registered: June 2012
Junior Member
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.

Cheers!
Re: CDO resources layout best practices [message #891696 is a reply to message #891371] Mon, 25 June 2012 14:16 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6441
Registered: July 2009
Senior Member
Am 24.06.2012 22:44, schrieb Mariano Navas:
> 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 ;-)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:Contributing adapter factories via extensions.
Next Topic:[CDO/Hibernate/Teneo] teneo.mapping.map_all_lists_as_idbag
Goto Forum:
  


Current Time: Fri Aug 23 02:44:57 GMT 2019

Powered by FUDForum. Page generated in 0.02017 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top