on 9/22/2000 7:48 AM, "Fedor Karpelevitch" <[EMAIL PROTECTED]>
wrote:
> What is the reason to use ObjectData? I only see drawbacks: you depend on
> Java simply to retrieve a value (do not talk about searching), BLOBs are
> very unnice to deal with and compatibility is also an issue.
>
> My belief is that it makes much more sense to use a structure like this for
> the attrs:
>
> VISITOR_ATTR_TYPES
> -------------------
> ATTR_TYPE_ID TYPE_NAME
> 1 NAME
> 2 EMAIL
> 3 SHOE SIZE
> 4 BAD HABITS
>
> and store attr values in
> VISITOR_ATTRS
> -----------------------
> VISITOR_ID ATTR_TYPE_ID VALUE
> 1 1 Rafal
> 1 2 [EMAIL PROTECTED]
> 1 3 42
> 2 1 Fedor
> .....
>
> This way you have enough flexibility to add/remove various attributes
> without any java coding and schema changes by simply manipulating entries in
> VISITOR_ATTR_TYPES. But this way you do not depend on Java to retrieve
> values and you can run queries against any attr. There is a question whether
> it makes sense to move system-used attrs (uid, passwd, email) into this
> structure or leave in VISITOR table or, maybe, duplicate in both.
>
> Makes sense?
Fedor, data.setPerm() was essentially supposed to be a way to auto-serialize
anything that was placed into the HttpSession and make it persistent and
available on a server restart.
Your methodology is definitely "better" from the perspective of being able
to grab random data out and put random data in, but what if you really want
to be able to associate a real serialized OO object to a user and have it
persist? It was very simple to just stick that into the setPerm() hashtable
and then serialize the resultant byte[].
-jon
--
http://scarab.tigris.org/ | http://noodle.tigris.org/
http://java.apache.org/ | http://java.apache.org/turbine/
http://www.working-dogs.com/ | http://jakarta.apache.org/velocity/
http://www.collab.net/ | http://www.sourcexchange.com/
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]