Say you have, in a website application, a permission system (user can/cannot access specific section).
You need a "name" for this permission/right (eg. can_access_admin) which will somehow be used by storage system (to keep track the fact a user has this right) and into source code (to ask fetch into storage to see if user has the right to access admin area).
What form this right "name" has? bits? string? How to use it efficiently in source code: as it (copy/paste)? constant?
When designing a website application you oftenly use concepts such as user permission (eg. access to admin area is granted) and preference (eg. maximum number of results to display in projects list) that will be used among all application.
It boils down to a reference/ID in the form of a string (eg.
can_access_admin), bit sequence (eg.
10111) or even integer (
42) to use in your source code:
- Where you fetch value/presence from storage