Re: [phplib] default authentication, anyone using it? From: giancarlo pinerolo (giancarlo <email protected>)
Date: 08/05/01

Kristian Koehntopp wrote:
>
> In netuse.lists.phplib you write:
> >But What do you think of taking away altogether the 'user' storage for
> >nobody? That leads to quite a few programming mistakes, and extra checks
> >to be done whenever you register or freeze or page_close.
>
> 'User'data was a hack. It was implemented because it was
> possible and is more like a design study. The implementation is
> bad, it is being done by nullifying existing methods inherited
> from Session instead of defining an abstract superclass and
> deriving User and Session from it.
>
> The jury is still out on the case regarding userdata at all.
> There are strong arguments for seeing userdata as structured
> data, which should be kept in a proper preferences table with
> one column for each preferences item. This would allow for
> vertical queries (list all users that have enabled the
> x-feature) and statistics (how popular is the Jon Katz slashbox
> with our user population?). On the other hand userdata is easier
> to abstract into a library than a structured preferences table,
> and one is able to handle userdata without planning the layout
> and structure of a table.

That is why I push for XML representation of user data.
You keep the free layout of user data, but can run 'vertical' queries on
it.

>
> Im my personal opinion User should be replaced by a class that
> is not derived from Session or any Session superclass. It should
> not use the Session storage mechanism. There should be a User
> class that uses a structured table for preferences, and that
> allows horizontal and vertical queries,

I feel this too rigid

> and a User subclass for
> nobody users, which transparently hides the fact that for
> nobodies the User data is being kept in a reserved session
> variable.

I second this, and an 'auto-somebodify' (pardon me that) method when a
nobody becomes a somebody.
 
> This would automatically exclude nobodies and their preferences
> from vertical queries, which is the right thing to do.
>
> Kristian
>
Giancarlo

-- 
Abbestellen mit Mail an:   phplib-unsubscribe <email protected>
Kommandoliste mit Mail an: phplib-help <email protected>