Hello Everyone,
In one of my many attempts to increase my facility with the family of technologies known as "CMS systems" I have run across a variety of what may be called persistent store strategies.
These strategies are designed to help in-memory systems store important information in such a way that it can be reliably reproduced despite the computer system hosting them experiencing a power outage or even planned interruption of service (migration).
Historically, the memory employed for this purpose was secondary, and the media magnetic. More lately (mostly for performance reasons) secondary storage has evolved in the direction of various types of SRAM.
In the "Backdrop CMS" system (a fork and subsequent evolution of the "Drupal CMS" system), among the many new concepts introduced was one targeting the persistent storage of critical configuration information: .json formatted files.
For example, the configuration file for the Backdrop CMS core language module at:
/modules/language/config/language.settings.json
Contains:
{
"_config_name": "language.settings",
"_config_static": true,
"language_negotiation": [],
"languages": []
}
JSON stands for "JavaScript Object Notation". Literally speaking, it is a foreign concept to the back-end technology that was used to develop Drupal and its offshoots, including the "Backdrop CMS" system. That base technology is PHP.
Since the release of PHP 4 (22 MAY 2000), a native solution has been available to any PHP developer seeking a persistent storage approach for retaining server-side configuration information: .ini files.
https://www.php.net/manual/en/function.parse-ini-file.php
So why was .json chosen? I am not asking this to cast doubt or aspersions on .json or even the people who chose to go with .json - I am just curious about why .json was ultimately selected as the "best" choice in the face of the other structured data notations that were available and already present in D7 (xml also comes to mind).
How come .json won?
I guess, ultimately, what I am looking for is a bit of a history lesson and a narrative.
g.
----
Comments
I don't know the answer to this question and was not around when these decisions were made.
I do know that Drupal 8 was looking at using YAML files for config management and Backdrop decided to go with JSON.
I never heard of any discussion about other alternatives, such as .ini file.
This discussion from the Github archive MIGHT shed some light on what was being considered and why, but I've not ready through it all.
See issue #2:
https://github.com/backdrop/backdrop-issues/issues/2
I'll ask around and see if anyone has anything to add this question.
(See also: https://forum.backdropcms.org/forum/how-does-backdrop-store-role-permiss...)
Hello @stpaultim,
Thanks for the link. Scanning it through, this seems like a hotly debated topic.
Guess: Maybe it was just a "path of least resistance" thing?
It might just be that:
Does anyone know different?
g.
----