[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cobbler-devel
Subject:    session/cookie vs persistent database
From:       jimi () sngx ! net (James Cammarata)
Date:       2009-04-23 19:16:15
Message-ID: 3f0aa324f0d59fb3c9618eb67ad74105 () sngx ! net
[Download RAW message or body]


On Thu, 23 Apr 2009 13:37:59 -0400, Michael DeHaan <mdehaan at redhat.com>
wrote:
> Vreman, Peter - Acision wrote:
>>
>> Using the session variable is good for some things like current 
>> applied filter and page. But there needs to be a persistent database 
>> that stores data based on a userid/username.
>>
>> What I mean is for example a webshop: The current order basket is per 
>> session, but your placed orders and address details are stored in a 
>> database.
>>
>>  
>>
>> Below is a summary of preferences that I see as persistent and per 
>> session:
>>
>>  
>>
>> Persistent:
>>
>> -           [Per list page]
>>
>> -          Table columns
>>
>> o        Column Field
>>
>> o        Column width
>>
>> -          Table sort_field
>>
>> -          Table items_per_page
>>
>> -          Table filters
>>
>> o        Filter name
>>
>> o        Filter criteria
>>
>> Session:
>>
>> -          [Per list page]
>>
>> o        Current filter criteria
>>
>> o        Current page
>>
>>  
>>
>>  
>>
>> Btw. Next week I have holidays without mail access.
>>
>>  
>>
> I was proposing (perhaps not to clearly), permanent cookies that contain 
> JSON data (that have no relationship to Cobbler objects).
> 
> The need for a backing database would go away.
> 
> (In other words, I need the UserPrefs object to be eliminated).
> 
> I am not sure I see a need for flexible table columns at the user 
> level.   If we do decide to do that, I'd like to see that done at the 
> settings level for simplicity. 
> 
> While I want CobblerWeb to be very usable, I also don't want it to grow 
> to require a lot extra webcode for being able to configure itself.   For 
> instance, I don't think I want to see a page
> people can go to to configure what columns they should see on each page 
> -- let's just start that off with a simple implementation that gets that 
> out of cobbler settings.


I have to agree here.  I understand in many contexts persistent storage of
user data is required, however sort fields, filters, last page viewed, etc.
do not qualify in my opinion.  This is all transient data that has
absolutely no critical value whatsoever.

If you really really want it to stick around between sessions, save it in a
cookie, otherwise just put it in the session object.  There is no need to
persist this and as Michael points out we should not be adding code to the
cli that is only used in the web.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic