Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: VO IDs from mysql  (Read 7477 times)
lordnahkim
Newbie
*
Posts: 8


View Profile Email
« on: February 17, 2009, 11:34:07 »

Hi,

(Cliff, you are a genius)

It seems the recommended creation of VOs, and retrieving those VOs is by using a Stringed ID - is that correct?  The reason I ask is because I'm developing an RIA pulling some arrays from MySQL (via ZendAMF).  I have limited knowledge of the LAMP end of things, so it is hard for me to explain my concern to that team.  My concern is with regard to retrieving IDs as Strings from MySQL - afaik they want to use numbered auto-increment.  Does it break with best practice to use those numbered records when ID'ing my VOs?  Or if anyone knows about lamp stuff, how should I approach fetching records to where I get a String that is more reliable?  They mentioned something about "keys"?

Hope that makes sense.  I appreciate your consultation!
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: February 17, 2009, 12:18:26 »

Auto-increment is easy, but not a super way to generate ids particularly if there will be a massive number of records. UUIDs  are the generally accepted way of creating string IDs that are universally unique. Its a 16 char string Based on time and MAC address usually, but there are various ways of generating them.

MySQL has a method for generating them.

Search wikipedia for UUID, there's a good treatment there.

-=Cliff>
Logged
Joel Hooks
Courseware Beta
Sr. Member
***
Posts: 146


baby steps

 - 46288188  - passport@provinsal.com  - joeltuff
View Profile WWW Email
« Reply #2 on: February 17, 2009, 01:34:24 »

Flex has UIDUtil for creating them.
Logged

http://joelhooks.com - my ramblings about developing with actionscript and python using pureMVC and django respectively.
lordnahkim
Newbie
*
Posts: 8


View Profile Email
« Reply #3 on: February 17, 2009, 10:49:39 »

Thanks so much for the guidance guys!  I can already imagine the benefits of this approach.
Logged
Pages: [1]
Print