I did not mean to be condescending. I was just trying to establish some facts about what types of flexibility had been useful (or otherwise) in the past, as one of the things to consider when deciding the best way forwards.
I found another interesting thing today: How does Moodle output the 'Skip to main content' link that is added to the start of Moodle page to improve accessibility
? Answer, a nasty hack, becuase there was no way to get it added to the start of the <body> tag on all themes.
So, based on the evidence I have seen, core developers need to change what appears in head more often than people making themes. But I am still listening for possible counter arguments.
OK, so as requested, I am imaging a theme designer starting a new Moodle theme. I assume they are following the docs
. So, they copy the standardwhite theme (or anomaly if you prefer). Then they open config.php and edit a list of CSS files they want included, and other settings, expressed in PHP. Why should JS be any different?
... errm ...
That is probably not what you wanted me to imagine. How did your version go?
I think we have establised that I do not understand the requirements of a typical designer - at least a typical designer as portayed here. It would certainly help me if I could understand, so please do not give up trying to explain. (I can't help noticing that all the people here who are trying to explain this mytical 'typical designer' to me are people who are perfectly capable of writing PHP code, which is someting of a mixed message.)
No one has yet shaken my view that HTML, CSS, JS, PHP are all just different types of computer language. Sure different people know different languages to different degrees, and people prefer to work with tools they are familiar with, but that does not mean that they are incapable of, say, editing a theme config.php file according to some docs, if that is the simplest way for them to convey the information they need to convey to Moodle.
There is, of course, a difference between declaritive langugages like HTML and CSS, and procedural languages like JS and PHP. And I assume that a designer is spending more time thinking in visual terms, rather than in code. I suppose I don't really understand what happens at the point were the visual thoughts have to be translated into edits of a CSS or HTML file.
On the other side, I will take this opportunity to tell you one thing about how developers think. Don't repeat yourself
, and Once and only once
, are absolutely fundamental principles for writing well-structured and easy to maintain code. Therefore, the idea that theme developers might prefer it, if they have to copy-and-paste a whole lot of standard, and fairly incomprehensible HTML in the the <head> of every theme they make, and have to remember to update it if necessary on every Moodle release, Is very difficult for me to understand. Surely it is better if Moodle does that automatically?
On the subject of Wordpress: isn't Wordpress a much 'smaller' application, so the amount of work in making a theme is necessarily much less?