Re: [OT] Not everything goes well in Ruby land :-)

Mike Schrag <[email protected]> Mon, 7 Jan 2008 17:12:53 -0500
Newsgroups gmane.comp.web.webobjects.general
Message-ID <[email protected]>
> True, but exposing a PK or some other unique value seems equally  
> dangerous to me.  I have heard people claim the evils of giving the  
> PK meaning by using it in this manner.  I see this as more of an  
> academic than a practical concern.  Not using the PK (e.g. using  
> some other manufactured, unique value) would allow you to swap in  
> other objects for the same value, but I have never seen where that  
> was needed when there was not some other suitable unique value (e.g.  
> a part number).
Certainly you could expose other candidate keys if you have them, but  
from my perspective, PK = Object ID, and RESTful URL's are _supposed_  
to be invariant (blah blah), which makes PK a pretty obvious candidate  
for this role. Old me would have been offended by this, new me doesn't  
have time :)  I think if it gets the job done and it isn't obviously  
catastrophic, so be it.

ms