https://bugzilla.wikimedia.org/show_bug.cgi?id=42928

--- Comment #8 from Michael Dale <[email protected]> ---
We have a flat config namespace, because we don't double wrap the "config.get"
method, and the mw.config.get method has no way to specify retrieval nested
config .. i.e mw.config.get('EmbedPlayer')['MySubConfigOption'] will throw an
error if the config does not exist instead of returning null. I don't think its
irregular to have a flat config key value pair setup. i.e there are advantages
in not having requiring JSON parsing everywhere you can set config.  

We read the config outside of "EmbedPlayer" interface, for example specifying
what tags we want to rewrite before we load the rest of player interface. So we
would need a nested config helper outside of the EmbedPlayer object, we can't
simply load embedPlayer config per player interface. 

The flat config relates to global config across players. When we set a global
config it applies to all players ( not imported per player )

Properties specific to the player interface do use nested config .. for example
EmbedPlayer.Attributes is an object with all the player attributes. 

Per Comment 6, you don't save much on transfer volume, gzip is going to take
care of repeating patterns. 

Per Comment 7, feel free to change the title of the bug to "store all TMH
configuration in a single config key with object value sets" if your bug does
not have to do with "cluttering the global window scope".

That being said, In principal, I don't have anything against what you outline,,
but is not easily accomplished because upstream we use flat config as well.
Take a look at this page and how we support this config in 3 different places:
http://html5video.org/wiki/Kaltura_HTML5_Configuration

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to