Few questions.
@Chris D
I should probably note that the language used throughout the guidelines is significant.
There’s a difference when we say “should” and “must”.
As I understand, 'should' is used where something is a best practice / generally applicable in most cases, but not adhering to it would not cause 'issues' (and there may be legitimate reasons to not do it).
21. Add-ons must utilise the various “handler” systems where available to their full extent rather than extending classes to inject custom behaviour. Including, but not limited to, Spam checking which must be implemented using the spam checker handler system rather than extending the checkForSpam methods in different places.
Should this be a 'must'? e.g. you may wish to only have spam checking in a particular area, or you may just be doing bad practice and extending the various methods, but this isn't necessarily a security risk or similar? This bullet doesn't really seem to fit to the pattern of should/must used elsewhere throughout the guidelines.
----
Some queries on other 'must' guidelines:
22. If a class extension is required to extend core methods then it must be extended properly, rather than overridden, by calling the parent method.
If there is some particular reason to override the method (i.e. you wish to replace functionality, or disable it, e.g. disable a certain controller action, and this is an intended purpose of your add-on) is this not allowed?
23. If a core method has different return types with different behaviours (e.g. controller actions return different types of reply objects) then the extended code must check to ensure it’s working with the correct type.
What if the extension does something that doesn't care of the return type of the parent method?
27. If an add-on needs to make HTTP requests, it must use the XF HTTP client rather than making cURL requests manually.
I've never had a reason to not use the XF HTTP client in my usages, but should this be a 'must'? Especially since point 14 allows for the usage of direct access of superglobals with data
if the data is appropriately filtered. It does seem excessively restrictive to not allow usage of cURL directly.
----
One query re. resource guidelines also:
Executable code (such as PHP or SQL) cannot be downloaded by your add-on unless explicitly requested by the user, as a core function of your add-on. For the avoidance of doubt, your installation or uninstallation routines must not download code to execute.
This sounds like it also includes add-ons which support auto updating functionality (or check for updates, and allow the admin to do one-click updates), as updating isn't really "the core function" of an add-on (unless, I guess, it's an updating add-on). Since the XF core allows updating functionality in a similar manner now, and there's add-ons which are made to allow for similar upgrading functionality, I would presume this is an acceptable use case of downloading executable code.
----
And for clarification:
Code must not be encrypted, encoded or otherwise obfuscated.
I presume this means add-ons are not allowed to perform any kind of obfuscation, or protection of their source code, (which would include the renaming of variables) or any kind of deviation between the release code and the source code? Are add-ons allowed to do any kind of protection of their source code against things like piracy, and if so, what things are allowed?
And finally, perhaps the resource guidelines (at least the add-on portion of it) and standards should be combined? I don't see why the add-ons part of the resource guidelines is separate to the standards.