• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Making individual objects bookmarkable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making individual objects bookmarkable


  • Subject: Re: Making individual objects bookmarkable
  • From: Jacob Mouka <email@hidden>
  • Date: Tue, 7 Aug 2007 00:47:56 -0400

There isn't a particular reason to storing it in a different table. Usually something like a random string isn't related to any real data, so it's just good practice so separate it. It really depends on the context. For example, if the random string is kept in it's own table it could be re-used to bookmark other objects. So I agree, it's mostly a normalization thing.


On 7-Aug-07, at 12:37 AM, Ray Ackland wrote:

Thank you everyone for all for your comments. I'm probably going to go for a random string. I contemplated SHA, but as I don't need to actually encrypt any information, just link to it, I don't believe it adds any functionality to me (as Jacob pointed out).

One question though Jacob: You mention storing the string in the database along with a foreign key. I was going to be putting it in a field in the same table (or more politically, in another attribute of the same class) as the main data (the personal details).

I'm expecting your suggestion is just a normalisation thing, but is there an advantage to what you suggest that I may be overlooking? If I put it in a table of it's own, I guess that means I can make the string the primary key and speed up its lookup. Oui?

r

On 7/08/2007, at 15:48, Jacob Mouka wrote:

I second the use of SHA (or similar) to do this. It's very easy to use as it's part of java, and quite secure.

http://java.sun.com/j2se/1.5.0/docs/api/java/security/ MessageDigest.html

Although, for your purposes it's good enough to generate a random long string and store it in the db along with a foreign key to your object. The SHA is more useful where the form values are generated by the client and you need to verify their authenticity, but your urls are completely in your control so random strings are fine.

Jacob

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Making individual objects bookmarkable
      • From: james o <email@hidden>
References: 
 >Making individual objects bookmarkable (From: Ray Ackland <email@hidden>)
 >Re: Making individual objects bookmarkable (From: Q <email@hidden>)
 >Re: Making individual objects bookmarkable (From: Jacob Mouka <email@hidden>)
 >Re: Making individual objects bookmarkable (From: Ray Ackland <email@hidden>)

  • Prev by Date: Re: Making individual objects bookmarkable
  • Next by Date: Re: Making individual objects bookmarkable
  • Previous by thread: Re: Making individual objects bookmarkable
  • Next by thread: Re: Making individual objects bookmarkable
  • Index(es):
    • Date
    • Thread