Just to clarify why I needed the priority, simply think of WordPress. It's far from a lean and swift framework, and it's a mashup of procedural and oop, but its actions and filters are handy. You can add an event handler with add_filter(event, filter, priority, arguments), and that would be it. The system, although clunky, was designed to chain filters in a specific order, so that they could process the event data and pass it to the next handler.
This behaviour cannot be altered by admins, and that's the way it should be. WordPress offers other ways to render stuff that should be "movable", by the means of widgets and shortcodes. The two systems are related, but independent, and that's how envisioned the development of the feature in Vanilla. The priority system I implemented is (almost) the equivalent of WordPress filters, and doesn't cater for widgets, modules and content positioning. For that, I designed another solution, which would transform standard Vanilla modules into movable widgets, and that would include an admin UI. Such solution would be unobtrusive, just like the priority: 3rd parties will be able to register their movable modules dynamically, so that they will keep working even when the widget system is not installed. This, however, is another story.
@linc, my solution won't become a pull request, so don't worry. I figured that, if Garden doesn't implement something like this, there must be a reason.
Finally, about the concerns of docblock abuse: I fully agree that code should not go into comments, but, as already explained, the feature I needed does not exist in PHP. Considering how popular is the Doctrine Annotations extension, it looks like such feature would be very nice to have. Also, I'm not planning to use annotations for anything else, therefore there won't be a plethora of code bits scattered through comments. As @x00 pointed out, mine was just one of the many possible solutions, and annotations are a tool, nothing else. They fit in the design I work with, they are easy to use, so I chose them after carefully evaluating the possibilities (of course, based on my own criteria and experience).
I really don't get what the fuss was with xml even when it was used properly, it is a massive waste of time, in fact it is slightly less of a waste of time when it isn't used purely.
I blame the obsession with all things xml, on why html5 was around decade late. Someone had to tell w3c to shut up and listen up.
Herein lies the problem with design by comity, all theory no practical.
So yes I have an aversion to xml. I don't have an aversion to markup or xml like, it it i reasoned, but frankly there s usually a better option for stuff like this.
SVG is a good example of the limitation of xml, where serialisation actually counts, xml is irrelevant. The actual serialisation of coordinates is in attributes. Much like pre xml VRML.
com·i·ty
ˈkämitē/
noun
noun: comity; plural noun: comities
1.
courtesy and considerate behavior toward others.
2.
an association of nations for their mutual benefit.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
com·mit·tee noun A group of people paid a lot of money to spend an insane amount of time discussing topics they don't know anything about, to finally make irrational and unjustified decisions based on they woke up in the morning.
At least, this is the definition of "committee" that applies to my country.
@businessdad said:
peregrine I think he meant the following:
com·mit·tee noun A group of people paid a lot of money to spend an insane amount of time discussing topics they don't know anything about, to finally make irrational and unjustified decisions based on they woke up in the morning.
At least, this is the definition of "committee" that applies to my country.
Sayre's law states, in a formulation quoted by Charles Philip Issawi: "In any dispute the intensity of feeling is inversely proportional to the value of the issues at stake."
@vrijvlinder said: also applies to politicians then...
Harvard political scientist Richard Neustadt was quoted to a similar effect:
Academic politics is much more vicious than real politics. We think it's because the stakes are so small
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@businessdad said:
peregrine I think he meant the following:
com·mit·tee noun A group of people paid a lot of money to spend an insane amount of time discussing topics they don't know anything about, to finally make irrational and unjustified decisions based on they woke up in the morning.
At least, this is the definition of "committee" that applies to my country.
Comments
Just to clarify why I needed the priority, simply think of WordPress. It's far from a lean and swift framework, and it's a mashup of procedural and oop, but its actions and filters are handy. You can add an event handler with
add_filter(event, filter, priority, arguments)
, and that would be it. The system, although clunky, was designed to chain filters in a specific order, so that they could process the event data and pass it to the next handler.This behaviour cannot be altered by admins, and that's the way it should be. WordPress offers other ways to render stuff that should be "movable", by the means of widgets and shortcodes. The two systems are related, but independent, and that's how envisioned the development of the feature in Vanilla. The priority system I implemented is (almost) the equivalent of WordPress filters, and doesn't cater for widgets, modules and content positioning. For that, I designed another solution, which would transform standard Vanilla modules into movable widgets, and that would include an admin UI. Such solution would be unobtrusive, just like the priority: 3rd parties will be able to register their movable modules dynamically, so that they will keep working even when the widget system is not installed. This, however, is another story.
@linc, my solution won't become a pull request, so don't worry. I figured that, if Garden doesn't implement something like this, there must be a reason.
Finally, about the concerns of docblock abuse: I fully agree that code should not go into comments, but, as already explained, the feature I needed does not exist in PHP. Considering how popular is the Doctrine Annotations extension, it looks like such feature would be very nice to have. Also, I'm not planning to use annotations for anything else, therefore there won't be a plethora of code bits scattered through comments. As @x00 pointed out, mine was just one of the many possible solutions, and annotations are a tool, nothing else. They fit in the design I work with, they are easy to use, so I chose them after carefully evaluating the possibilities (of course, based on my own criteria and experience).
My shop | About Me
XML makes everything more "enterprise-y"!
My shop | About Me
I really don't get what the fuss was with xml even when it was used properly, it is a massive waste of time, in fact it is slightly less of a waste of time when it isn't used purely.
I blame the obsession with all things xml, on why html5 was around decade late. Someone had to tell w3c to shut up and listen up.
Herein lies the problem with design by comity, all theory no practical.
So yes I have an aversion to xml. I don't have an aversion to markup or xml like, it it i reasoned, but frankly there s usually a better option for stuff like this.
SVG is a good example of the limitation of xml, where serialisation actually counts, xml is irrelevant. The actual serialisation of coordinates is in attributes. Much like pre xml VRML.
grep is your friend.
(sic) committee
grep is your friend.
and I thought you meant:
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine I think he meant the following:
com·mit·tee noun A group of people paid a lot of money to spend an insane amount of time discussing topics they don't know anything about, to finally make irrational and unjustified decisions based on they woke up in the morning.
At least, this is the definition of "committee" that applies to my country.
My shop | About Me
also applies to politicians then...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Sayre's law states, in a formulation quoted by Charles Philip Issawi: "In any dispute the intensity of feeling is inversely proportional to the value of the issues at stake."
Harvard political scientist Richard Neustadt was quoted to a similar effect:
Academic politics is much more vicious than real politics. We think it's because the stakes are so small
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Sounds like the bureaucrats behind EU cookie law.
grep is your friend.