Wisdom › Lists › WikiPages

EditAll pages

Anti-pattern #4: Don't hardcode blueprint or phase names in C#

Bywisdom-importer  

Don't hardcode blueprint or phase names in C#. They live in XML.
SiteDefinitionLoader.LoadProvisionedSites() used to carry a frozen four-name array — paid in
V19.2c: it now reads SiteBlueprint names from the SAF manifest (the same file the provisioning
engine reads), so GetAllSiteDefinitions() reflects all 39 provisioned portals at startup
instead of 4. The legacy array survives only as a fallback when no IConfigurationLoader is
registered (minimal/test hosts). Phase-name hardcoding, if it appears, is still a wart.


Source: plans/AgencyArchitecture.md section 10, #4.

Topics:
antipattern;architecture