Ferreteria/modules/users: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
(Created page with "==Tables== * {{l/ferreteria/table|user_account}} * {{l/ferreteria/table|user_token}} * {{l/ferreteria/table|user_client}} * {{l/ferreteria/table|user_session}} * {{l/ferreteri...")
 
m (4 revisions imported: moving this project here)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
==Tables==
==Tables==
===core functionality===
* {{l/ferreteria/table|user_account}}
* {{l/ferreteria/table|user_account}}
* {{l/ferreteria/table|user_token}}
* {{l/ferreteria/table|user_token}}
Line 8: Line 9:
* {{l/ferreteria/table|uacct_x_ugroup}}
* {{l/ferreteria/table|uacct_x_ugroup}}
* {{l/ferreteria/table|ugroup_x_upermit}}
* {{l/ferreteria/table|ugroup_x_upermit}}
===Function: User Data===
This doesn't actually need any specialized tables; it just makes use of {{l/ferreteria/module|TextFerret}}.
Reasoning:
* "User data" is really just key-value pairs that are also tagged for a specific user.
* As such, they could just be {{l/ferreteria/table|tf_node}}s with a key-leaf (text), a value-leaf (arbitrary but usually text), and a user-leaf (int for user ID), all handled by a particular code class (as intended).
* If you want to store a bunch of data for a particular user all together instead of as individual nodes, it could be serialized -- but only do this if there will rarely be any need to access just a few of the components individually, since the entire serialized dataset will need to be accessed each time.

Latest revision as of 16:42, 22 May 2022

Tables

core functionality

Function: User Data

This doesn't actually need any specialized tables; it just makes use of Template:L/ferreteria/module.

Reasoning:

  • "User data" is really just key-value pairs that are also tagged for a specific user.
  • As such, they could just be Template:L/ferreteria/tables with a key-leaf (text), a value-leaf (arbitrary but usually text), and a user-leaf (int for user ID), all handled by a particular code class (as intended).
  • If you want to store a bunch of data for a particular user all together instead of as individual nodes, it could be serialized -- but only do this if there will rarely be any need to access just a few of the components individually, since the entire serialized dataset will need to be accessed each time.