You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Profile items should be able to have a list attached.
Implementation options
Text Field
We could store the list as a single text field, delimited by some character of our choosing. Client apps would pull the list, split it by the delimiter, and present it as a list. The save process would be similar: concatenate the list using the given delimiter and then give it to the backend as a single string.
The advantage of this approach is it's the simplest to deal with from the backend. However, we're very limited in terms of future expansion of list item functionality (ability to mark as important/done, link to from teamtalk, reorder, etc..).
Array Field
Since we use Postgres in production, we could store the list in an ArrayField. This would make reordering of list items easier, but does not address the rest of the concerns of the text field implementation. Additionally, the field is only available in Postgres, meaning we'd have to set up a local database for development.
Separate Model
We could create a separate ProfileListItem model. This model would be attached to a ProfileItem. While this approach requires creating a separate model, it is also the most extensible. We could easily add attributes to the model to extend the functionality of the list item.
The text was updated successfully, but these errors were encountered:
We have decided to use a separate model for profile list items. This will allow easier expansion of functionality in the future, as well as better integration with TeamTalk.
Profile items should be able to have a list attached.
Implementation options
Text Field
We could store the list as a single text field, delimited by some character of our choosing. Client apps would pull the list, split it by the delimiter, and present it as a list. The save process would be similar: concatenate the list using the given delimiter and then give it to the backend as a single string.
The advantage of this approach is it's the simplest to deal with from the backend. However, we're very limited in terms of future expansion of list item functionality (ability to mark as important/done, link to from teamtalk, reorder, etc..).
Array Field
Since we use Postgres in production, we could store the list in an
ArrayField
. This would make reordering of list items easier, but does not address the rest of the concerns of the text field implementation. Additionally, the field is only available in Postgres, meaning we'd have to set up a local database for development.Separate Model
We could create a separate
ProfileListItem
model. This model would be attached to aProfileItem
. While this approach requires creating a separate model, it is also the most extensible. We could easily add attributes to the model to extend the functionality of the list item.The text was updated successfully, but these errors were encountered: