Ferreteria/v0.6/sys/Registry: Difference between revisions
< Ferreteria | v0.6
Jump to navigation
Jump to search
(Created page with "{{fmt/title|Registries|different types and how they work}} There are two primary types of "registriy", '''class''' and '''object'''. Both of these are basically just arrays in which stored items follow a specific rule-set. ==Class Registry== * '''Purpose''': You have a set of classes (clade-family) for handling a situation, but the exact class to be used depends on circumstances (and may be extended by applications) -- so you need a list of alias-strings (class-slugs) wh...") |
No edit summary |
||
| Line 1: | Line 1: | ||
{{fmt/title|Registries|different types and how they work}} | {{fmt/title|Registries|different types and how they work}} | ||
There are two primary types of " | There are two primary types of "registry": '''class''' and '''object'''. Both of these are basically just arrays in which stored items follow a specific rule-set. In general, though, you have a list of things -- either '''classes''' or '''objects''' -- where the specific thing needed depends on ''context'' and ''identity''. | ||
The exact means of determining the ''context'' is perhaps the piece with the most variation in how it is implemented. It can be done by separate Registry classes or by using a "class slug" in a master-array. | |||
The ''identity'' is simpler: the Registry (assuming the context is already specified) accepts a slug-string and returns the thing requested. | |||
==Pages== | |||
* {{l/sub|class}} registry | |||
== | * {{l/sub|object}} registry | ||
* {{l/ | |||
* {{l/ | |||
Revision as of 01:48, 16 October 2025
|
Registries different types and how they work
|
There are two primary types of "registry": class and object. Both of these are basically just arrays in which stored items follow a specific rule-set. In general, though, you have a list of things -- either classes or objects -- where the specific thing needed depends on context and identity.
The exact means of determining the context is perhaps the piece with the most variation in how it is implemented. It can be done by separate Registry classes or by using a "class slug" in a master-array.
The identity is simpler: the Registry (assuming the context is already specified) accepts a slug-string and returns the thing requested.