Monday 20 June 2016

New design explained

Hi readers,
This post mainly focuses on the design that my project now follows. Firstly, I am going to give you an overview of my previous design and then going to mention the changes that the new design introduces. So let's get started:

So what was the Older design?

This was the design that I proposed earlier in my proposal. A style was considered to be describing a complete set of styleable of attributes. A user can either create a new style or inherit from an existing style and make changes as per the requirements. The inheriting style will also reflect any changes made in the parent style. A style was supposed to have three levels of viewabilities:
  1.  System-wide viewability: Style is visible to all the lists.
  2.  Domain-wide viewability: Style is visible to the lists present in a specific domain to which the style is associated.
  3. List-wide viewability: Style is visible to only a particular list to which the style is associated.
Not only this all the styleable were divided in three categories:
  1. Site owner level attributes: Only a site owner would be able to set these attributes.
  2. Domain owner level attributes: Only site owner or the owner of the domain to which the style is associated would be able to set these attributes.
  3. List owner level attributes: Only site owners, owners of the domain in which the list is present or the owner of the list to which the style is associated would be able to change these attributes.

Mutability: A style can be made immutable. Once set to immutable, any of its styleable attributes can't be changed by anyone and it can't be set to mutable again.

Style Deletion: If a user deletes a style which is parent of another style then that style would only loose its presence in the list of styles visible to the user but it will not be deleted from the database till any of its child is present in the database. As soon as all of its children are deleted from the database then that style will also get deleted.

So what changes does the new design introduces?

Earlier, a style which was supposed to be describing a complete set of attributes continues to do so but now instead of acting as a container for all the styleable attributes, it now acts as a stack of partial set of attributes known as stylets. These stylets contain only a partial set of attributes describing only a handful of settings that the user wants to change in a style. A stylet when applied to a style changes the value of the common attributes of all the previous stylets.

Inheritance: A style can still inherit from another style. The inheriting style(and consequently the mailing list using that style) will reflect any changes made in the parent style.

Viewability and attributes categories: Both styles as well as stylets are having same three level of viewabilities, same as before and attributes are also categorized same as before.

Deletion: Earlier a user was allowed to delete a style even if it is was parent of some another style but now a style can be deleted only if it is neither being used by any mailing list nor by any of the style. Similarly, a stylet can be deleted only if it is not in use by any of the style.

Advantages: Makes modification of style easier since the user can now change a handful of attributes that he wants to without caring for other attributes and also apply the same modification to other styles as well.

Stay connected for more.

Thanks,
Harshit Bansal

No comments:

Post a Comment