rave-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Geer <ch...@cxtsoftware.com>
Subject IDs for Interfaces
Date Sat, 02 Jun 2012 22:56:41 GMT
As we move to this interface model one thing we are now missing is a common
way of handling unique IDs. The JPA models have the EntityID
which uniquely identifies a JPA object but those aren't included in the
interface. That being said, we probably need to put a unique ID in the
interface so that you can identify the objects without having to know what
backend they came from. It doesn't have to map directly to the backend id.
but needs to be unique. I did notice that a couple of the objects include
get/setId methods which are Longs. We could standardize on that or consider
something like a GUID since they are easy to generate uniquely. I would
also suggest the interfaces should only have getter methods for the ID
since it seems awkward to change somethings unique ID since that could have
massive impacts. This might be something we wait for until the second round
of refactoring but I was thinking about it as I was working.

This also leads into a conversation about the interface model as a whole
and will it always be a "deep" model like JPA (where everything is object
relationships and the whole model is loaded all the time) or do we need to
allow for a "shallow" model where some objects contain the IDs of their
relationships and not the objects themselves? Food for thought as we
continue to talk about the modularization topic.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message