Re: [Mailman-Developers] Discussion On Project Idea "Preset List Settings Templates" .

On 01/30/2016 11:11 AM, Harshit Bansal wrote:
What exactly I meant here was not a data structure but *how*? The data structure could simply be dictionary, but how would you populate the existing styles in the code? Notice that there is already an existing IStyle interface in the mailman right now, can you modify it somehow to dynamically update/fetch/store styles from the database instead of creating a new structure altogether?
Barry: Is there a reason the styles in the src/styles/base.py are not an implementation of IStyle interface?
If I am not wrong, you can define the styles in configuration too apart from the source code, so how do you pull those and update the database during the initialization?
This is not a difficult question I want an answer to right now, just that the application should have implementation details too, even if they are a rough sketch.
You may want to expand more on the *permissions system* in you application as that is an important part of this. Also, how are you going to propagate that to the Postorius via the API.
I *think* we have had a discussion before about what should be a better default value for member.moderation_action and nonmeember.moderation_action. Instead of just copying them to the field, we could set it to defer in which it case the lookup automatically picks up the value of the list's default_(non)member_action.
Or we could *always* copy the default styles to a new style that the list owner owns and can use for his other lists. This way he can change values in the default styles too. This way, we don't have to deal with user's being affected by the change in the default styles. Along with that we could provide them with an option to update the styles automatically from the default (when it changes) to fetch any new values added/removed/updated. This however might introduce a *lot* of redundancy in the database. Just a possibility, not very sure if this is a good idea.
See my comment above about the default behavior.
You cannot let users add stuff in the source code, configurations are meant for the values that can be adjusted by users. AND you can add styles via configs.
-- thanks, Abhilash Raj

Abhilash Raj writes:
These somewhat analogous to "deep binding" and "shallow binding" (actually they should be called "deep lookup" and "shallow lookup") in Lisp implementation. They can have the same semantics (Mailman can choose, the point of using Lisp as an example is that the semantics are defined by the language definition and the implementation must match that definition), but shallow binding requires more care in implementation (the binding is basically a cache). I think probably shallow binding is the way to go because changing these values is much less frequent than referencing them.
This is easy. Just think about what happens if you change the creation default from unmoderated to moderated, and automatically copy that to an existing list. Would you want to be that list owner?

Hi Abhilash, In our previous discussion you mentioned that :
I am unable to think of a use case in which it will be useful to have private styles.. Can you please suggest a suitable use case?
Thanks, Harshit Bansal.

Abhilash Raj writes:
These somewhat analogous to "deep binding" and "shallow binding" (actually they should be called "deep lookup" and "shallow lookup") in Lisp implementation. They can have the same semantics (Mailman can choose, the point of using Lisp as an example is that the semantics are defined by the language definition and the implementation must match that definition), but shallow binding requires more care in implementation (the binding is basically a cache). I think probably shallow binding is the way to go because changing these values is much less frequent than referencing them.
This is easy. Just think about what happens if you change the creation default from unmoderated to moderated, and automatically copy that to an existing list. Would you want to be that list owner?

Hi Abhilash, In our previous discussion you mentioned that :
I am unable to think of a use case in which it will be useful to have private styles.. Can you please suggest a suitable use case?
Thanks, Harshit Bansal.
participants (3)
-
Abhilash Raj
-
Harshit Bansal
-
Stephen J. Turnbull