User Preferences

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

User Preferences

Adrian Crum
The subject of persisting user preferences has come up from time to time, and
our last discussion on the topic was last May. At that time, Si and Leon came up
with a user preference system to solve a problem for Opentaps. I had suggested
making it more generic so the whole community could use it for more than what
they were trying to achieve. The subject was dropped after David asked for "100
uses" of the feature. Si and Leon went ahead and implemented their version in
Opentaps. Nothing was fed back into the project.

There are some features I would like to develop for OFBiz that will require
saving and retrieving user preferences, and I would like to get something built
along these lines. I would like to come up with a generic, yet flexible user
preference system for ALL OFBiz developers to use. I will probably design it
around the discussions we had in May.

Before I can submit any code for evaluation, I need to know where something like
this should go. The user preference system is driven primarily by the UserLoginId.

The Security component defines the UserLoginId, so I considered putting it
there, but then the user preferences feature doesn't have anything to do with
security, so that would be confusing.

The Party component would be another possibility, but then the feature would
depend upon the Party component - something that isn't necessary because the
user settings feature doesn't need the Party component.

The third possibility would be a new component called User Services or something.

Any ideas? I'd like to get started on this soon.

-Adrian

Reply | Threaded
Open this post in threaded view
|

Re: User Preferences

David E Jones-2

On Nov 16, 2006, at 6:09 PM, Adrian Crum wrote:

> The subject of persisting user preferences has come up from time to  
> time, and our last discussion on the topic was last May. At that  
> time, Si and Leon came up with a user preference system to solve a  
> problem for Opentaps. I had suggested making it more generic so the  
> whole community could use it for more than what they were trying to  
> achieve. The subject was dropped after David asked for "100 uses"  
> of the feature. Si and Leon went ahead and implemented their  
> version in Opentaps. Nothing was fed back into the project.

Ah, a little jab. Very nice.

I think that conversation was about a bit of a different topic (if I  
understand write what you are implying here, which I admit I'm not  
totally clear on), and your quote from me is a bit out of context and  
a misinterpretation in my opinion.

> There are some features I would like to develop for OFBiz that will  
> require saving and retrieving user preferences, and I would like to  
> get something built along these lines. I would like to come up with  
> a generic, yet flexible user preference system for ALL OFBiz  
> developers to use. I will probably design it around the discussions  
> we had in May.

There is a feature that already exists for something like this. I'll  
write what I remember real quick and invite you to research it if  
you're interested. What it does it keep a Map in the session and  
anything put into that Map will be persisted and then restored when a  
user logs in. In other words, the persistence is meant to be fairly  
automatic so that an application element can just read and write the  
values in the session.

-David


> Before I can submit any code for evaluation, I need to know where  
> something like this should go. The user preference system is driven  
> primarily by the UserLoginId.
>
> The Security component defines the UserLoginId, so I considered  
> putting it there, but then the user preferences feature doesn't  
> have anything to do with security, so that would be confusing.
>
> The Party component would be another possibility, but then the  
> feature would depend upon the Party component - something that  
> isn't necessary because the user settings feature doesn't need the  
> Party component.
>
> The third possibility would be a new component called User Services  
> or something.
>
> Any ideas? I'd like to get started on this soon.
>
> -Adrian
>

Reply | Threaded
Open this post in threaded view
|

Re: User Preferences

Adrian Crum
David E Jones wrote:
> Ah, a little jab. Very nice.

That wasn't my intention. I was simply restating what happened. I'm sorry you
took it that way.

> I think that conversation was about a bit of a different topic (if I  
> understand write what you are implying here, which I admit I'm not  
> totally clear on), and your quote from me is a bit out of context and  a
> misinterpretation in my opinion.

The conversation was about saving and restoring user preferences that control
the UI. I read the emails before composing the message, so I'm pretty sure I had
the correct context.

> There is a feature that already exists for something like this. I'll  
> write what I remember real quick and invite you to research it if  
> you're interested. What it does it keep a Map in the session and  
> anything put into that Map will be persisted and then restored when a  
> user logs in. In other words, the persistence is meant to be fairly  
> automatic so that an application element can just read and write the  
> values in the session.

I'm fully aware of the session persistance. That is not what Si and I are
looking for. That capability will not serve our needs.

I fully appreciate your comments. I'm almost finished with a patch. Once it's
done, you'll see what we're trying to accomplish.